|
@@ -69,6 +69,12 @@
|
|
|
<view class="flex-sub margin-left text-df" style="line-height: 50upx">{{ list[0].title }}</view>
|
|
<view class="flex-sub margin-left text-df" style="line-height: 50upx">{{ list[0].title }}</view>
|
|
|
<image src="../../static/images/my/right.png" class="images" mode=""></image>
|
|
<image src="../../static/images/my/right.png" class="images" mode=""></image>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <!-- 订阅消息配置 -->
|
|
|
|
|
+ <view class="flex padding-lr padding-tb dfs" v-if="userId">
|
|
|
|
|
+ <image src="../../static/images/my/dianpu.png" style="width: 50rpx; height: 50rpx" mode=""></image>
|
|
|
|
|
+ <view class="flex-sub margin-left text-df" style="line-height: 50upx">订阅消息配置</view>
|
|
|
|
|
+ <switch color="#1677ff" :checked="isChecked" @change="switchChange" />
|
|
|
|
|
+ </view>
|
|
|
<!-- 商品管理 -->
|
|
<!-- 商品管理 -->
|
|
|
<view class="flex padding-lr padding-tb dfs" @click="goNavs(list[1].url)">
|
|
<view class="flex padding-lr padding-tb dfs" @click="goNavs(list[1].url)">
|
|
|
<image :src="list[1].image" style="width: 50rpx; height: 50rpx" mode=""></image>
|
|
<image :src="list[1].image" style="width: 50rpx; height: 50rpx" mode=""></image>
|
|
@@ -310,7 +316,9 @@ export default {
|
|
|
closeable: true,
|
|
closeable: true,
|
|
|
open: true,
|
|
open: true,
|
|
|
arr: [],
|
|
arr: [],
|
|
|
- messageCount: ''
|
|
|
|
|
|
|
+ messageCount: '',
|
|
|
|
|
+ isChecked: false,
|
|
|
|
|
+ userId: ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
@@ -363,6 +371,7 @@ export default {
|
|
|
// }
|
|
// }
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
|
|
+ this.userId = uni.getStorageSync('userId')
|
|
|
this.shopToken = uni.getStorageSync('shopToken') ? uni.getStorageSync('shopToken') : ''
|
|
this.shopToken = uni.getStorageSync('shopToken') ? uni.getStorageSync('shopToken') : ''
|
|
|
if (this.shopToken) {
|
|
if (this.shopToken) {
|
|
|
this.messageCount = uni.getStorageSync('messageCount')
|
|
this.messageCount = uni.getStorageSync('messageCount')
|
|
@@ -379,9 +388,27 @@ export default {
|
|
|
this.monthMoney = 0 //本月收益
|
|
this.monthMoney = 0 //本月收益
|
|
|
this.cashMoney = 0 //本月提现
|
|
this.cashMoney = 0 //本月提现
|
|
|
}
|
|
}
|
|
|
|
|
+ if (this.userId) {
|
|
|
|
|
+ this.getSetData()
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
-
|
|
|
|
|
|
|
+ getSetData() {
|
|
|
|
|
+ // 获取订阅消息配置
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ shopId: uni.getStorageSync('shopId')
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$Request.getT('/app/goods/selectGoodShop', data).then((res) => {
|
|
|
|
|
+ // console.log(res, '666')
|
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
|
+ if (res.data.messageConfiguration == 1) {
|
|
|
|
|
+ this.isChecked = false
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.isChecked = true
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
previewImage() {
|
|
previewImage() {
|
|
|
var arr = []
|
|
var arr = []
|
|
|
arr.push(this.shopQrImg)
|
|
arr.push(this.shopQrImg)
|
|
@@ -414,9 +441,9 @@ export default {
|
|
|
// this.checked = res.data.isSendMsg == null || res.data.isSendMsg == 1 ? true : false
|
|
// this.checked = res.data.isSendMsg == null || res.data.isSendMsg == 1 ? true : false
|
|
|
// }
|
|
// }
|
|
|
// });
|
|
// });
|
|
|
- var shopid=urlSafeBase64Encode(encrypt(uni.getStorageSync('shopId').toString()))
|
|
|
|
|
|
|
+ var shopid = urlSafeBase64Encode(encrypt(uni.getStorageSync('shopId').toString()))
|
|
|
this.shopQrImg = configurl.APIHOSTsss + '/sqx_fast/invite/shopQr?shopId=' + shopid
|
|
this.shopQrImg = configurl.APIHOSTsss + '/sqx_fast/invite/shopQr?shopId=' + shopid
|
|
|
- console.log(this.shopQrImg,'oooo')
|
|
|
|
|
|
|
+ console.log(this.shopQrImg, 'oooo')
|
|
|
},
|
|
},
|
|
|
//跳转用户端
|
|
//跳转用户端
|
|
|
gouser() {
|
|
gouser() {
|
|
@@ -433,7 +460,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
//跳转供货商
|
|
//跳转供货商
|
|
|
- goGong(){
|
|
|
|
|
|
|
+ goGong() {
|
|
|
wx.navigateToMiniProgram({
|
|
wx.navigateToMiniProgram({
|
|
|
appId: 'wx45ab46867002aa0b',
|
|
appId: 'wx45ab46867002aa0b',
|
|
|
path: '/pages/index/shopList/indexShop',
|
|
path: '/pages/index/shopList/indexShop',
|
|
@@ -696,7 +723,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
getUserInfo() {
|
|
getUserInfo() {
|
|
|
this.$Request.getA('/sys/user/info').then((res) => {
|
|
this.$Request.getA('/sys/user/info').then((res) => {
|
|
|
- console.log(res,'ljh')
|
|
|
|
|
|
|
+ console.log(res, 'ljh')
|
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
|
this.shopName = res.user.shopList[0].shopName
|
|
this.shopName = res.user.shopList[0].shopName
|
|
|
this.shopCover = res.user.shopList[0].shopCover ? res.user.shopList[0].shopCover : '../../static/logo.png'
|
|
this.shopCover = res.user.shopList[0].shopCover ? res.user.shopList[0].shopCover : '../../static/logo.png'
|
|
@@ -711,6 +738,27 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+ },
|
|
|
|
|
+ // switch切换回调
|
|
|
|
|
+ switchChange(e) {
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ shopId: uni.getStorageSync('shopId'),
|
|
|
|
|
+ messageConfiguration: e.detail.value ? 0 : 1
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.$Request.postJson('/app/goods/updateGoodShop', data).then((res) => {
|
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: this.isChecked ? '关闭成功' : '开启成功',
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ mask: true
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.getSetData()
|
|
|
|
|
+ }, 1500)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|