diff --git a/src/pages/login/login.module.scss b/src/pages/login/login.module.scss index 6ad0269..91264ec 100644 --- a/src/pages/login/login.module.scss +++ b/src/pages/login/login.module.scss @@ -1,5 +1,6 @@ .container { position: relative; + padding: 0 30rpx; } .navbar, @@ -39,8 +40,7 @@ justify-content: center; align-items: center; gap: 12px; - margin: 0 auto; - padding: 25px 0; + margin: 20rpx auto; a { diff --git a/src/pages/login/login.tsx b/src/pages/login/login.tsx index 5e5613c..4b1a58e 100644 --- a/src/pages/login/login.tsx +++ b/src/pages/login/login.tsx @@ -1,6 +1,6 @@ import {FC, useEffect, useRef, useState} from "react"; import {Profile} from "@/store"; -import {Button, Form, Image, Input, Text, View} from "@tarojs/components"; +import {Form, Image, Input, Text, View} from "@tarojs/components"; import Taro from "@tarojs/taro"; import styles from './login.module.scss' import Loading from "@/components/loading"; @@ -9,6 +9,7 @@ import {LoginData, userApi} from "@/api"; import {regexTel} from "@/utils/regu"; import CustomPageContainer from "@/components/custom-page-container/custom-page-container"; import {loginApi, LoginParams} from "@/api/login"; +import MyButton from "@/components/button/MyButton"; interface BingProps { code: string @@ -74,24 +75,23 @@ const Bing: FC = ({code, catch_key}: BingProps) => { - + 提交 ) } -function getMenuButtonBoundingClientRect() { - if (process.env.TARO_ENV === 'h5') { - return {top: 0, bottom: 44} - } - return Taro.getMenuButtonBoundingClientRect() -} +// function getMenuButtonBoundingClientRect() { +// if (process.env.TARO_ENV === 'h5') { +// return {top: 0, bottom: 44} +// } +// return Taro.getMenuButtonBoundingClientRect() +// } const Login: FC = () => { - const {statusBarHeight = 0} = Taro.getSystemInfoSync() - const bbc = getMenuButtonBoundingClientRect(); - const navHeight = bbc.bottom + (bbc.top - statusBarHeight) - statusBarHeight + // const {statusBarHeight = 0} = Taro.getSystemInfoSync() + // const bbc = getMenuButtonBoundingClientRect(); + // const navHeight = bbc.bottom + (bbc.top - statusBarHeight) - statusBarHeight const [isLoading, setLoading] = useState(false) const [error, setError] = useState(null) @@ -177,7 +177,7 @@ const Login: FC = () => { return ( - setCode(null)}> + setCode(null)}> {validateCode && } @@ -187,18 +187,20 @@ const Login: FC = () => { 请完成微信授权以继续使用! - + ) }