修改了已知问题

This commit is contained in:
Ling53666
2025-05-16 09:58:51 +08:00
parent 7c371623eb
commit 74e97e9052
5 changed files with 116 additions and 32 deletions

View File

@ -1,4 +1,5 @@
const { checkLogin } = require('../../utils/logcheck');
import {url} from '../../request'
Page({
@ -12,8 +13,9 @@ Page({
url: '/pages/wodetuandui/wodetuandui',
})
},
onLoad(options) {
checkLogin();
},
onReady() {
@ -25,7 +27,7 @@ Page({
const userInfo = wx.getStorageSync('usermessage');
console.log('用户信息:', userInfo);
this.setData({
nickName: userInfo.nickName || '',
nickName: userInfo.nickName || '请登录',
phoneNumber: userInfo.phoneNumber || '',
invitationCode: userInfo.invitationCode || '',
userAvatar: userInfo.userAvatar || 'https://tse2-mm.cn.bing.net/th/id/OIP-C.jHUH4s7TQ48X_B-1iozuJgHaHa?w=207&h=207&c=7&r=0&o=5&dpr=1.5&pid=1.7'
@ -38,6 +40,57 @@ Page({
wx.navigateTo({
url: '/pages/wodejiedan/wodejiedan',
})
},
out(){
wx.showModal({
title: '提示',
content: '确定退出登录吗?',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定')
wx.getStorage({
key: "logmessage",
success(res) {
const userinfo = res.data.Authorization
wx.request({
url: url + '/userInfo/mini/logout',
method: 'GET',
data: {
},
header: {
'content-type': 'application/json',
'Authorization': userinfo
},
success(res) {
console.log('查询成功', res);
if(res.data.code==1){
wx.showToast({
title: "退出成功",
icon:'sucess',
duration:2000
})
}
},
fail(err) {
console.error('请求失败', err);
}
});
}
})
try {
wx.clearStorageSync();
console.log("所有缓存清除成功");
} catch (e) {
console.error("清除缓存失败", e);
}
} else {
console.log('用户点击取消')
}
}
})
},
onHide() {

View File

@ -110,18 +110,17 @@
</view>
</view>
<view class="flex-col section_8">
<view class="flex-row justify-between group_9">
<view class="flex-row items-end self-center">
<view class="flex-row justify-between items-center group_10">
<view class="flex-row items-center">
<image
class="shrink-0 image_7"
src="/image/8d2a546eff17d0f8759f0f3ea91c47bf.png"
class="shrink-0 image_10"
src="/image/4875fbdc868788e873dd606d7418f411.png"
/>
<text class="ml-16 font_2 text_17">账号设置</text>
<text class="ml-4 font_2 text_18">账号设置</text>
</view>
<image
class="self-start image_8 image_9"
class="image_8 image_11"
src="/image/jiatou.png"
mode="aspectFill"
/>
</view>
<view class="flex-row justify-between items-center group_10">
@ -137,17 +136,42 @@
src="/image/jiatou.png"
/>
</view>
<view class="flex-row justify-between items-center group_11" bind:tap="myteam">
<text class="font_4">我的团队</text>
<view class="flex-row justify-between items-center group_10" bind:tap="myteam">
<view class="flex-row items-center">
<image
class="shrink-0 image_10"
src="/image/4875fbdc868788e873dd606d7418f411.png"
/>
<text class="ml-4 font_2 text_18">我的团队</text>
</view>
<image
class="image_8"
class="image_8 image_11"
src="/image/jiatou.png"
/>
</view>
<view class="flex-row justify-between items-center group_11">
<text class="font_2 text_19">项目</text>
<view class="flex-row justify-between items-center group_10">
<view class="flex-row items-center">
<image
class="shrink-0 image_10"
src="/image/4875fbdc868788e873dd606d7418f411.png"
/>
<text class="ml-4 font_2 text_18">项目</text>
</view>
<image
class="image_8"
class="image_8 image_11"
src="/image/jiatou.png"
/>
</view>
<view class="flex-row justify-between items-center group_10" bind:tap="out">
<view class="flex-row items-center">
<image
class="shrink-0 image_10"
src="/image/4875fbdc868788e873dd606d7418f411.png"
/>
<text class="ml-4 font_2 text_18">退出登录</text>
</view>
<image
class="image_8 image_11"
src="/image/jiatou.png"
/>
</view>