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 Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography'; import Typography from '@mui/material/Typography';
import logo from './assets/logo.png'; import logo from './assets/logo.png';
import styles from './AppBar.module.css';
import { Stack, CssBaseline } from '@mui/material'; import { Stack, CssBaseline } from '@mui/material';
import { useCookies } from 'react-cookie'; import { useCookies } from 'react-cookie';
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
@ -39,7 +38,11 @@ export default function () {
<Container maxWidth={false} > <Container maxWidth={false} >
<Toolbar disableGutters variant="dense"> <Toolbar disableGutters variant="dense">
<Stack direction="row" sx={{ flexGrow: 1 }}> <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> <Typography variant='h6' sx={{ color: "#FFFFFF" }}>纽曼AI语记</Typography>
</Stack> </Stack>
<Box sx={{ <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 accessToken = useSelector(state => state.user.accessToken)
const flushToken = useSelector(state => state.user.flushToken) const flushToken = useSelector(state => state.user.flushToken)
const debug_test = () => { // const debug_test = () => {
console.log("accessToken", accessToken, yzs.uniqueDeviceIdentifier()); // console.log("accessToken", accessToken, yzs.uniqueDeviceIdentifier());
} // }
const handleSubmit = (event) => { const handleSubmit = (event) => {
event.preventDefault(); event.preventDefault();
let result = null; let result = null;
@ -114,15 +114,10 @@ export default function () {
<PasswordForm /> <PasswordForm />
</TabPanel> </TabPanel>
</TabContext> </TabContext>
</Container> </Container>
</ThemeProvider > </ThemeProvider >
<Button variant="contained" onClick={debug_test}>测试</Button> {/* <Button variant="contained" onClick={debug_test}>测试</Button> */}
</div> </div>
</div> </div>
); );
} }

View File

@ -116,6 +116,7 @@ export default function () {
const [playerBarWidth, setPlayerBarWidth] = useState(0); const [playerBarWidth, setPlayerBarWidth] = useState(0);
const [open, setOpen] = useState(true); const [open, setOpen] = useState(true);
useEffect(() => { useEffect(() => {
if (passportId <= 0) return;
yzs.get_record_list(accessToken, passportId).then(list => { yzs.get_record_list(accessToken, passportId).then(list => {
dispatch(setList(list.result)); dispatch(setList(list.result));
if (list.result.length > 0) { if (list.result.length > 0) {

View File

@ -181,7 +181,6 @@ const yzs = {
// mode: "no-cors", // mode: "no-cors",
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8',
"Access-Control-Allow-Origin": "*",
}, },
}).then(response => response.json()).then((json) => { }).then(response => response.json()).then((json) => {
console.log("flushToken: ", json.result.flushToken); console.log("flushToken: ", json.result.flushToken);

View File

@ -1,5 +1,4 @@
import { Container, TextField, InputAdornment, Link, Button, Stack, Typography } from "@mui/material"; 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 React, { useState, useEffect, useRef } from 'react';
import PhoneIphoneIcon from '@mui/icons-material/PhoneIphone'; import PhoneIphoneIcon from '@mui/icons-material/PhoneIphone';
import LockIcon from '@mui/icons-material/Lock'; import LockIcon from '@mui/icons-material/Lock';
@ -10,6 +9,7 @@ import yzs from "../business/request.js";
export default function ({ udid }) { export default function ({ udid }) {
const dispatch = useDispatch(); const dispatch = useDispatch();
const code = useRef(null); const code = useRef(null);
const [checked, setChecked] = useState(true);
const [seconds, setSeconds] = useState(0); // 倒计时 const [seconds, setSeconds] = useState(0); // 倒计时
const account = useSelector(state => state.user.account) const account = useSelector(state => state.user.account)
@ -41,6 +41,10 @@ export default function ({ udid }) {
setSeconds(60); setSeconds(60);
}; };
const onAgreeChange = (event) => {
setChecked(!checked);
}
return <Container disableGutters={true} return <Container disableGutters={true}
sx={{ sx={{
width: 300, width: 300,
@ -94,6 +98,7 @@ export default function ({ udid }) {
variant="contained" variant="contained"
color="primary" color="primary"
fullWidth fullWidth
disabled={!checked}
sx={{ sx={{
backgroundColor: "#FF595A", backgroundColor: "#FF595A",
'&:hover': { '&:hover': {
@ -110,7 +115,7 @@ export default function ({ udid }) {
<Stack direction="row" spacing={1} <Stack direction="row" spacing={1}
sx={{ paddingTop: 2 }} sx={{ paddingTop: 2 }}
> >
<CheckBox color="primary" /> <input type="checkbox" checked={checked} onChange={onAgreeChange} />
<Typography>同意 <Link>纽曼隐私协议</Link></Typography> <Typography>同意 <Link>纽曼隐私协议</Link></Typography>
</Stack> </Stack>
</Container> </Container>

View File

@ -9,7 +9,7 @@ function timeTag(timepoint) {
if (isNaN(timepoint)) return "00:00"; if (isNaN(timepoint)) return "00:00";
timepoint = Math.round(timepoint); timepoint = Math.round(timepoint);
let second = Math.round(timepoint % 60); 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'); return minute.toString().padStart(2, '0') + ":" + second.toString().padStart(2, '0');
} }