Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
hmd
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 f2930326
authored
Jul 16, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加默认门店
1 parent
80be028e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
api/env/index.js
api/request/http.js
pages/loading/loading.js
api/env/index.js
View file @
f293032
...
@@ -106,10 +106,9 @@ const pathEnum = {
...
@@ -106,10 +106,9 @@ const pathEnum = {
busassistant
:
'/rop-scrm-busassistant/'
busassistant
:
'/rop-scrm-busassistant/'
}
}
const
defaultMerchantId
=
{
const
defaultMerchantId
=
{
ip
:
'44184606'
,
ip
:
'44210895'
,
dev
:
'44184606'
,
dev
:
'44210895'
,
uat
:
'44184606'
,
uat
:
'44210895'
,
preRelease
:
'44184606'
,
prod
:
'44189923'
prod
:
'44189923'
}[
target
[
index
]]
}[
target
[
index
]]
module
.
exports
=
{
module
.
exports
=
{
...
...
api/request/http.js
View file @
f293032
import
{
import
{
defaultMerchantId
,
secretKey
,
secretKey
,
pathEnum
,
pathEnum
,
domain
,
domain
,
...
@@ -32,8 +33,7 @@ class Request {
...
@@ -32,8 +33,7 @@ class Request {
let
header
=
RequestMethods
===
'POST'
?
{
let
header
=
RequestMethods
===
'POST'
?
{
'content-type'
:
'application/x-www-form-urlencoded'
'content-type'
:
'application/x-www-form-urlencoded'
}
:
{
'Cache-Control'
:
'no-cache'
}
}
:
{
'Cache-Control'
:
'no-cache'
}
// const merchantId = wx.p.util.getStorageSync('srcm_shopmall_merchant_id')
header
.
merchantId
=
defaultMerchantId
// if (merchantId) header.merchantId = merchantId
let
projectName
=
this
.
getRopProject
(
params
.
method
)
let
projectName
=
this
.
getRopProject
(
params
.
method
)
if
(
!
projectName
)
projectName
=
this
.
getRopProject
(
params
.
method
)
if
(
!
projectName
)
projectName
=
this
.
getRopProject
(
params
.
method
)
const
path
=
pathEnum
[
projectName
]
const
path
=
pathEnum
[
projectName
]
...
...
pages/loading/loading.js
View file @
f293032
...
@@ -21,7 +21,7 @@ Page({
...
@@ -21,7 +21,7 @@ Page({
message
message
}
=
await
wx
.
p
.
api
.
userApi
.
login
()
}
=
await
wx
.
p
.
api
.
userApi
.
login
()
wx
.
$authStatus
=
code
!=
0
wx
.
$authStatus
=
code
!=
0
if
(
data
)
wx
.
setStorageSync
(
'merchant_info'
,
{
if
(
data
)
wx
.
p
.
storage
.
set
(
'merchant_info'
,
{
merchantId
:
data
.
merchantId
,
merchantId
:
data
.
merchantId
,
merchantName
:
data
.
merchantName
merchantName
:
data
.
merchantName
})
})
...
...
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