feat: 代表团凭证

This commit is contained in:
2026-08-29 16:23:09 +08:00
parent 1096ea245f
commit f2fb656912
7 changed files with 322 additions and 6 deletions
@@ -147,6 +147,18 @@ layout("/layouts/platform.html"){
></file-upload>
<span>最佳分辨率:750 x 280,节日福利页顶部图片</span>
</template>
<template v-else-if="formData.configKey === 'TeacherCongressCardBackImg'">
<file-upload
key="TeacherCongressCardBackImg"
style="--upload-width: 214px;--upload-height:300px"
:value.sync="formData.configValue"
:upload_number="1"
upload_mode="image"
upload_result_category="interval"
upload_result_type="url"
></file-upload>
<span>教代会代表证背景图片,通过文件上传配置</span>
</template>
<template v-else>
<div v-if="'true'===formData.configValue||'false'===formData.configValue">
<el-radio-group v-model="formData.configValue">
@@ -0,0 +1,84 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style>
.card-page {
display: flex;
justify-content: center;
height: calc(100vh - 46px);
flex-direction: column;
padding: 0 24px;
box-sizing: border-box;
}
.card-page .van-button {
width: 184px;
margin-left: auto;
margin-right: auto;
font-weight: 700;
font-size: 17px;
border-radius: 4px;
background-color: #1867b0;
border-color: #1867b0;
}
.card-page .card-tip {
margin-top: 16px;
color: #969799;
font-size: 14px;
line-height: 22px;
text-align: center;
}
</style>
<div id="app" v-cloak>
<van-nav-bar title="代表证" left-arrow placeholder fixed
@click-left="historyBack"></van-nav-bar>
<div class="card-page">
<van-button type="info" @click="showCard">教代会代表证</van-button>
<div class="card-tip" v-if="tipMsg">{{ tipMsg }}</div>
</div>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#app",
data: function () {
return {
tipMsg: ""
}
},
methods: {
async showCard() {
try {
const response = await fetch("/platform/teacherCongress/delegate/card/isDb", {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8"
}
})
const resp = await response.json()
if (resp.code !== 0) {
this.tipMsg = resp.msg || "暂无教代会代表证"
vant.Dialog.alert({
title: "温馨提示",
message: this.tipMsg
})
return
}
this.tipMsg = ""
vant.ImagePreview(["/platform/teacherCongress/delegate/card/showCard?t=" + Date.now()])
} catch (e) {
this.tipMsg = "代表证信息获取失败"
vant.Dialog.alert({
title: "温馨提示",
message: this.tipMsg
})
}
}
}
})
</script>
<!--#
}
#-->