mirror of
http://36.133.248.69:3088/admin/RentWeAppFront.git
synced 2026-03-07 17:32:25 +08:00
需求变更进行调整
This commit is contained in:
@@ -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 => {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user