职业素养功能修改

This commit is contained in:
2025-11-20 18:37:15 +08:00
parent c7f7fe3fd7
commit 555dd66a47
22 changed files with 261 additions and 2047 deletions

View File

@@ -62,36 +62,13 @@
onLoad(e) {
this.userId = e.userId;
this.name = e.name;
this.queryWechartToken();
this.queryKaShiToken();
},
methods: {
// 返回
goback() {
uni.navigateBack(-1);
},
async getUserInfor(){
const res = await api.getUserBasisInfo();
if (res.Result == 1) {
const data = res.Data.data;
if(data === null){
uni.showToast({
title: "请先完善个人信息",
duration:2000,
icon: "none"
})
setTimeout(() => {
uni.navigateTo({
url: "/packageCa/userCenter/fillInInformation"
})
}, 2000);
}
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
// 演示入
navDetail(index){
switch (index){
@@ -139,42 +116,15 @@
async queryKaShiToken() {
const res = await api.queryKaShiToken(this.userId,this.name)
if(res.Result == 1){
return res.Data;
let params = {
token:res.Data.token,
user: res.Data.userInfo
};
uni.setStorageSync('CAuserInfo',params);
}else {
return null
}
},
// 获取token
async queryWechartToken() {
uni.showLoading({
title: "加载中"
})
const data = await this.queryKaShiToken();
if(data.userInfo != null){
const res = await api.queryWechartToken(data.userInfo.Id,2268,1)
uni.hideLoading();
if(res.Result == 1){
let params = {
token:data.token,
user:data.userInfo,
userToken: res.Data.token
};
uni.setStorageSync('CAuserInfo',params);
this.getUserInfor();
}
}else {
uni.showToast({
title: "获取用户信息失败",
icon: "none"
})
setTimeout(()=>{
uni.reLaunch({
url: "/pages/index/index"
})
},1500)
}
}
}
}
</script>