【学平险业务字段需求】 h5页面选择班级学校

This commit is contained in:
dwq
2021-06-16 16:44:32 +08:00
parent 166ad9da07
commit 4120f38f70

View File

@@ -1,6 +1,7 @@
<template> <template>
<div class="poster-preview-container"> <div class="poster-preview-container">
<div class="flex align-items-c justify-content-c top30 relative"> <div class="flex align-items-c justify-content-c top30 relative">
<van-button round type="info" class="config" size="small" @click="showPopup" v-show="showBut" >学校班级设置</van-button>
<img class="w300" :src="imgPath | urlFormat" alt="" /> <img class="w300" :src="imgPath | urlFormat" alt="" />
<!--<div class="poster-info w300 white absolute fs14 bottom0" style="background:rgba(0,0,0,.5)"> <!--<div class="poster-info w300 white absolute fs14 bottom0" style="background:rgba(0,0,0,.5)">
<p class="p5 mt5 ml5">{{ manageComName || '国富人寿保险股份有限公司' }}</p> <p class="p5 mt5 ml5">{{ manageComName || '国富人寿保险股份有限公司' }}</p>
@@ -9,6 +10,18 @@
</div>--> </div>-->
</div> </div>
<van-button type="danger" size="large" @click="shareFriends" v-if="!isWeixin" class="mt50">分享</van-button> <van-button type="danger" size="large" @click="shareFriends" v-if="!isWeixin" class="mt50">分享</van-button>
<van-dialog v-model="showDialog" title="学校班级设置" show-cancel-button @confirm="checkModelConfirm" confirmButtonText="确定">
<van-field
v-model="schoolName"
name="学校名称"
label="学校名称:"
placeholder="学校名称"/>
<van-field
v-model="className"
name="班级名称"
label="班级名称:"
placeholder="班级名称"/>
</van-dialog>
</div> </div>
</template> </template>
@@ -32,7 +45,11 @@ export default {
imgUrl: '', // 分享的图片 imgUrl: '', // 分享的图片
base64: '', // 分享的base64 base64: '', // 分享的base64
imgPath: '', imgPath: '',
isShow: false isShow: false,
showBut:false,
showDialog: false,
schoolName:"",
className:""
} }
}, },
async created() { async created() {
@@ -72,6 +89,9 @@ export default {
this.$toast.clear() this.$toast.clear()
if (res.result == 0) { if (res.result == 0) {
this.posterInfo = res.infoDTOList[0] this.posterInfo = res.infoDTOList[0]
if(res.infoDTOList[0].isLearn=='0'){
this.showBut=true;
}
resolve() resolve()
} else { } else {
reject() reject()
@@ -116,7 +136,10 @@ export default {
}, },
agentMobile: this.userMobile, agentMobile: this.userMobile,
agentName: this.userName, agentName: this.userName,
companyName: this.manageComName || '国富人寿保险股份有限公司' companyName: this.manageComName || '国富人寿保险股份有限公司',
schoolName:this.schoolName,
className:this.className
} }
if (this.posterType == 'product') { if (this.posterType == 'product') {
shareUrlWithQR(params).then(res => { shareUrlWithQR(params).then(res => {
@@ -171,7 +194,26 @@ export default {
} }
} }
xhr.send() xhr.send()
} },
showPopup() {
this.showDialog = true;
},
// 弹窗提交处理
checkModelConfirm() {
let that = this
if(that.schoolName.trim()==''){
that.schoolName="0";
};
if(that.className.trim()==''){
that.className="0";
};
that.getShareImg();
that.schoolName="";
that.className="";
location.reload();
},
}, },
filters: { filters: {
urlFormat(url) { urlFormat(url) {
@@ -226,4 +268,13 @@ export default {
} }
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped>
.config{
background-color: steelblue;
top: 1%;
right: 12%;
position: absolute;
font-size: smaller;
}
</style>