Commit 0d6facd0 by 杨明

fixed

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