Commit 9149bd88 authored by Facius's avatar Facius

fix: 继续考试答题和剩余数量不对;feat: 问卷id改为首页传入

parent c5abad0a
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
surveyId: 1, surveyId: 1, // 问卷id
list: [ list: [
{ {
title: '您通过什么渠道了解到模考大师?', title: '您通过什么渠道了解到模考大师?',
...@@ -131,8 +131,8 @@ export default { ...@@ -131,8 +131,8 @@ export default {
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('问卷调查') getApp().trackPage('问卷调查')
if (e && e.id) { if (e && e.surveyId) {
// this.queryQuestionWarehouseById(e.id) this.surveyId = e.surveyId
} }
}, },
methods: { methods: {
...@@ -184,7 +184,7 @@ export default { ...@@ -184,7 +184,7 @@ export default {
} }
let params = { let params = {
options: options, options: options,
surveyId: 1, // 问卷id,暂时写死 surveyId: this.surveyId, // 问卷id
surveyName: "调查小问卷" surveyName: "调查小问卷"
} }
let trackParams = { let trackParams = {
...@@ -200,6 +200,9 @@ export default { ...@@ -200,6 +200,9 @@ export default {
this.$u.route({ this.$u.route({
url: 'pages/advertisement/results', url: 'pages/advertisement/results',
type: 'redirectTo', type: 'redirectTo',
params: {
surveyId: this.surveyId,
},
}) })
}) })
......
...@@ -51,7 +51,8 @@ export default { ...@@ -51,7 +51,8 @@ export default {
list: [], // 已选题库列表 list: [], // 已选题库列表
loading: false, loading: false,
selectedData: {}, selectedData: {},
cardData: {} cardData: {},
surveyId: 1, // 问卷id
} }
}, },
computed: { computed: {
...@@ -84,6 +85,9 @@ export default { ...@@ -84,6 +85,9 @@ export default {
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('问卷结束-领取奖励') getApp().trackPage('问卷结束-领取奖励')
if (e && e.surveyId) {
this.surveyId = e.surveyId
}
this.loadList() // 获取已选题库列表 this.loadList() // 获取已选题库列表
}, },
methods: { methods: {
...@@ -99,7 +103,7 @@ export default { ...@@ -99,7 +103,7 @@ export default {
questionWarehouseId: this.selectedData.id, questionWarehouseId: this.selectedData.id,
cardId: this.cardData.id, cardId: this.cardData.id,
sourse: 'SURVEY', // 问卷调查 sourse: 'SURVEY', // 问卷调查
bizId: 1,// bizId 问卷id,暂时写死 bizId: this.surveyId, // 问卷id
} }
let trackParams = { let trackParams = {
openId: this.openId, openId: this.openId,
......
...@@ -392,8 +392,8 @@ export default { ...@@ -392,8 +392,8 @@ export default {
if (count > 0) { if (count > 0) {
// 显示暂停弹窗 // 显示暂停弹窗
this.pauseData = { this.pauseData = {
answered: count, answered: this.currentIndex,
noStart: this.list.length - count noStart: this.list.length - this.currentIndex
} }
this.showPause = true this.showPause = true
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment