commit
This commit is contained in:
@@ -125,6 +125,7 @@ layout("/mobile/platform.html"){
|
||||
return {
|
||||
list: [],
|
||||
id: GetQueryString("id"),
|
||||
H5JumpTo: GetQueryString("H5JumpTo"),
|
||||
subjects: [],
|
||||
activity: {},
|
||||
// remainingTime: 0,
|
||||
@@ -162,7 +163,22 @@ layout("/mobile/platform.html"){
|
||||
this.subjects = res.data.subjects
|
||||
this.answerRecordId = res.data.answerRecordId
|
||||
// this.checkGroupPermission()
|
||||
this.getAnswerRecord()
|
||||
if (!this.H5JumpTo && this.activity.repeatable && res.data.repeatTips){
|
||||
// 如果是可重复答题,第二次答题进来弹出提示
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您已完成本次答题,是否要重新答题?',
|
||||
confirmButtonText: '重新答题',
|
||||
cancelButtonText: '查看答题记录',
|
||||
}).then(() => {
|
||||
this.getAnswerRecord()
|
||||
}).catch(() => {
|
||||
pjaxReplace("/platform/h5/qsv/quiz/result?answerRecordId=" + this.answerRecordId)
|
||||
// pjaxReplace("/mobile/index")
|
||||
});
|
||||
} else {
|
||||
this.getAnswerRecord()
|
||||
}
|
||||
} else {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
@@ -181,7 +197,7 @@ layout("/mobile/platform.html"){
|
||||
this.answerRecord = res.data
|
||||
|
||||
if (this.answerRecord.isFinish || this.$moment().unix() > this.$moment(this.activity.endTime)) {
|
||||
this.$pjaxReplace("/platform/h5/qsv/quiz/result?answerRecordId=" + this.answerRecordId)
|
||||
pjaxReplace("/platform/h5/qsv/quiz/result?answerRecordId=" + this.answerRecordId)
|
||||
}
|
||||
|
||||
this.initAnswer()
|
||||
|
||||
@@ -210,6 +210,8 @@ layout("/mobile/platform.html"){
|
||||
|
||||
<div class="button-control">
|
||||
<van-button v-if="canAgainQuestion" type="primary" @click="againQuestion" block>重新答题</van-button>
|
||||
<!-- 女性知识答题 -->
|
||||
<van-button v-if="activity.id === 'c3372eb3ee774e86b373fcacf8eb89c7'" type="primary" @click="goWelfareChoose" block>纪念品选择</van-button>
|
||||
<van-button type="primary" @click="openHistory" block>查看全部答题记录</van-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -272,6 +274,13 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 福利选择
|
||||
*/
|
||||
goWelfareChoose(){
|
||||
// 女性答题的福利
|
||||
pjaxReplace('/mobile/welfare/list/receive?projectId=8799d66b0bb640078f50feb029e506ed')
|
||||
},
|
||||
/**
|
||||
* 重新答题
|
||||
*/
|
||||
@@ -280,7 +289,7 @@ layout("/mobile/platform.html"){
|
||||
title: '温馨提示',
|
||||
message: '确定要重新答题吗?',
|
||||
}).then(() => {
|
||||
pjaxReplace('/platform/h5/qsv/quiz?id=' + this.activity.id)
|
||||
pjaxReplace('/platform/h5/qsv/quiz?id=' + this.activity.id + "&H5JumpTo=true")
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
@@ -290,8 +299,19 @@ layout("/mobile/platform.html"){
|
||||
if (res.code === 0) {
|
||||
this.subjects = res.data.subjects
|
||||
this.activity = res.data.activity
|
||||
this.getAnswerRecord()
|
||||
this.getHistoryQuestion()
|
||||
|
||||
if (this.activity.id === 'c3372eb3ee774e86b373fcacf8eb89c7') {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: "感谢您参与女性健康知识竞赛。请选取活动纪念品",
|
||||
}).then(() => {
|
||||
this.getAnswerRecord()
|
||||
this.getHistoryQuestion()
|
||||
})
|
||||
} else {
|
||||
this.getAnswerRecord()
|
||||
this.getHistoryQuestion()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -649,15 +649,26 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
if (code === 0) {
|
||||
this.getUserSelection(this.projectId)
|
||||
this.$modal.msgSuccess("您已完成本次福利选择。")
|
||||
// 女性健康知识讲座福利品Id
|
||||
if (this.projectId === '8799d66b0bb640078f50feb029e506ed') {
|
||||
pjaxReplace('/mobile/welfare/list/receive_success?projectId=' + this.projectId + '&provideMode=' + this.projectInfo.provideMode)
|
||||
} else {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: "您已完成本次福利选择。",
|
||||
}).then(async () => {
|
||||
this.confirmPopup = false
|
||||
await this.getProjectInfo()
|
||||
window.location.reload()
|
||||
});
|
||||
}
|
||||
// this.$modal.msgSuccess("您已完成本次福利选择。")
|
||||
} else {
|
||||
this.$modal.msgError(msg)
|
||||
}
|
||||
this.confirmPopup = false
|
||||
await this.getProjectInfo()
|
||||
setTimeout(() => {
|
||||
this.confirmPopup = false
|
||||
await this.getProjectInfo()
|
||||
window.location.reload()
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
|
||||
//查看详情
|
||||
|
||||
@@ -9,7 +9,7 @@ layout("/mobile/platform.html"){
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar :title="title" left-arrow
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
@click-left="back"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div style="text-align: center;margin-top: 200px;">
|
||||
@@ -25,7 +25,8 @@ layout("/mobile/platform.html"){
|
||||
</svg>
|
||||
<div style="margin-top: 20px;">{{code=='2' ? '您已领取' : '您已选择'}}</div>
|
||||
<div style="margin: 20px auto 0px auto;width: 300px;word-break: break-all">
|
||||
福利品: {{selectOptionNames}}
|
||||
<!-- 女性健康知识讲座福利品Id -->
|
||||
{{ projectId == '8799d66b0bb640078f50feb029e506ed' ? '纪念品' : '福利品' }}: {{selectOptionNames}}
|
||||
</div>
|
||||
<van-button style="margin-top: 20px;width: 100px" size="small" hairline type="primary"
|
||||
@click="back">返回
|
||||
@@ -43,6 +44,7 @@ layout("/mobile/platform.html"){
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
projectId: '',
|
||||
selectOptionNames: null
|
||||
}
|
||||
},
|
||||
@@ -52,7 +54,7 @@ layout("/mobile/platform.html"){
|
||||
this.selectOptionNames = resp.data
|
||||
},
|
||||
back() {
|
||||
window.history.go(-1)
|
||||
pjaxReplace('/mobile/welfare/list/receive?projectId=' + this.projectId)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -54,7 +54,7 @@ layout("/mobile/platform.html"){
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile//index')" left-arrow
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" left-arrow
|
||||
title="我的福利"></van-nav-bar>
|
||||
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
|
||||
Reference in New Issue
Block a user