Commit 0d88c8a8 authored by GuanHua's avatar GuanHua

feat:把用户协议页面添加到白名单

parent 5622debe
......@@ -21,7 +21,8 @@ setup()
const userLoginLists = [
'/user/login',
'/user/register',
'/user/forget'
'/user/forget',
'/user/agreement'
]
// 商城相关路由
......
......@@ -86,7 +86,7 @@ let timeChange: any; // 定时器
const actions = createFormActions()
const UserRegistry = () => {
const [current, setCurrent] = useState(0)
const [current, setCurrent] = useState(1)
const [subStep, setSubStep] = useState(false)
const [submitLoading, setSubmitLoading] = useState(false)
const [agreementList, setAgreementList] = useState([])
......@@ -122,10 +122,12 @@ const UserRegistry = () => {
const [asyncSchema, setAsyncSchema] = useState(() => {
return schemas[`schema${current}`]
})
useEffect(() => {
setAsyncSchema(schemas[`schema${current}`])
if (current === 2) runTimerJump()
}, [current, actions])
useEffect(() => {
if (time === 0) {
clearInterval(timeChange)
......@@ -134,6 +136,7 @@ const UserRegistry = () => {
console.log('执行登录跳转!')
}
}, [time])
const runTimerJump = () => {
timeChange = setInterval(() => setTime(t => --t), 1000)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment