yandu-pad/.gitignore | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
yandu-pad/src/pages/form/index.tsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
yandu-pad/src/pages/index/index.less | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
yandu-pad/src/pages/index/index.tsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
yandu-pad/.gitignore
@@ -5,3 +5,4 @@ node_modules/ .DS_Store .swc package-lock.json yandu-pad/src/pages/form/index.tsx
@@ -34,7 +34,7 @@ const response = await memberProfile({}); setUserInfo(response.data.detail); store.dispatch(setUser(response.data.detail)); } catch (e) {} } catch (e) { } Taro.stopPullDownRefresh(); }; useEffect(() => { yandu-pad/src/pages/index/index.less
@@ -39,6 +39,12 @@ &--content { padding-top: 126rpx; } &--logOut{ margin-right: 30rpx; font-size: 27rpx; display: flex; justify-content: flex-end; } } &__content { margin-top: -50rpx; yandu-pad/src/pages/index/index.tsx
@@ -6,6 +6,8 @@ import { Button, ConfigProvider, Popup } from "@nutui/nutui-react-taro"; import LineUpCard from "./components/LineUpCard"; import { Order, Undo } from "@nutui/icons-react-taro"; import { setUser,setToken } from "@/store/actions"; import store from "@/store/index"; import Logo from "@/assets/logo@2x.png"; import { getToken } from "@/utils/storage"; import { request } from "@/requests/request"; @@ -49,7 +51,7 @@ setIsLogin(getToken()); }); useLoad(() => {}); useLoad(() => { }); useShareAppMessage(() => { return { @@ -61,6 +63,15 @@ title: "这个小程序真有意思,速!", }; }); const logOut = () => { store.dispatch(setUser({})); store.dispatch(setToken('')); Taro.clearStorageSync(); Taro.reLaunch({ url: "/pages/index/index", }); }; return ( <View className="page-index"> @@ -83,6 +94,16 @@ }} userInfo={userInfo} /> <View className="page-index__header--logOut"> <View className="record-button" style={{ backgroundColor: "#fff", color: "#5a715a", width: "100rpx", }} onClick={logOut} >退出登录</View> </View> </View> )} </View>