需求变更进行调整

This commit is contained in:
2026-01-30 09:01:38 +08:00
parent 44a4b33502
commit 79a21ff0a5
30 changed files with 1482 additions and 1707 deletions

View File

@@ -100,8 +100,7 @@
});
return;
}
let life = uni.getStorageSync('lifeData') || {}
let token = life.vuex_token
let token = this.$getToken()
let url = "/login/updateVerifyCode";
let encryptCode = rsaEncrypt(this.authCode);
this.$u.post(url, {
@@ -147,9 +146,9 @@
// #ifdef MP-WEIXIN
// 此处执行微信才执行
// #endif
uni.removeStorageSync('userInfo');
let token = this.$getToken();
let loginType = this.user.userType
let url = `/login/userInfo?loginType=${loginType}`;
let url = `/login/userInfo`;
this.$u.get(url, {}, {
'WT': token
}).then(obj => {
@@ -158,7 +157,8 @@
oaAuth: obj.data.oaAuth,
cusNo: obj.data.cusNo,
userName: obj.data.userName,
openId: obj.data.openId
openId: obj.data.openId,
subscribe: obj.data.subscribeMsg
})
});
}

View File

@@ -5,11 +5,11 @@
<view class="setting-content">
<u-cell-group>
<u-cell-item title="账号实名信息" @click="profile"></u-cell-item>
<!-- <u-cell-item title="订阅系统消息" :arrow="false">
<u-cell-item title="订阅系统消息" :arrow="false">
<u-switch v-model="longSubscribe" @change="toggleLongSubscribe" />
</u-cell-item> -->
</u-cell-item>
</u-cell-group>
</view>
@@ -30,6 +30,10 @@
},
onLoad() {
},
onShow(){
let user = uni.getStorageSync('userInfo');
this.longSubscribe = user.subscribe;
},
methods: {
profile() {
@@ -49,7 +53,7 @@
// 微信小程序专用
// #ifdef MP-WEIXIN
if (this.longSubscribe) {
const tmplIds = ['TEMPLATE_ID_1', 'TEMPLATE_ID_2'] // 在小程序后台配置的长期订阅模板
const tmplIds = ['ZVl9bkFv8Nzha2n_6wO36IBqe0H5VwJBvV-7OkVT5jo'] // 在小程序后台配置的长期订阅模板
wx.requestSubscribeMessage({
tmplIds,
success: (res) => {
@@ -89,6 +93,12 @@
saveLongSubscribeStatus(enable) {
// TODO: 后端保存用户长期订阅状态
console.log('保存长期订阅状态到后端', enable)
let token = this.$getToken();
let url = `/login/subscribeMsg?subscribe=${enable}`;
this.$u.get(url, {}, {
'WT': token
}).then(obj => {
});
}
}
}