Explorar o código

chore: 更改代码引入顺序

await hai 11 meses
pai
achega
ecb591d5af
Modificáronse 2 ficheiros con 19 adicións e 15 borrados
  1. 1 1
      src/pages/user/about/index.tsx
  2. 18 14
      src/pages/user/login/index.tsx

+ 1 - 1
src/pages/user/about/index.tsx

@@ -1,3 +1,4 @@
+import "./index.scss";
 import Flex from "@/component/flex";
 import Layout from "@/component/layout";
 import { PropsWithChildren, useContext, useMemo } from "react";
@@ -5,7 +6,6 @@ import { Image, View } from "@tarojs/components";
 import ImageUtil from "@/utils/imgUtils";
 import AppContext from "@/context/appContext";
 import Label from "@/component/label";
-import "./index.scss";
 
 interface IAboutProps {}
 

+ 18 - 14
src/pages/user/login/index.tsx

@@ -1,3 +1,4 @@
+import './index.scss'
 import UserApi from '@/apis/userApi';
 import Button from '@/component/button';
 import Flex from '@/component/flex';
@@ -14,7 +15,6 @@ import { Image, Radio, View, Icon } from '@tarojs/components';
 import Taro from '@tarojs/taro';
 import { useRequest } from 'ahooks';
 import { PropsWithChildren, useEffect, useState } from 'react';
-import './index.scss'
 
 interface ILoginProps {
 
@@ -53,19 +53,20 @@ const Login = (props: PropsWithChildren<ILoginProps>) => {
                     <View className='icon-back' onClick={() => {
                         RouteUtil.pop();
                     }
-                    }>
+                    }
+                    >
                     </View>
 
                 </Flex>
                 <Flex flex={1} >
                 </Flex>
-                <Flex alignItem="center" className='login-back-logo-wrap' >
+                <Flex alignItem='center' className='login-back-logo-wrap' >
                     <Image className='login-logo' src={require("@/assets/logo.png")} />
                 </Flex>
                 <Flex flex={2} />
                 <Padding padding={EdgeInsets.symmetric({ horizontal: 80 })} >
                     <Flex alignItem='center' rowGap={12} >
-                        <Button openType="getPhoneNumber" onGetPhoneNumber={async (e) => {
+                        <Button openType='getPhoneNumber' onGetPhoneNumber={async (e) => {
                             if (!value) {
                                 // 提示用户勾选协议
                                 // Message.error('请勾选协议');
@@ -102,30 +103,33 @@ const Login = (props: PropsWithChildren<ILoginProps>) => {
                                     }
                                 }
                             }
-                        }} fill >手机号快捷登录</Button>
+                        }} fill
+                        >手机号快捷登录</Button>
                         <SizeBox height={16} />
                         {
                             aggrement.data &&
                             <>
-                                <Flex direction="row" alignItem='center' style={{ whiteSpace: 'nowrap' }}  >
-                                    <Radio value={'2'}
-                                        className='radio-list__radio'
-                                        checked={value}
-                                        style={{ transform: 'scale(0.7)', fontSize: '14px' }}
-                                        onClick={
+                                <Flex direction='row' alignItem='center' style={{ whiteSpace: 'nowrap' }}  >
+                                    <Radio value='2'
+                                      className='radio-list__radio'
+                                      checked={value}
+                                      style={{ transform: 'scale(0.7)', fontSize: '14px' }}
+                                      onClick={
                                             () => {
                                                 setValue(!value)
                                             }
-                                        } color="#4063eb" >
+                                        } color='#4063eb'
+                                    >
                                     </Radio><View style='font-size:14px'>我已阅读并同意</View>
                                     {
                                         aggrement.data?.map((p, index) => {
                                             return (
                                                 <Label key={index}
-                                                    onClick={() => {
+                                                  onClick={() => {
                                                         RouteUtil.toWebViewPage({ url: p.url })
                                                     }}
-                                                    className='login-aggrement' size="sm" >《{p.name}》</Label>
+                                                  className='login-aggrement' size='sm'
+                                                >《{p.name}》</Label>
                                             )
                                         })
                                     }