Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
ztx_wx_gzt
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
65e14c9a
authored
2026-05-07 09:28:30 +0800
by
张猛
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
登录提示
1 parent
259aafe0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
personal/home.vue
personal/home.vue
View file @
65e14c9
...
...
@@ -214,6 +214,7 @@ import {
unbindUser
,
downStuCertSingle
}
from
'@/common/api.js'
import
{
onShow
}
from
"@dcloudio/uni-app"
;
const
userStore
=
useUserStore
()
const
userInfo
=
computed
(()
=>
userStore
.
user
??
{})
...
...
@@ -233,31 +234,38 @@ const bindForm = ref({
idcCode
:
''
})
const
showConfirm
=
ref
(
false
)
// 标记是否已经弹出过绑定框(避免重复弹出)
let
hasOpenedBindPopup
=
false
on
Mounted
(()
=>
{
on
Show
(()
=>
{
let
webUserName
=
uni
.
getStorageSync
(
'webUserName'
)
if
(
!
webUserName
)
{
wxLogin
().
then
(
getWebInfo
)
}
})
// 标记是否已经弹出过绑定框(避免重复弹出)
let
hasOpenedBindPopup
=
false
watch
(()
=>
perInfo
.
value
,
(
newVal
,
oldVal
)
=>
{
console
.
log
(
444
,
newVal
?.
perCode
)
// 只有当 perInfo 数据存在且 perCode 为空时才弹出
if
(
newVal
&&
!
newVal
.
perCode
&&
!
hasOpenedBindPopup
)
{
if
(
perInfo
.
value
&&
!
perInfo
.
value
.
perCode
&&
!
hasOpenedBindPopup
)
{
hasOpenedBindPopup
=
true
nextTick
(()
=>
{
openBindPopup
()
})
}
},
{
immediate
:
true
})
// watch(() => perInfo.value, (newVal, oldVal) => {
// console.log(444, newVal?.perCode)
//
// // 只有当 perInfo 数据存在且 perCode 为空时才弹出
// if (newVal && !newVal.perCode && !hasOpenedBindPopup) {
// hasOpenedBindPopup = true
// nextTick(() => {
// openBindPopup()
// })
// }
// }, {
// immediate: true
// })
// 打开绑定弹框
const
openBindPopup
=
()
=>
{
if
(
bindPopup
.
value
)
{
...
...
Write
Preview
Styling with
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