Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
store-assistant-assemble
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0d6facd0
authored
Jun 12, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
45f3185f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
6 deletions
api/merchants.js
login/lib/index.js
project.private.config.json
utils/request/environment.js
api/merchants.js
View file @
0d6facd
...
@@ -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`
,
...
...
login/lib/index.js
View file @
0d6facd
...
@@ -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
()
...
...
project.private.config.json
View file @
0d6facd
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
}
}
},
},
"setting"
:
{
"setting"
:
{
"urlCheck"
:
tru
e
"urlCheck"
:
fals
e
},
},
"projectname"
:
"store-assistant-assemble"
"projectname"
:
"store-assistant-assemble"
}
}
\ No newline at end of file
\ No newline at end of file
utils/request/environment.js
View file @
0d6facd
...
@@ -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
:
"http
s
://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'
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment