Commit 3f1cb536 by 张立顺

超管判断逻辑

1 parent 5facc217
...@@ -125,10 +125,15 @@ Component({ ...@@ -125,10 +125,15 @@ Component({
isEdit: true isEdit: true
} }
], ],
listObj listObj,
isSuper: false
}, },
attached() { attached() {
// this.initTime() // this.initTime()
let { userInfo } = wx.$storage.get()
this.setData({
isSuper: userInfo.isSuper
})
this.getMerchantCustomInfoList() this.getMerchantCustomInfoList()
}, },
/** /**
...@@ -191,7 +196,7 @@ Component({ ...@@ -191,7 +196,7 @@ Component({
}, },
changeStatus(e) { changeStatus(e) {
console.log(e) console.log(e)
let { customerList } = this.data let { customerList, isSuper } = this.data
let { index, item } = e.currentTarget.dataset let { index, item } = e.currentTarget.dataset
// let // let
let status = customerList[index].isEdit let status = customerList[index].isEdit
...@@ -200,7 +205,7 @@ Component({ ...@@ -200,7 +205,7 @@ Component({
// 提交客户信息更新 // 提交客户信息更新
// this.checkout(customerList[index]) // this.checkout(customerList[index])
// console.log('customerList[index]', customerList[index]) // console.log('customerList[index]', customerList[index])
this.submit(customerList[index]) !isSuper && this.submit(customerList[index])
} else { } else {
customerList[index]['isEdit'] = true customerList[index]['isEdit'] = true
this.setData({ this.setData({
......
...@@ -52,7 +52,7 @@ Page({ ...@@ -52,7 +52,7 @@ Page({
console.log(userInfo) console.log(userInfo)
this.setData({ this.setData({
userInfo, userInfo,
isSuper: userInfo.subLoginUser.isSuper isSuper: userInfo.isSuper
}) })
this.getMerchantRange() this.getMerchantRange()
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!