Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0f4c85cd
authored
Jun 20, 2025
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复学习任务频繁弹窗问题
1 parent
7185ba53
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
11 deletions
components/HomeFrame/components/Income/MyStore.vue
components/HomeFrame/components/LeftSide.vue
utils/cache/constantData.js
components/HomeFrame/components/Income/MyStore.vue
View file @
0f4c85c
...
...
@@ -330,14 +330,21 @@ export default {
if
(
res
&&
res
.
commissions
)
{
const
commissions
=
res
.
commissions
.
find
(
i
=>
i
.
configType
==
3
)
const
commissionsOther
=
res
.
commissions
.
filter
(
i
=>
i
.
configType
==
1
)
this
.
commissionsInfoQG
=
[]
console
.
log
(
commissionsOther
,
'commissionsInfoQG'
)
commissionsOther
.
forEach
(
i
=>
{
this
.
commissionsInfoQG
=
[...
this
.
commissionsInfoQG
,
...(
i
.
nscene0PenetrationRateGoodsCommissions
||
[])]
})
console
.
log
(
this
.
commissionsInfoQG
,
'commissionsInfoQG'
)
this
.
scene0PenetrationRateCommissions
=
commissions
?.
scene0PenetrationRateCommissions
||
[]
this
.
getCommissionsInfo
()
if
(
commissions
||
commissionsOther
.
length
>
0
)
{
this
.
commissionsInfoQG
=
[]
console
.
log
(
commissionsOther
,
'commissionsInfoQG'
)
commissionsOther
.
forEach
(
i
=>
{
this
.
commissionsInfoQG
=
[...
this
.
commissionsInfoQG
,
...(
i
.
nscene0PenetrationRateGoodsCommissions
||
[])]
})
console
.
log
(
this
.
commissionsInfoQG
,
'commissionsInfoQG'
)
this
.
scene0PenetrationRateCommissions
=
commissions
?.
scene0PenetrationRateCommissions
||
[]
this
.
getCommissionsInfo
()
}
else
{
this
.
commissionsInfo
=
[{}]
this
.
commissionsInfoQG
=
[]
this
.
scene0PenetrationRateCommissions
=
[]
}
}
else
{
this
.
commissionsInfo
=
[{}]
this
.
commissionsInfoQG
=
[]
...
...
components/HomeFrame/components/LeftSide.vue
View file @
0f4c85c
...
...
@@ -153,10 +153,11 @@ export default {
console
.
log
(
'studyCenter'
)
this
.
changeIndex
(
3
,
this
.
tabs
[
3
])
});
this
.
getMessageInfo
()
this
.
getUnreadCount
()
this
.
getSopCount
()
// 获取Ai集市未读个数
this
.
findBeiSenSSOToken
()
// 获取北森token
this
.
findBeiSenSSOToken
().
then
(()
=>
{
this
.
getMessageInfo
()
})
// 获取北森token后再获取消息
},
inject
:
[
'showPage'
],
methods
:
{
...
...
@@ -290,6 +291,21 @@ export default {
},
// 学习中心消息弹窗,优先级高于有修改话术弹窗
async
getMessagePop
()
{
// 获取今天日期字符串
const
today
=
new
Date
().
toISOString
().
slice
(
0
,
10
)
// 获取当前用户手机号
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
||
{}
const
phone
=
userInfo
.
phone
||
''
// 读取缓存
let
shownData
=
uni
.
$storage
.
get
(
'messagePopShownDate'
)
||
{}
// shownData 结构: { [phone]: date }
// 把手机号也存到一个变量中
const
cachePhone
=
phone
if
(
shownData
[
phone
]
===
today
)
{
// 今天已经弹过窗,直接返回
await
this
.
getMessage
()
return
}
const
res
=
await
uni
.
$api
.
commonApi
.
getMessagePop
({})
console
.
log
(
res
,
'res111'
)
if
(
res
.
ids
&&
res
.
ids
.
length
>
0
)
{
...
...
@@ -300,11 +316,17 @@ export default {
this
.
messageType
=
'study'
this
.
messageData
=
res
this
.
$refs
.
kfRef
.
open
()
// 记录今日已弹窗
shownData
[
phone
]
=
today
uni
.
$storage
.
set
(
'messagePopShownDate'
,
shownData
)
}
}
else
{
this
.
messageType
=
'system'
this
.
messageData
=
res
this
.
$refs
.
kfRef
.
open
()
// 记录今日已弹窗
shownData
[
phone
]
=
today
uni
.
$storage
.
set
(
'messagePopShownDate'
,
shownData
)
}
}
else
{
await
this
.
getMessage
()
...
...
utils/cache/constantData.js
View file @
0f4c85c
...
...
@@ -39,5 +39,6 @@ export const STORAGE_OBJECTKEY = {
appInfoList
:
'appInfoList'
,
leadPage
:
'leadPage'
,
recordTrackList
:
'recordTrackList'
,
beisenToken
:
'beisenToken'
beisenToken
:
'beisenToken'
,
messagePopShownDate
:
'messagePopShownDate'
}
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