52 lines
1.4 KiB
JavaScript
52 lines
1.4 KiB
JavaScript
import { Image, Text, View } from "@tarojs/components"
|
|
import next from '@/images/next.png'
|
|
import './index.scss'
|
|
import { useState } from "react"
|
|
import Taro from "@tarojs/taro"
|
|
import backNav from '@/images/backNav.png'
|
|
import { useEffect } from "react"
|
|
import { CleanData, DelData } from "../../utils/storage"
|
|
import { navigateTo, redirectTo } from "../../utils/utils"
|
|
|
|
|
|
const Login = () => {
|
|
|
|
|
|
|
|
// 返回页面
|
|
const backFn = () => {
|
|
Taro.getCurrentPages().length > 0 && Taro.navigateBack()
|
|
}
|
|
|
|
|
|
const navAboutMe = () => {
|
|
Taro.navigateTo({
|
|
url: '/pages/about-me/index'
|
|
})
|
|
}
|
|
|
|
const loginOut = () => {
|
|
CleanData()
|
|
redirectTo('/pages/login/index')
|
|
}
|
|
|
|
return <View className="setting-frame h-screen text-base">
|
|
<View className='addr-detail-title'>
|
|
<Image src={backNav} className="square-35 absolute left-10 nav-icon" onClick={backFn} />
|
|
系统设置
|
|
</View>
|
|
<View className="setting-container">
|
|
<View className="flex-between setting-item" onClick={navAboutMe}>
|
|
<Text>关于我们</Text>
|
|
<Image src={next} className="next-icon" />
|
|
</View>
|
|
<View className="flex-between setting-item" onClick={loginOut}>
|
|
<Text>退出登陆</Text>
|
|
<Image src={next} className="next-icon" />
|
|
</View>
|
|
</View>
|
|
</View>
|
|
}
|
|
|
|
|
|
export default Login |