1.解决刻度尺不对的问题。

This commit is contained in:
amass 2023-06-20 10:28:05 +08:00
parent bee94310d4
commit 9e2fc3e6c2
7 changed files with 18 additions and 20 deletions

View File

@ -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 () {
<Container maxWidth={false} >
<Toolbar disableGutters variant="dense">
<Stack direction="row" sx={{ flexGrow: 1 }}>
<img className={styles.titleIcon} src={logo} />
<img src={logo} style={{
width: 28,
height: 30,
marginRight: 24,
}} />
<Typography variant='h6' sx={{ color: "#FFFFFF" }}>纽曼AI语记</Typography>
</Stack>
<Box sx={{

View File

@ -1,5 +0,0 @@
.titleIcon {
width: 28px;
height: 30px;
margin-right: 24px;
}

View File

@ -47,9 +47,9 @@ export default function () {
const accessToken = useSelector(state => 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 () {
<PasswordForm />
</TabPanel>
</TabContext>
</Container>
</ThemeProvider >
<Button variant="contained" onClick={debug_test}>测试</Button>
{/* <Button variant="contained" onClick={debug_test}>测试</Button> */}
</div>
</div>
);
}

View File

@ -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) {

View File

@ -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);

View File

@ -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 <Container disableGutters={true}
sx={{
width: 300,
@ -94,6 +98,7 @@ export default function ({ udid }) {
variant="contained"
color="primary"
fullWidth
disabled={!checked}
sx={{
backgroundColor: "#FF595A",
'&:hover': {
@ -110,7 +115,7 @@ export default function ({ udid }) {
<Stack direction="row" spacing={1}
sx={{ paddingTop: 2 }}
>
<CheckBox color="primary" />
<input type="checkbox" checked={checked} onChange={onAgreeChange} />
<Typography>同意 <Link>纽曼隐私协议</Link></Typography>
</Stack>
</Container>

View File

@ -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');
}