Merge remote-tracking branch 'origin/feature_教代会代表证' into release_20260831
This commit is contained in:
@@ -184,6 +184,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">
|
||||
|
||||
+84
@@ -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>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -569,6 +569,10 @@ const apps = {
|
||||
|
||||
// 导航到菜单
|
||||
navigateToMenu(menu) {
|
||||
if (this.isTeacherCongressCardMenu(menu)) {
|
||||
this.showTeacherCongressCard()
|
||||
return
|
||||
}
|
||||
// 关闭弹框
|
||||
// this.showMenuPopup = false
|
||||
if (menu.href) {
|
||||
@@ -581,6 +585,32 @@ const apps = {
|
||||
} else {
|
||||
this.$toast('该功能暂不可用')
|
||||
}
|
||||
},
|
||||
|
||||
isTeacherCongressCardMenu(menu) {
|
||||
const href = (menu && menu.href) || ""
|
||||
return href.indexOf("/platform/teacherCongress/delegate/card/") === 0
|
||||
},
|
||||
|
||||
showTeacherCongressCard() {
|
||||
this.$axios.post("/platform/teacherCongress/delegate/card/isDb").then((resp) => {
|
||||
if (resp.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: "温馨提示",
|
||||
message: resp.msg || "暂无教代会代表证"
|
||||
})
|
||||
return
|
||||
}
|
||||
this.showMenuPopup = false
|
||||
vant.ImagePreview([
|
||||
"/platform/teacherCongress/delegate/card/showCard?t=" + Date.now()
|
||||
])
|
||||
}).catch(() => {
|
||||
vant.Dialog.alert({
|
||||
title: "温馨提示",
|
||||
message: "代表证加载失败"
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
// 初始加载消除长按收藏
|
||||
|
||||
Reference in New Issue
Block a user