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
51313627
authored
2026-04-23 10:55:20 +0800
by
lttnew
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
个人会员
1 parent
23436998
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
73 deletions
common/request.js
myCenter/examPointApply.vue
myCenter/examPointApplyList.vue
personal/certPreview.vue
personal/home.vue
common/request.js
View file @
5131362
...
...
@@ -62,7 +62,10 @@ function handleTokenExpire() {
function
showError
(
msg
)
{
console
.
log
(
'showError called:'
,
msg
)
// 先隐藏可能存在的 loading,确保 Toast 能显示
uni
.
hideLoading
()
if
(
loadingCount
>
0
)
{
loadingCount
=
0
uni
.
hideLoading
()
}
uni
.
showToast
({
title
:
msg
||
'请求失败'
,
icon
:
'none'
,
...
...
myCenter/examPointApply.vue
View file @
5131362
...
...
@@ -4,7 +4,7 @@
<custom-modal
ref=
"customModalRef"
:title=
"modalConfig.title"
:content=
"modalConfig.content"
:showCancel=
"modalConfig.showCancel"
:cancelText=
"modalConfig.cancelText"
:confirmText=
"modalConfig.confirmText"
@
confirm=
"onModalConfirm"
/>
<!-- 考官选择类型 -->
<view
class=
"radio-section"
>
<
!--
<
view
class=
"radio-section"
>
<radio-group
class=
"radio-group"
@
change=
"onSelfSelectChange"
>
<label
class=
"radio-item"
>
<radio
:checked=
"form.selfSelect == '1'"
class=
"custom-radio"
value=
"1"
/>
...
...
@@ -15,7 +15,7 @@
<text
class=
"radio-text"
>
省跆协指派考官
</text>
</label>
</radio-group>
</view>
</view>
-->
<!-- 温馨提示 -->
<view
v-if=
"form.selfSelect == '1'"
class=
"tip-box"
>
...
...
myCenter/examPointApplyList.vue
View file @
5131362
...
...
@@ -2,7 +2,7 @@
<view
class=
"exam-point-list"
>
<!-- 顶部申请按钮 -->
<view
class=
"apply-btn-box"
>
<button
class=
"apply-btn"
:disabled=
"memberInfo.isPoints==0
||
memberInfo.auditStatus==2"
@
click=
"goApply"
>
申请考点
</button>
<button
class=
"apply-btn"
:disabled=
"memberInfo.isPoints==0
&&
memberInfo.auditStatus==2"
@
click=
"goApply"
>
申请考点
</button>
</view>
<!-- 列表 -->
...
...
personal/certPreview.vue
View file @
5131362
...
...
@@ -3,9 +3,7 @@
<view
class=
"loading-tip"
v-if=
"loading"
>
加载中...
</view>
<view
class=
"error-tip"
v-else-if=
"showError"
>
{{
errorMsg
}}
</view>
<view
class=
"download-btn"
@
click=
"openDocument"
>
<text>
查看会员证
</text>
</view>
<web-view
v-if=
"pdfUrl"
:src=
"pdfUrl"
></web-view>
</view>
</
template
>
...
...
@@ -18,65 +16,22 @@
const
loading
=
ref
(
true
);
const
showError
=
ref
(
false
);
const
errorMsg
=
ref
(
""
);
const
tempFilePath
=
ref
(
""
);
onLoad
(
async
(
option
)
=>
{
onLoad
((
option
)
=>
{
if
(
option
.
url
)
{
pdfUrl
.
value
=
config
.
baseUrl_api
+
decodeURIComponent
(
option
.
url
);
await
downloadPdf
();
loading
.
value
=
false
;
}
else
{
showError
.
value
=
true
;
errorMsg
.
value
=
"参数错误"
;
}
});
const
downloadPdf
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
uni
.
showLoading
({
title
:
"加载中..."
});
uni
.
downloadFile
({
url
:
pdfUrl
.
value
,
success
:
(
res
)
=>
{
uni
.
hideLoading
();
if
(
res
.
statusCode
===
200
)
{
tempFilePath
.
value
=
res
.
tempFilePath
;
loading
.
value
=
false
;
// 自动打开文档
openDocument
();
}
else
{
showError
.
value
=
true
;
errorMsg
.
value
=
"下载失败"
;
}
resolve
();
},
fail
:
()
=>
{
uni
.
hideLoading
();
showError
.
value
=
true
;
errorMsg
.
value
=
"下载失败"
;
resolve
();
}
});
});
};
const
openDocument
=
()
=>
{
if
(
!
tempFilePath
.
value
)
{
uni
.
showToast
({
title
:
"文件未准备好"
,
icon
:
"none"
});
return
;
}
uni
.
openDocument
({
filePath
:
tempFilePath
.
value
,
fileType
:
"pdf"
,
showMenu
:
true
,
success
:
()
=>
{
console
.
log
(
"打开文档成功"
);
},
fail
:
()
=>
{
uni
.
showToast
({
title
:
"打开失败,请在右上角菜单中下载"
,
icon
:
"none"
});
}
});
};
</
script
>
<
style
lang=
"scss"
scoped
>
.preview-container
{
min-height
:
100vh
;
width
:
100vw
;
height
:
100vh
;
background
:
#f5f5f5
;
position
:
relative
;
}
...
...
@@ -99,16 +54,8 @@
color
:
#C40F18
;
}
.download-btn
{
position
:
fixed
;
bottom
:
50
rpx
;
left
:
50%
;
transform
:
translateX
(
-50%
);
background
:
#C40F18
;
color
:
#fff
;
padding
:
24
rpx
60
rpx
;
border-radius
:
40
rpx
;
font-size
:
28
rpx
;
z-index
:
100
;
web-view
{
width
:
100%
;
height
:
100%
;
}
</
style
>
...
...
personal/home.vue
View file @
5131362
...
...
@@ -22,7 +22,7 @@
mode=
"aspectFill"
>
</image>
</view>
<view
class=
"member-id"
>
{{
userInfo
.
userName
}}
</view>
<view
class=
"member-id"
>
{{
userInfo
?
.
userName
}}
</view>
</view>
<view
class=
"user-bottom"
>
<view
class=
"user-name"
>
{{
perInfo
?.
perName
}}
</view>
...
...
@@ -106,13 +106,13 @@
</view>
<uni-icons
type=
"arrowright"
size=
"20"
color=
"#999"
></uni-icons>
</view>
-->
<view
class=
"query-item"
@
click=
"goToWebView(4)"
>
<
!--
<
view
class=
"query-item"
@
click=
"goToWebView(4)"
>
<view
class=
"query-item-left"
>
<image
:src=
"config.baseUrl_api + '/fs/static/user_icon02@2x.png'"
class=
"query-item-icon"
></image>
<text
class=
"query-item-text"
>
新版级位证书查询
</text>
</view>
<uni-icons
type=
"arrowright"
size=
"20"
color=
"#999"
></uni-icons>
</view>
</view>
-->
<!--
<view
class=
"query-item"
@
click=
"goToWebView(5)"
>
<view
class=
"query-item-left"
>
<image
:src=
"config.baseUrl_api + '/fs/static/user_icon02@2x.png'"
class=
"query-item-icon"
></image>
...
...
@@ -266,7 +266,12 @@ const showConfirm = ref(false)
watch
(()
=>
perInfo
.
value
?.
perCode
,
(
val
)
=>
{
if
(
val
===
undefined
||
val
===
null
||
val
===
''
)
{
nextTick
(()
=>
{
openBindPopup
()
// 延迟检查,确保数据已完全同步
setTimeout
(()
=>
{
if
(
!
isBound
.
value
)
{
openBindPopup
()
}
},
500
)
})
}
},
{
...
...
@@ -479,7 +484,6 @@ const showConfirm = ref(false)
.page-container
{
min-height
:
100vh
;
background
:
#f5f5f5
;
padding-bottom
:
40
rpx
;
}
/* 导航栏 */
...
...
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