Commit 1df16d64 by chenwq

我的

1 parent dbcee324
......@@ -87,6 +87,7 @@ Page({
},
messageBoxPageIsRead() {
let { serviceMerchantId } = this.data
console.log(serviceMerchantId,'serviceMerchantId');
const idx = this.data.boxItemList.findIndex(item => item.name == '消息盒子')
mineApi
.messageBoxPageIsRead({
......@@ -137,11 +138,16 @@ Page({
*/
onLoad: async function (options) {
let { userInfo } = wx.$storage.get()
let serviceMerchantId = userInfo.subLoginUser.merchantId
let { serviceMerchatList } = await getMockData() || { serviceMerchatList: [] }
//解决因为使用await 异步导致数据没同步已经开始调用onshow方法
this.setData({
serviceMerchantId,
userInfo: userInfo.subLoginUser,
userInfo: userInfo.subLoginUser
})
let { serviceMerchatList } = await getMockData() || { serviceMerchatList: [] }
this.setData({
isShowService: serviceMerchatList.includes(userInfo.merchantId + '')
})
console.log(serviceMerchantId)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!