Commit 0d6facd0 by 杨明

fixed

1 parent 45f3185f
......@@ -7,7 +7,7 @@ module.exports = {
...data
})
},
/**根据商户查询商户下级列表 */
/**查找二级流量方商户 */
secondFlow(data) {
return api.post({
method: `scrm.api.boutiquecoupon.partnermerchant.secondFlow`,
......
......@@ -43,12 +43,23 @@ const findSubordinateListByPage = (userInfo)=> {
USERAPI.findSubordinateListByPage({pageSize:10000,pageNum:1,merchantId:userInfo.merchantId,apiProjectName:'rop-merchants'}).then(res=>{
const list = res.data||[]
const merchant = list.map(i=>i.merchantNo)
setSubMerchant(merchant)
resolve()
})
})
}
/**查找二级流量方商户 */
const secondFlow = (userInfo)=> {
return new Promise(resolve=>{
USERAPI.secondFlow({merchantId:userInfo.merchantId}).then(res=>{
const list = res||{}
const merchant = list.merchantNoList||[]
resolve(merchant)
})
})
}
/**设置登录信息 */
const setLoginInfo = async (userInfo, sessionId) => {
if (!userInfo) {
......@@ -58,7 +69,8 @@ const setLoginInfo = async (userInfo, sessionId) => {
setUserInfo(userInfo)
setSessionId(sessionId)
try {
await findSubordinateListByPage(userInfo)
const merchant = await Promise.all([findSubordinateListByPage(userInfo),secondFlow(userInfo)])
setSubMerchant(merchant.flat())
} catch (error) {
}
loginSuccess()
......
......@@ -120,7 +120,7 @@
}
},
"setting": {
"urlCheck": true
"urlCheck": false
},
"projectname": "store-assistant-assemble"
}
\ No newline at end of file
......@@ -21,7 +21,7 @@ const systemInfo = wx.getSystemInfoSync()
const manual = false
const release = false
let index = 2
let index = 1
// 判断小程序环境
// develop:开发版(正常开发工具,测试时)
......@@ -110,7 +110,7 @@ const domain = {
dev: {
dj: 'https://dj.dev.glsx.com.cn',
scrm: 'https://scrm.dev.glsx.com.cn',
merchant: "https://rop-merchant.dev.glsx.com.cn",
merchant: "http://rop-merchant.dev.glsx.com.cn",
},
uat: {
dj: 'https://dj.test.glsx.com.cn',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!