优化页面

This commit is contained in:
pengxiaolong
2025-05-27 13:06:24 +08:00
parent 728dfd501f
commit cf8728f0d7
29 changed files with 357 additions and 137 deletions

View File

@@ -8,8 +8,12 @@
<view class="name">{{ userinfo.nickName }}</view>
</view>
<view class="Settings" @click="goSetting">
<image class="SettingsIcon" src="../../static/Settings.png" mode="scaleToFill"/>
</view>
<image class="SettingsIcon" src="../../static/Settings.png" mode="scaleToFill" />
</view>
</view>
<view>
<view class="logout" @click="logout">退出登录</view>
</view>
</view>
<view class="tabBar">
@@ -26,7 +30,7 @@ export default {
};
},
onShow() {
uni.getStorage({
uni.getStorage({
key: "userinfo",
success: (res) => {
this.userinfo = res.data;
@@ -35,10 +39,27 @@ export default {
},
methods: {
goSetting() {
uni.navigateTo({
url: '/pages/Setting/Setting'
});
},
uni.navigateTo({
url: "/pages/Setting/Setting",
});
},
logout() {
uni.removeStorage({
key: "chatInfo",
});
uni.removeStorage({
key: "userinfo",
});
uni.removeStorage({
key: "userSig",
});
uni.removeStorage({
key: "lastPage",
});
uni.reLaunch({
url: "/pages/login/login",
});
}
},
components: {
tabBar,
@@ -62,6 +83,7 @@ export default {
width: 100%;
}
.header {
background: #ffffff;
margin-left: 50rpx;
width: 100rpx;
height: 100rpx;