Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
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 1df16d64
authored
Mar 02, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
我的
1 parent
dbcee324
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
pages/tab/mine/mine.js
pages/tab/mine/mine.js
View file @
1df16d6
...
@@ -87,6 +87,7 @@ Page({
...
@@ -87,6 +87,7 @@ Page({
},
},
messageBoxPageIsRead
()
{
messageBoxPageIsRead
()
{
let
{
serviceMerchantId
}
=
this
.
data
let
{
serviceMerchantId
}
=
this
.
data
console
.
log
(
serviceMerchantId
,
'serviceMerchantId'
);
const
idx
=
this
.
data
.
boxItemList
.
findIndex
(
item
=>
item
.
name
==
'消息盒子'
)
const
idx
=
this
.
data
.
boxItemList
.
findIndex
(
item
=>
item
.
name
==
'消息盒子'
)
mineApi
mineApi
.
messageBoxPageIsRead
({
.
messageBoxPageIsRead
({
...
@@ -137,11 +138,16 @@ Page({
...
@@ -137,11 +138,16 @@ Page({
*/
*/
onLoad
:
async
function
(
options
)
{
onLoad
:
async
function
(
options
)
{
let
{
userInfo
}
=
wx
.
$storage
.
get
()
let
{
userInfo
}
=
wx
.
$storage
.
get
()
let
serviceMerchantId
=
userInfo
.
subLoginUser
.
merchantId
let
serviceMerchantId
=
userInfo
.
subLoginUser
.
merchantId
let
{
serviceMerchatList
}
=
await
getMockData
()
||
{
serviceMerchatList
:
[]
}
//解决因为使用await 异步导致数据没同步已经开始调用onshow方法
this
.
setData
({
this
.
setData
({
serviceMerchantId
,
serviceMerchantId
,
userInfo
:
userInfo
.
subLoginUser
,
userInfo
:
userInfo
.
subLoginUser
})
let
{
serviceMerchatList
}
=
await
getMockData
()
||
{
serviceMerchatList
:
[]
}
this
.
setData
({
isShowService
:
serviceMerchatList
.
includes
(
userInfo
.
merchantId
+
''
)
isShowService
:
serviceMerchatList
.
includes
(
userInfo
.
merchantId
+
''
)
})
})
console
.
log
(
serviceMerchantId
)
console
.
log
(
serviceMerchantId
)
...
...
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