Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d0551243
authored
Mar 21, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
超管账号 进入小程序 默认开通所有场景
1 parent
3aaa20c9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
15 deletions
config.js
pages/accountItems/accountItems.js
pages/constant/data.js
pages/sceneIndex/sceneIndex.js
config.js
View file @
d055124
...
...
@@ -10,7 +10,7 @@
* 2测试
* 3生产环境
*/
export
let
env
=
3
export
let
env
=
2
// 配置预发布的小程序aapId
// export const preReleaseAppId = 'wx24ebae5768e74138'
...
...
pages/accountItems/accountItems.js
View file @
d055124
...
...
@@ -3,6 +3,7 @@ import api from '../../api/api.js'
const
app
=
getApp
()
import
{
getYQorderInfo
}
from
'~/store/index'
import
{
checkYqdSuper
}
from
'~/store/index'
import
constantData
from
'../constant/data'
Page
({
/**
* 页面的初始数据
...
...
@@ -139,10 +140,12 @@ Page({
let
{
loginUserInfoList
}
=
this
.
data
let
id
=
null
let
yqMerchantId
=
null
let
isSuper
=
null
loginUserInfoList
.
map
(
e
=>
{
if
(
e
.
active
)
{
yqMerchantId
=
e
.
merchantId
id
=
e
.
uuid
isSuper
=
e
.
isSuper
}
})
if
(
!
id
)
{
...
...
@@ -174,6 +177,14 @@ Page({
wx
.
$router
.
reLaunch
(
`
${
target
}
.
${
name
}
`
,
query
)
wx
.
$SCENE
=
null
}
else
{
// 超管默认开通所有场景
if
(
isSuper
)
{
// 0 会员权益/升级 1 精品升级
let
openSceneArr
=
constantData
.
sceneList
.
map
(
val
=>
{
return
val
?.
sceneType
})
wx
.
$util
.
setUserInfo
({
...
wx
.
$util
.
getUserInfo
(),
openSceneArr
})
wx
.
$router
.
reLaunch
(
'pages.sceneIndex'
)
return
}
// 获取开通的业务场景
api
.
getYqMerchantSceneConfigAPI
({
yqMerchantId
:
yqMerchantId
}).
then
(
res
=>
{
let
{
data
,
message
,
code
}
=
res
...
...
pages/constant/data.js
0 → 100644
View file @
d055124
const
sceneList
=
[
{
sceneName
:
'精品升级'
,
sceneDesc
:
'太阳膜升级转化下单'
,
sceneType
:
1
,
actived
:
false
},
{
sceneName
:
'会员权益/升级'
,
sceneDesc
:
'新车车损险下单'
,
sceneType
:
0
,
actived
:
false
}
]
export
default
{
sceneList
}
\ No newline at end of file
pages/sceneIndex/sceneIndex.js
View file @
d055124
// pages/sceneIndex/sceneIndex.js
import
logOutAPI
from
'../../tabMine/api'
import
constantData
from
'../constant/data'
const
app
=
getApp
()
Page
({
/**
...
...
@@ -7,20 +8,7 @@ Page({
*/
data
:
{
timeState
:
''
,
sceneList
:
[
{
sceneName
:
'精品升级'
,
sceneDesc
:
'太阳膜升级转化下单'
,
sceneType
:
1
,
actived
:
false
},
{
sceneName
:
'会员权益/升级'
,
sceneDesc
:
'新车车损险下单'
,
sceneType
:
0
,
actived
:
false
}
],
sceneList
:
constantData
.
sceneList
,
isShow
:
false
},
...
...
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