Commit 52a55213 by 张立顺

bug修改

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