From 9e2fc3e6c2f8f72aabf96dde4ce4aaa404d0c162 Mon Sep 17 00:00:00 2001 From: amass <168062547@qq.com> Date: Tue, 20 Jun 2023 10:28:05 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=A7=A3=E5=86=B3=E5=88=BB=E5=BA=A6=E5=B0=BA?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AppBar.js | 7 +++++-- src/AppBar.module.css | 5 ----- src/LoginPage.js | 13 ++++--------- src/MainPage.js | 1 + src/business/request.js | 1 - src/components/DynamicCodeForm.js | 9 +++++++-- src/components/ProgressBar.js | 2 +- 7 files changed, 18 insertions(+), 20 deletions(-) delete mode 100644 src/AppBar.module.css diff --git a/src/AppBar.js b/src/AppBar.js index 50565f6..7589263 100644 --- a/src/AppBar.js +++ b/src/AppBar.js @@ -10,7 +10,6 @@ import IconButton from '@mui/material/IconButton'; import Toolbar from '@mui/material/Toolbar'; import Typography from '@mui/material/Typography'; import logo from './assets/logo.png'; -import styles from './AppBar.module.css'; import { Stack, CssBaseline } from '@mui/material'; import { useCookies } from 'react-cookie'; import { useNavigate } from "react-router-dom"; @@ -39,7 +38,11 @@ export default function () { - + 纽曼AI语记 state.user.accessToken) const flushToken = useSelector(state => state.user.flushToken) - const debug_test = () => { - console.log("accessToken", accessToken, yzs.uniqueDeviceIdentifier()); - } + // const debug_test = () => { + // console.log("accessToken", accessToken, yzs.uniqueDeviceIdentifier()); + // } const handleSubmit = (event) => { event.preventDefault(); let result = null; @@ -114,15 +114,10 @@ export default function () { - - - - + {/* */} - - ); } \ No newline at end of file diff --git a/src/MainPage.js b/src/MainPage.js index cfcec80..82d8f6e 100644 --- a/src/MainPage.js +++ b/src/MainPage.js @@ -116,6 +116,7 @@ export default function () { const [playerBarWidth, setPlayerBarWidth] = useState(0); const [open, setOpen] = useState(true); useEffect(() => { + if (passportId <= 0) return; yzs.get_record_list(accessToken, passportId).then(list => { dispatch(setList(list.result)); if (list.result.length > 0) { diff --git a/src/business/request.js b/src/business/request.js index 97c7047..442d42d 100644 --- a/src/business/request.js +++ b/src/business/request.js @@ -181,7 +181,6 @@ const yzs = { // mode: "no-cors", headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', - "Access-Control-Allow-Origin": "*", }, }).then(response => response.json()).then((json) => { console.log("flushToken: ", json.result.flushToken); diff --git a/src/components/DynamicCodeForm.js b/src/components/DynamicCodeForm.js index 5d996dd..2b3cd0b 100644 --- a/src/components/DynamicCodeForm.js +++ b/src/components/DynamicCodeForm.js @@ -1,5 +1,4 @@ import { Container, TextField, InputAdornment, Link, Button, Stack, Typography } from "@mui/material"; -import { CheckBox } from '@mui/icons-material'; import React, { useState, useEffect, useRef } from 'react'; import PhoneIphoneIcon from '@mui/icons-material/PhoneIphone'; import LockIcon from '@mui/icons-material/Lock'; @@ -10,6 +9,7 @@ import yzs from "../business/request.js"; export default function ({ udid }) { const dispatch = useDispatch(); const code = useRef(null); + const [checked, setChecked] = useState(true); const [seconds, setSeconds] = useState(0); // 倒计时 const account = useSelector(state => state.user.account) @@ -41,6 +41,10 @@ export default function ({ udid }) { setSeconds(60); }; + const onAgreeChange = (event) => { + setChecked(!checked); + } + return - + 同意 《纽曼隐私协议》 diff --git a/src/components/ProgressBar.js b/src/components/ProgressBar.js index e9f5234..3558ca3 100644 --- a/src/components/ProgressBar.js +++ b/src/components/ProgressBar.js @@ -9,7 +9,7 @@ function timeTag(timepoint) { if (isNaN(timepoint)) return "00:00"; timepoint = Math.round(timepoint); let second = Math.round(timepoint % 60); - let minute = Math.round(timepoint / 60); + let minute = Math.floor(timepoint / 60); return minute.toString().padStart(2, '0') + ":" + second.toString().padStart(2, '0'); }