Commit 0327907c by chenwq

密码正则;邀请销售

1 parent 8559b5f2
......@@ -52,21 +52,10 @@ const getInviteCode = data => {
)
}
// 查询商户详情
const getMerchantId = data => {
return api.post(
{
method: 'scrm.api.busassistant.merchant.getMerchantIdByMerchantNo',
...data
}
)
}
export default {
getCustomerList,
saveCustomer,
updateCustomer,
getEmployeeList,
getInviteCode,
getMerchantId
getInviteCode
}
\ No newline at end of file
......@@ -15,7 +15,6 @@ Page({
// 邀请销售
isPopupShow: false,
popupVal: '',
inviteMerchantId: '',
// 提示
isTipShow: false,
tipObj: {
......@@ -54,18 +53,6 @@ Page({
this.getList(true)
},
getMerchantId() {
let { customerInfo } = this.data
let params = {
merchantNos: customerInfo.merchantId
}
mineCustomerApi.getMerchantId(params).then(res => {
this.setData({
inviteMerchantId: res ? res[0]?.id : ''
})
})
},
getList(isReset = false) {
let { customerInfo } = this.data
mineCustomerApi.getEmployeeList({ merchantId: customerInfo.merchantId }).then(res => {
......@@ -83,7 +70,7 @@ Page({
// 获取邀请二维码和链接
getInviteCode() {
let { customerInfo, popupVal, inviteMerchantId } = this.data
let { customerInfo, popupVal } = this.data
let _this = this
let sceneStr = ''
let sceneToNum = {
......@@ -92,10 +79,6 @@ Page({
'SC003': 2,
'SC004': 3,
}
if (!inviteMerchantId) {
wx.$api.showToast('缺少商户号')
return true
}
if (!customerInfo.sceneList || !customerInfo.sceneList.length) {
wx.$api.showToast('缺少场景值')
return true
......@@ -105,7 +88,7 @@ Page({
sceneStr = sceneStr + (sceneStr ? (',' + sceneToNum[item]) : sceneToNum[item])
})
let params = {
merchantId: inviteMerchantId,
merchantId: customerInfo.merchantId,
staffLabel: sceneStr
}
mineCustomerApi.getInviteCode(params).then(res => {
......@@ -146,7 +129,6 @@ Page({
}
})
this.getList()
this.getMerchantId()
return true
}
wx.$router.getData(res => {
......@@ -154,7 +136,6 @@ Page({
customerInfo: res
})
this.getList()
this.getMerchantId()
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!