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 6f2e41a3
authored
Apr 25, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
089669a9
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
237 additions
and
225 deletions
api/merchants.js
api/usersApi/UsersApi.js
login/lib/index.js
pages/tab/logout/logout.js
pages/tab/output/components/client/client.js
pages/tab/output/output.js
project.private.config.json
utils/cache/storageApi.js
utils/constantData.js
utils/request/environment.js
utils/request/request.js
api/merchants.js
0 → 100644
View file @
6f2e41a
import
api
from
'~/utils/request/request'
module
.
exports
=
{
/**根据商户查询商户下级列表 */
findSubordinateListByPage
(
data
)
{
return
api
.
post
({
method
:
`merchants.api.open.findSubordinateListByPage`
,
...
data
})
}
}
\ No newline at end of file
\ No newline at end of file
api/usersApi/UsersApi.js
View file @
6f2e41a
import
api
from
'~/utils/request/request'
import
api
from
'~/utils/request/request'
const
{
const
{
appId
appId
}
=
wx
.
getAccountInfoSync
().
miniProgram
}
=
wx
.
getAccountInfoSync
().
miniProgram
const
CODE
=
{
const
CODE
=
{
platformEntrance
:
'STORE_ASSISTANT_TOTAL'
,
platformEntrance
:
'STORE_ASSISTANT_TOTAL'
,
productCode
:
'PC00c5'
productCode
:
'PC00c5'
}
}
class
UsersApi
{
class
UsersApi
{
/**调用后台接口获取用户信息js_code换取sessionId */
/**调用后台接口获取用户信息js_code换取sessionId */
async
wxCodeLogin
()
{
async
wxCodeLogin
()
{
const
appEnter
=
wx
.
getEnterOptionsSync
()
const
appEnter
=
wx
.
getEnterOptionsSync
()
try
{
try
{
if
(
appEnter
.
scene
===
1154
&&
appEnter
.
mode
===
'singlePage'
)
throw
'login:fail rejected due to no permission currently'
if
(
appEnter
.
scene
===
1154
&&
appEnter
.
mode
===
'singlePage'
)
throw
'login:fail rejected due to no permission currently'
const
{
const
{
code
code
}
=
await
this
.
getWxCode
()
}
=
await
this
.
getWxCode
()
return
await
api
.
post
({
return
await
api
.
post
({
method
:
'scrm.api.sso.wechat.applets.jscode.login'
,
method
:
'scrm.api.sso.wechat.applets.jscode.login'
,
appId
,
appId
,
code
code
},
true
)
}
catch
(
error
)
{
console
.
log
(
error
)
return
Promise
.
reject
()
}
}
/**退出登录 */
logout
()
{
return
api
.
post
({
method
:
'scrm.api.sso.wechat.applets.logout'
},
true
)
}
/**调用接口获取登录凭证(code)。通过凭证进而换取用户登录态信息,包括用户在当前小程序的唯一标识(openid)、微信开放平台帐号下的唯一标识(unionid,若当前小程序已绑定到微信开放平台帐号)及本次登录的会话密钥(session_key)等。用户数据的加解密通讯需要依赖会话密钥完成。 */
getWxCode
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
login
({
success
:
res
=>
resolve
(
res
),
fail
:
err
=>
reject
(
err
)
})
})
}
/**授权手机号登录 */
async
authUserPhone
(
detail
,
loginToken
)
{
if
(
!
loginToken
)
{
wx
.
$api
.
showToast
(
'缺少loginToken'
)
Promise
.
reject
()
return
}
if
(
detail
.
errMsg
&&
detail
.
errMsg
==
'getPhoneNumber:fail user deny'
)
Promise
.
reject
()
delete
detail
.
errMsg
if
(
detail
.
iv
&&
detail
.
encryptedData
)
{
detail
.
loginToken
=
loginToken
return
api
.
post
({
method
:
'scrm.api.sso.wechat.applets.auth.phone'
,
...
detail
,
platformEntrance
:
'STORE_ASSISTANT_TOTAL'
// 平台标识:生意助手-STORE_ASSISTANT_TOTAL,门店助手-STORE_ASSISTANT,门店助手-店总版-STORE_ASSISTANT_TOTAL
},
true
)
}
else
Promise
.
reject
()
}
/**账号密码登录 */
async
accountLogin
(
data
=
{})
{
return
api
.
post
({
method
:
'scrm.api.sso.wechat.applets.password.login'
,
...
data
,
...
CODE
},
},
true
true
)
)
}
catch
(
error
)
{
}
console
.
log
(
error
)
/** 手机号获取短信验证码 */
return
Promise
.
reject
()
getSmsCode
(
mobile
)
{
}
return
api
.
post
({
}
method
:
'scrm.api.sso.wechat.applets.sms.get.code'
,
/**退出登录 */
mobile
logout
()
{
return
api
.
post
({
method
:
'scrm.api.sso.wechat.applets.logout'
},
true
)
}
/**调用接口获取登录凭证(code)。通过凭证进而换取用户登录态信息,包括用户在当前小程序的唯一标识(openid)、微信开放平台帐号下的唯一标识(unionid,若当前小程序已绑定到微信开放平台帐号)及本次登录的会话密钥(session_key)等。用户数据的加解密通讯需要依赖会话密钥完成。 */
getWxCode
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
login
({
success
:
res
=>
resolve
(
res
),
fail
:
err
=>
reject
(
err
)
})
})
}
/**授权手机号登录 */
async
authUserPhone
(
detail
,
loginToken
)
{
if
(
!
loginToken
)
{
wx
.
$api
.
showToast
(
'缺少loginToken'
)
Promise
.
reject
()
return
}
if
(
detail
.
errMsg
&&
detail
.
errMsg
==
'getPhoneNumber:fail user deny'
)
Promise
.
reject
()
delete
detail
.
errMsg
if
(
detail
.
iv
&&
detail
.
encryptedData
)
{
detail
.
loginToken
=
loginToken
return
api
.
post
({
method
:
'scrm.api.sso.wechat.applets.auth.phone'
,
...
detail
,
platformEntrance
:
'STORE_ASSISTANT_TOTAL'
// 平台标识:生意助手-STORE_ASSISTANT_TOTAL,门店助手-STORE_ASSISTANT,门店助手-店总版-STORE_ASSISTANT_TOTAL
},
},
true
true
)
)
}
else
Promise
.
reject
()
}
}
/** 手机号短信验证码登录 */
/**账号密码登录 */
phoneSmsLogin
(
data
=
{})
{
async
accountLogin
(
data
=
{})
{
return
api
.
post
({
return
api
.
post
({
method
:
'scrm.api.sso.wechat.applets.sms.login'
,
method
:
'scrm.api.sso.wechat.applets.password.login'
,
...
data
,
...
data
,
source
:
'MINIAPP'
,
...
CODE
platformEntrance
:
'STORE_ASSISTANT_TOTAL'
},
},
true
true
)
)
}
}
/** 手机号获取短信验证码 */
/** 获取登录账号列表 */
getSmsCode
(
mobile
)
{
getAccountList
(
sessionId
)
{
return
api
.
post
({
return
api
.
post
({
method
:
'scrm.api.sso.wechat.applets.sms.get.code'
,
method
:
'scrm.api.sso.wechat.applets.listSelectAccount'
,
mobile
...
CODE
,
},
sessionId
true
},
)
true
}
)
/** 手机号短信验证码登录 */
}
phoneSmsLogin
(
data
=
{})
{
/**
return
api
.
post
({
* 选择账号登录(手机绑定多个账号时) */
method
:
'scrm.api.sso.wechat.applets.sms.login'
,
selectAccountLogin
(
data
)
{
...
data
,
return
api
.
post
({
source
:
'MINIAPP'
,
method
:
'scrm.api.sso.wechat.applets.selectAccountLogin'
,
platformEntrance
:
'STORE_ASSISTANT_TOTAL'
...
CODE
,
},
...
data
true
},
)
true
}
)
/** 获取登录账号列表 */
}
getAccountList
(
sessionId
)
{
/**检查sessionId 是否过期 */
return
api
.
post
({
checkSession
()
{
method
:
'scrm.api.sso.wechat.applets.listSelectAccount'
,
return
api
.
post
({
...
CODE
,
method
:
'scrm.api.sso.login.status.check'
sessionId
},
},
true
true
)
)
}
}
/** 超级管理员切换账号 */
/**
adminSelectLogin
(
data
)
{
* 选择账号登录(手机绑定多个账号时) */
return
api
.
post
({
selectAccountLogin
(
data
)
{
method
:
'scrm.api.sso.super.administrator.select.login'
,
return
api
.
post
({
...
CODE
,
method
:
'scrm.api.sso.wechat.applets.selectAccountLogin'
,
...
data
...
CODE
,
}
...
data
// true
},
)
true
}
)
/** 超管切换子账号 */
}
switchSubLoginInfo
(
data
)
{
/**检查sessionId 是否过期 */
return
api
.
post
({
checkSession
()
{
method
:
'scrm.api.sso.wechat.applets.switch.subLoginInfo'
,
return
api
.
post
({
...
CODE
,
method
:
'scrm.api.sso.login.status.check'
...
data
},
})
true
}
)
/**获取微信用户信息 */
}
async
getWXUserInfo
()
{
/** 超级管理员切换账号 */
let
wx_user_info
=
wx
.
$storage
.
get
(
'wx_user_info'
)
adminSelectLogin
(
data
)
{
if
(
!
wx_user_info
)
{
return
api
.
post
({
const
data
=
await
this
.
getUserProfile
()
method
:
'scrm.api.sso.super.administrator.select.login'
,
wx
.
$storage
.
set
(
'wx_user_info'
,
data
)
...
CODE
,
return
data
...
data
}
else
return
wx_user_info
}
}
// true
/** 手机号授权解析(单纯解析内容返回前端)
)
* 只传loginToken就返回unionId和openid
}
* 传加密信息就解析手机号
/** 超管切换子账号 */
*/
switchSubLoginInfo
(
data
)
{
async
getUserProfile
(
loginToken
,
detail
=
{})
{
return
api
.
post
({
if
(
detail
.
errMsg
&&
detail
.
errMsg
==
'getPhoneNumber:fail user deny'
)
Promise
.
reject
()
method
:
'scrm.api.sso.wechat.applets.switch.subLoginInfo'
,
delete
detail
.
errMsg
...
CODE
,
if
(
!
loginToken
)
{
...
data
let
res
=
await
this
.
wxCodeLogin
()
})
loginToken
=
res
.
data
}
}
/**获取微信用户信息 */
detail
.
loginToken
=
loginToken
async
getWXUserInfo
()
{
return
api
.
post
({
let
wx_user_info
=
wx
.
$storage
.
get
(
'wx_user_info'
)
method
:
'scrm.api.sso.wechat.applets.phone.grant.analysis'
,
if
(
!
wx_user_info
)
{
...
detail
,
const
data
=
await
this
.
getUserProfile
()
platformEntrance
:
'STORE_ASSISTANT_TOTAL'
wx
.
$storage
.
set
(
'wx_user_info'
,
data
)
})
return
data
}
}
else
return
wx_user_info
// 登录自动创建服务中心
}
initServiceCenter
(
data
)
{
/** 手机号授权解析(单纯解析内容返回前端)
return
api
.
post
(
* 只传loginToken就返回unionId和openid
{
* 传加密信息就解析手机号
method
:
'scrm.api.busassistant.serviceCenter.init'
,
*/
...
data
async
getUserProfile
(
loginToken
,
detail
=
{})
{
}
if
(
detail
.
errMsg
&&
detail
.
errMsg
==
'getPhoneNumber:fail user deny'
)
Promise
.
reject
()
)
delete
detail
.
errMsg
}
if
(
!
loginToken
)
{
let
res
=
await
this
.
wxCodeLogin
()
/**根据商户查询商户下级列表 */
loginToken
=
res
.
data
findSubordinateListByPage
(
data
)
{
}
return
api
.
post
({
detail
.
loginToken
=
loginToken
method
:
`merchants.api.open.findSubordinateListByPage`
,
return
api
.
post
({
...
data
,
method
:
'scrm.api.sso.wechat.applets.phone.grant.analysis'
,
...
detail
,
},
false
,
'merchant'
)
platformEntrance
:
'STORE_ASSISTANT_TOTAL'
}
})
}
// 登录自动创建服务中心
initServiceCenter
(
data
)
{
return
api
.
post
(
{
method
:
'scrm.api.busassistant.serviceCenter.init'
,
...
data
}
)
}
}
}
export
default
UsersApi
export
default
UsersApi
\ No newline at end of file
\ No newline at end of file
login/lib/index.js
View file @
6f2e41a
import
{
import
{
setSessionId
,
setSessionId
,
setUserInfo
setUserInfo
,
setSubMerchant
}
from
'~/utils/cache/storageApi'
}
from
'~/utils/cache/storageApi'
import
USERAPI
from
'~/api/usersApi/index'
import
USERAPI
from
'~/api/usersApi/index'
const
setRouteData
=
targetPath
=>
{
const
setRouteData
=
targetPath
=>
{
...
@@ -32,21 +33,34 @@ const selectAccountLogin = ({
...
@@ -32,21 +33,34 @@ const selectAccountLogin = ({
message
message
})
=>
{
})
=>
{
if
(
code
==
'0'
)
{
if
(
code
==
'0'
)
{
console
.
log
(
data
)
setLoginInfo
(
data
.
loginUserInfoList
[
0
],
data
.
sessionId
)
setLoginInfo
(
data
.
loginUserInfoList
[
0
],
data
.
sessionId
)
}
else
wx
.
$api
.
showToast
(
message
||
'系统异常'
)
}
else
wx
.
$api
.
showToast
(
message
||
'系统异常'
)
})
})
}
}
/**获取门店号下的全部门店 */
const
findSubordinateListByPage
=
(
userInfo
)
=>
{
return
new
Promise
(
resolve
=>
{
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
setLoginInfo
=
(
userInfo
,
sessionId
)
=>
{
const
setLoginInfo
=
async
(
userInfo
,
sessionId
)
=>
{
if
(
!
userInfo
)
{
if
(
!
userInfo
)
{
wx
.
$api
.
showToast
(
'
仅支持服务商类型账户登录
'
)
wx
.
$api
.
showToast
(
'
账户错误
'
)
return
return
}
}
// 自动创建服务中心
// initServiceCenter()
setUserInfo
(
userInfo
)
setUserInfo
(
userInfo
)
setSessionId
(
sessionId
)
setSessionId
(
sessionId
)
try
{
await
findSubordinateListByPage
(
userInfo
)
}
catch
(
error
)
{
}
loginSuccess
()
loginSuccess
()
}
}
const
initServiceCenter
=
()
=>
{
const
initServiceCenter
=
()
=>
{
...
...
pages/tab/logout/logout.js
View file @
6f2e41a
...
@@ -37,6 +37,7 @@ Page({
...
@@ -37,6 +37,7 @@ Page({
// wx.$storage.rm('fileList')
// wx.$storage.rm('fileList')
wx
.
$storage
.
rm
(
'sessionId'
)
wx
.
$storage
.
rm
(
'sessionId'
)
wx
.
$storage
.
rm
(
'userInfo'
)
wx
.
$storage
.
rm
(
'userInfo'
)
wx
.
$storage
.
rm
(
'subMerchant'
)
wx
.
$storage
.
rm
(
'auto_login_object'
)
wx
.
$storage
.
rm
(
'auto_login_object'
)
wx
.
$storage
.
rm
(
'posterId'
)
wx
.
$storage
.
rm
(
'posterId'
)
wx
.
$storage
.
rm
(
"mock_data"
)
wx
.
$storage
.
rm
(
"mock_data"
)
...
...
pages/tab/output/components/client/client.js
View file @
6f2e41a
...
@@ -83,53 +83,16 @@ Component({
...
@@ -83,53 +83,16 @@ Component({
crowdOrderObj
:
{}
crowdOrderObj
:
{}
})
})
},
},
// 众筹数据处理
dealCrowdObj
(
data
)
{
let
_obj
=
{
totalNum
:
data
.
activityTotal
,
totalOrderCount
:
data
.
orderTotal
,
totalAmount
:
data
.
totalAmount
,
activityList
:
data
.
activityList
||
[]
}
_obj
.
activityList
.
forEach
(
k
=>
{
// 时间
k
.
time
=
k
.
startTime
.
slice
(
0
,
16
).
replace
(
/-/g
,
'.'
)
+
' - '
+
k
.
endTime
.
slice
(
0
,
16
).
replace
(
/-/g
,
'.'
)
let
startTimeFormat
=
k
.
startTime
.
slice
(
0
,
10
).
replace
(
/-/g
,
'/'
)
+
' 00:00:00'
let
nowDateFormat
=
new
Date
().
toLocaleDateString
().
replace
(
/-/g
,
'/'
)
+
' 23:59:59'
// activityStatus 1:未开始 2:进行中 3:已结束
switch
(
k
.
activityStatus
)
{
case
1
:
k
.
interDays
=
parseInt
((
new
Date
(
startTimeFormat
).
getTime
()
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
realTime
=
'-'
break
case
2
:
let
endTimeFormat
=
k
.
endTime
.
slice
(
0
,
10
).
replace
(
/-/g
,
'/'
)
+
' 23:59:59'
k
.
interDays
=
parseInt
((
new
Date
().
getTime
()
-
new
Date
(
startTimeFormat
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
toEndDays
=
parseInt
((
new
Date
(
endTimeFormat
).
getTime
()
-
new
Date
(
nowDateFormat
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
realTime
=
k
.
realStartTime
?.
slice
(
0
,
16
).
replace
(
/-/g
,
'.'
)
+
' - '
+
'已开始'
+
k
.
interDays
+
'天'
break
case
3
:
k
.
interDays
=
parseInt
((
new
Date
(
nowDateFormat
).
getTime
()
-
new
Date
(
k
.
endTime
.
replace
(
/-/g
,
'/'
)).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
realTime
=
(
k
.
realStartTime
?.
slice
(
0
,
16
).
replace
(
/-/g
,
'.'
)
||
''
)
+
' - '
+
(
k
.
realEndTime
?.
slice
(
0
,
16
).
replace
(
/-/g
,
'.'
)
||
''
)
break
}
})
this
.
setData
({
crowdOrderObj
:
_obj
})
},
getBusiStatistics
(
isReset
=
false
,
isBusiTab
=
false
)
{
getBusiStatistics
(
isReset
=
false
,
isBusiTab
=
false
)
{
let
sortTabModule
=
this
.
selectComponent
(
'#sortTab'
)
let
sortTabModule
=
this
.
selectComponent
(
'#sortTab'
)
if
(
sortTabModule
&&
isBusiTab
)
{
if
(
sortTabModule
&&
isBusiTab
)
{
sortTabModule
.
resetAllAsc
()
sortTabModule
.
resetAllAsc
()
}
}
let
sortSearchData
=
sortTabModule
?
sortTabModule
.
dealParams
()
:
{}
let
sortSearchData
=
sortTabModule
?
sortTabModule
.
dealParams
()
:
{}
let
{
userInfo
}
=
wx
.
$storage
.
get
()
let
{
subMerchant
}
=
wx
.
$storage
.
get
()
let
params
=
{
let
params
=
{
...
sortSearchData
,
...
sortSearchData
,
merchantIds
:
userInfo
.
subLoginUser
.
permissionMerchantIds
,
merchantIds
:
subMerchant
,
}
}
outputApi
.
getBusiStatistics
(
params
).
then
(
res
=>
{
outputApi
.
getBusiStatistics
(
params
).
then
(
res
=>
{
this
.
resetBusiData
()
this
.
resetBusiData
()
...
...
pages/tab/output/output.js
View file @
6f2e41a
...
@@ -55,7 +55,7 @@ Page({
...
@@ -55,7 +55,7 @@ Page({
init
()
{
init
()
{
this
.
setUserInfo
()
this
.
setUserInfo
()
this
.
getMerchantRange
()
this
.
getMerchantRange
()
this
.
getMockInfo
()
//
this.getMockInfo()
},
},
setUserInfo
()
{
setUserInfo
()
{
let
{
userInfo
}
=
wx
.
$storage
.
get
()
let
{
userInfo
}
=
wx
.
$storage
.
get
()
...
...
project.private.config.json
View file @
6f2e41a
...
@@ -119,6 +119,8 @@
...
@@ -119,6 +119,8 @@
]
]
}
}
},
},
"setting"
:
{},
"setting"
:
{
"urlCheck"
:
false
},
"projectname"
:
"store-assistant-assemble"
"projectname"
:
"store-assistant-assemble"
}
}
\ No newline at end of file
\ No newline at end of file
utils/cache/storageApi.js
View file @
6f2e41a
...
@@ -12,6 +12,12 @@ export function setSessionId(sessionId) {
...
@@ -12,6 +12,12 @@ export function setSessionId(sessionId) {
export
function
getUserInfo
()
{
export
function
getUserInfo
()
{
return
$Storage
.
get
(
'userInfo'
)
return
$Storage
.
get
(
'userInfo'
)
}
}
export
function
getSubMerchant
()
{
return
$Storage
.
get
(
'subMerchant'
)
}
export
function
setSubMerchant
(
data
)
{
$Storage
.
set
(
'subMerchant'
,
data
)
}
export
function
setUserInfo
(
data
)
{
export
function
setUserInfo
(
data
)
{
console
.
log
(
data
)
console
.
log
(
data
)
$Storage
.
set
(
'userInfo'
,
data
)
$Storage
.
set
(
'userInfo'
,
data
)
...
...
utils/constantData.js
View file @
6f2e41a
export
const
IMG_URL
=
'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/'
export
const
IMG_URL
=
'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/'
export
const
IMG_URL_STORE
=
'https://img02.glsx.com.cn/weapp/resource/miniprogram/'
export
const
IMG_URL_STORE
=
'https://img02.glsx.com.cn/weapp/resource/miniprogram/'
// 缓存get方法为空的默认指定值
// 缓存get方法为空的默认指定值
export
const
DEFAULT_GET_STORAGEKEY
=
[
'sessionId'
,
'merchantId'
,
'userInfo'
]
export
const
DEFAULT_GET_STORAGEKEY
=
[
'sessionId'
,
'merchantId'
,
'userInfo'
,
'subMerchant'
]
// 缓存get方法key的对应才映射值
// 缓存get方法key的对应才映射值
export
const
STORAGE_OBJECTkEY
=
{
export
const
STORAGE_OBJECTkEY
=
{
...
@@ -18,7 +18,8 @@ export const STORAGE_OBJECTkEY = {
...
@@ -18,7 +18,8 @@ export const STORAGE_OBJECTkEY = {
disLikeRecordFlag
:
'disLikeRecordFlag'
,
disLikeRecordFlag
:
'disLikeRecordFlag'
,
fileList
:
'fileList'
,
fileList
:
'fileList'
,
posterId
:
'posterId'
,
posterId
:
'posterId'
,
mock_data
:
'mock_data'
mock_data
:
'mock_data'
,
subMerchant
:
'subMerchant'
}
}
export
const
IMG_VERSION
=
()
=>
{
export
const
IMG_VERSION
=
()
=>
{
...
...
utils/request/environment.js
View file @
6f2e41a
...
@@ -111,19 +111,23 @@ const domain = {
...
@@ -111,19 +111,23 @@ 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://rop-merchant.dev.glsx.com.cn"
,
},
},
uat
:
{
uat
:
{
dj
:
'https://dj.test.glsx.com.cn'
,
dj
:
'https://dj.test.glsx.com.cn'
,
scrm
:
'https://scrm.test.glsx.com.cn'
scrm
:
'https://scrm.test.glsx.com.cn'
,
merchant
:
"https://rop-merchant.test.glsx.com.cn"
},
},
prod
:
{
prod
:
{
dj
:
'https://dj.glsx.com.cn'
,
dj
:
'https://dj.glsx.com.cn'
,
scrm
:
'https://scrm.glsx.com.cn'
scrm
:
'https://scrm.glsx.com.cn'
,
merchant
:
"https://commodity.glsx.com.cn"
},
},
preRelease
:
{
preRelease
:
{
dj
:
'https://dj.beta.glsx.com.cn'
,
dj
:
'https://dj.beta.glsx.com.cn'
,
scrm
:
'https://scrm.beta.glsx.com.cn'
scrm
:
'https://scrm.beta.glsx.com.cn'
,
merchant
:
"https://rop-merchant.beta.glsx.com.cn"
}
}
}[
target
[
index
]]
}[
target
[
index
]]
...
@@ -145,7 +149,8 @@ const pathEnum = {
...
@@ -145,7 +149,8 @@ const pathEnum = {
business
:
'/rop-scrm-entmicro/'
,
business
:
'/rop-scrm-entmicro/'
,
stoassistant
:
'/rop-scrm-stoassistant/'
,
stoassistant
:
'/rop-scrm-stoassistant/'
,
assistant
:
'/rop-scrm-stoassistant/'
,
assistant
:
'/rop-scrm-stoassistant/'
,
busassistant
:
'/rop-scrm-busassistant/'
busassistant
:
'/rop-scrm-busassistant/'
,
'rop-merchants'
:
'/rop-merchants/'
}
}
const
defaultMerchantId
=
{
const
defaultMerchantId
=
{
ip
:
'44184606'
,
ip
:
'44184606'
,
...
...
utils/request/request.js
View file @
6f2e41a
...
@@ -45,6 +45,7 @@ class Request {
...
@@ -45,6 +45,7 @@ class Request {
if
(
code
==
20
||
code
==
21
)
{
if
(
code
==
20
||
code
==
21
)
{
wx
.
$storage
.
rm
(
'sessionId'
)
wx
.
$storage
.
rm
(
'sessionId'
)
wx
.
$storage
.
rm
(
'userInfo'
)
wx
.
$storage
.
rm
(
'userInfo'
)
wx
.
$storage
.
rm
(
'subMerchant'
)
const
thisPage
=
wx
.
$router
.
getPageInstance
(),
const
thisPage
=
wx
.
$router
.
getPageInstance
(),
autoLoginObject
=
wx
.
$storage
.
get
(
'auto_login_object'
)
autoLoginObject
=
wx
.
$storage
.
get
(
'auto_login_object'
)
if
(
thisPage
.
route
==
'login/loading/loading'
)
{
if
(
thisPage
.
route
==
'login/loading/loading'
)
{
...
...
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