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
1c937c08
authored
2026-06-02 13:16:10 +0800
by
lttnew
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
人员信息
1 parent
3b993e08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
11 deletions
personal/home.vue
personal/memberInfo.vue
personal/home.vue
View file @
1c937c0
...
...
@@ -437,15 +437,18 @@ const goToAuth = () => {
});
};
const
goToScore
=
()
=>
{
if
(
!
isBound
.
value
)
{
uni
.
showToast
({
title
:
'请先绑定学员'
,
icon
:
'none'
})
return
}
uni
.
navigateTo
({
url
:
'/personal/memberInfo'
});
};
const
goToScore
=
()
=>
{
if
(
!
isBound
.
value
)
{
uni
.
showToast
({
title
:
'请先绑定学员'
,
icon
:
'none'
})
return
}
const
perId
=
userInfo
.
value
.
perId
??
''
const
name
=
perInfo
.
value
?.
perName
?
encodeURIComponent
(
perInfo
.
value
.
perName
)
:
''
const
idcCode
=
perInfo
.
value
?.
perIdcCode
?
encodeURIComponent
(
perInfo
.
value
.
perIdcCode
)
:
''
uni
.
navigateTo
({
url
:
`/personal/memberInfo?perId=
${
perId
}
&name=
${
name
}
&idcCode=
${
idcCode
}
`
});
};
const
goToWebView
=
(
type
)
=>
{
// const url = "https://member.taekwondo.org.cn/#/authAccurate?type=" + type
...
...
personal/memberInfo.vue
View file @
1c937c0
...
...
@@ -69,6 +69,7 @@
<
script
setup
>
import
{
ref
,
onMounted
}
from
'vue'
;
import
{
onLoad
}
from
'@dcloudio/uni-app'
;
import
{
useUserStore
}
from
'../store/modules/user'
;
import
{
getAssoPers
,
getInfo
}
from
'@/common/api.js'
;
...
...
@@ -76,6 +77,21 @@
const
form
=
ref
({});
const
loading
=
ref
(
false
);
const
perId
=
ref
(
''
);
const
homeFallbackInfo
=
ref
({
name
:
''
,
idcCode
:
''
});
onLoad
((
option
)
=>
{
if
(
option
.
perId
)
{
perId
.
value
=
option
.
perId
;
}
homeFallbackInfo
.
value
=
{
name
:
option
.
name
?
decodeURIComponent
(
option
.
name
)
:
''
,
idcCode
:
option
.
idcCode
?
decodeURIComponent
(
option
.
idcCode
)
:
''
};
applyHomeFallbackInfo
();
});
// 返回上一页
const
goBack
=
()
=>
{
...
...
@@ -109,7 +125,8 @@
loading
.
value
=
true
;
try
{
const
res
=
await
getInfo
(
perId
.
value
);
form
.
value
=
res
.
data
;
form
.
value
=
res
.
data
||
{};
applyHomeFallbackInfo
();
// 处理数据
form
.
value
.
topAssName
=
form
.
value
?.
ancestorNameList
?.[
0
]
||
'--'
;
form
.
value
.
areaAssName
=
form
.
value
?.
ancestorNameList
?.[
1
]
||
'--'
;
...
...
@@ -121,6 +138,7 @@
form
.
value
.
address
=
form
.
value
.
address
||
'--'
;
}
catch
(
error
)
{
console
.
error
(
'获取个人会员信息失败:'
,
error
);
applyHomeFallbackInfo
();
uni
.
showToast
({
title
:
'获取个人会员信息失败'
,
icon
:
'none'
...
...
@@ -130,10 +148,22 @@
}
};
const
applyHomeFallbackInfo
=
()
=>
{
if
(
!
form
.
value
)
form
.
value
=
{};
if
(
!
form
.
value
.
name
&&
homeFallbackInfo
.
value
.
name
)
{
form
.
value
.
name
=
homeFallbackInfo
.
value
.
name
;
}
if
(
!
form
.
value
.
idcCode
&&
homeFallbackInfo
.
value
.
idcCode
)
{
form
.
value
.
idcCode
=
homeFallbackInfo
.
value
.
idcCode
;
}
};
onMounted
(
async
()
=>
{
// 获取perId
const
userInfo
=
userStore
.
user
;
if
(
userInfo
&&
userInfo
.
perId
)
{
if
(
perId
.
value
)
{
getMemberInfo
();
}
else
if
(
userInfo
&&
userInfo
.
perId
)
{
perId
.
value
=
userInfo
.
perId
;
getMemberInfo
();
}
else
{
...
...
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