Commit 52a55213 by 张立顺

bug修改

1 parent c2b7072e
......@@ -33,6 +33,7 @@ Page({
USERAPI.logout().then(_res_ => {
wx.$storage.rm('sessionId')
wx.$storage.rm('auto_login_object')
wx.$storage.rm('userInfo')
wx.$router.go('login.index')
})
}
......
......@@ -56,10 +56,13 @@ Component({
}
// showNothingSceneCon: false
},
attached() {
this.initTime()
this.init()
lifetimes: {
attached() {
this.initTime()
this.init()
}
},
/**
* 组件的方法列表
*/
......@@ -125,50 +128,58 @@ Component({
})
},
getTotalMerchantCount(type) {
let { userInfo } = wx.$storage.get()
let { current } = this.data
// let { } = this.data
let { current, userInfo } = this.data
// let { merchantId } = userInfo.subLoginUser
// console.log('merchantId', merchantId)
console.log('test', userInfo.merchantId)
// console.log('test', userInfo.merchantId)
// debugger
// 默认返回2前两条的具体数据 剩下需要自己手动查询
// console.log(outputApi.partnerMerchantTotal)
outputApi
.partnerMerchantTotal({ merchantId: userInfo.merchantId })
.then(result => {
debugger
console.log(result)
// 44211548
try {
outputApi
.partnerMerchantTotal({ merchantId: userInfo.merchantId })
.then(result => {
// debugger
// console.log('result', result)
let { dataList, yqMerchantIds } = result
const list = yqMerchantIds.reduce((list, item, index) => {
let obj = {}
obj.totalMoney = dataList[index]?.totalMoney || 0
obj.totalOrder = dataList[index]?.totalOrder || 0
obj.merchantName = dataList[index].merchantName
obj.merchantId = item
obj.startInd =
dataList[index]?.sceneList.findIndex(item => {
return item != null
}) || -1
obj.showNothingSceneCon = item.startInd == -1
obj.showList = dataList[index]?.sceneList || []
// obj.norList = type?obj.
obj.norList = item.sceneList
let { dataList, yqMerchantIds } = result
const list = yqMerchantIds.reduce((list, item, index) => {
let obj = {}
obj.totalMoney = dataList[index]?.totalMoney || 0
obj.totalOrder = dataList[index]?.totalOrder || 0
obj.merchantName = dataList[index].merchantName
obj.merchantId = item
obj.startInd =
dataList[index]?.sceneList.findIndex(item => {
return item != null
}) || -1
obj.showNothingSceneCon = item.startInd == -1
obj.showList = dataList[index]?.sceneList || []
// obj.norList = type?obj.
obj.norList = item.sceneList
list.push(obj)
return list
}, [])
// console.log('list', list)
// this.
// this
// totalMoney = list[current].totalMoney
this.setData({
list,
yqMerchantIds,
totalMoney: list[current].totalMoney,
totalOrder: list[current].totalOrder
list.push(obj)
return list
}, [])
// console.log('list', list)
// this.
// this
// totalMoney = list[current].totalMoney
this.setData({
list,
yqMerchantIds,
totalMoney: list[current].totalMoney,
totalOrder: list[current].totalOrder
})
})
})
.catch(err => {})
.catch(err => {
console.log(err)
})
} catch (error) {
console.log(error)
}
},
handleSceneChange(e) {
console.log(e)
......
......@@ -70,6 +70,7 @@ Page({
merchantModule.init && merchantModule.init()
}
let { isSuper, userInfo } = this.data
console.log(isSuper)
// 判断是超管才需要切换账号
if (isSuper) {
USERAPI.adminSelectLogin()
......
......@@ -13,6 +13,7 @@ export function getUserInfo() {
return $Storage.get('userInfo')
}
export function setUserInfo(data) {
console.log(data)
$Storage.set('userInfo', data)
}
export function removeSystemStorage() {
......
......@@ -6,7 +6,7 @@ const target = ['ip', 'dev', 'uat', 'prod']
2测试
3生产
*/
const index = 1
const index = 2
const secretKey = {
ip: {},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!