diff --git a/pages.json b/pages.json index 9bef1b8..165f0f1 100755 --- a/pages.json +++ b/pages.json @@ -907,6 +907,15 @@ } } + ,{ + "path" : "pages/questionAnswer/ownerVote", + "style" : + { + "navigationBarTitleText": "投票", + "enablePullDownRefresh": false + } + + } ], "tabBar": { "color": "#272636", diff --git a/pages/questionAnswer/ownerVote.vue b/pages/questionAnswer/ownerVote.vue new file mode 100644 index 0000000..f1dc713 --- /dev/null +++ b/pages/questionAnswer/ownerVote.vue @@ -0,0 +1,237 @@ + + + + diff --git a/pages/questionAnswer/questionAnswer.vue b/pages/questionAnswer/questionAnswer.vue index b7141d5..561392d 100644 --- a/pages/questionAnswer/questionAnswer.vue +++ b/pages/questionAnswer/questionAnswer.vue @@ -5,7 +5,7 @@ - + {{question.qaType == '3003'?'投票':'问卷'}} {{question.qaName}} @@ -60,10 +60,10 @@ methods: { _queryQuestionAnswer: function(){ let that = this; + //qaType:'3003', queryQuestionAnswer({ page:1, row:50, - qaType:'3003', state:'1201', communityId: that.communityId, }) @@ -89,31 +89,41 @@ }) }, gotoDetail: function(_question) { + let _msg = "问卷"; + if(_question.qaType == '3003'){ + _msg = "投票"; + } if(_question.state == '-1'){ uni.showToast({ icon:'none', - title:'此投票问卷尚未开始' + title:_msg+'尚未开始' }) return ; } if(_question.state == '0'){ uni.showToast({ icon:'none', - title:'此投票问卷已结束' + title:_msg+'已结束' }) return ; } if(_question.state == '2'){ uni.showToast({ icon:'none', - title:'此投票问卷已投票' + title:_msg+'已投票' }) return ; } let that = this; - this.vc.navigateTo({ - url: "/pages/questionAnswer/questionAnswerDetail?qaId=" + _question.qaId+"&objType="+_question.objType - }); + if(_question.qaType == '3003'){ + this.vc.navigateTo({ + url: "/pages/questionAnswer/ownerVote?qaId=" + _question.qaId+"&objType="+_question.objType + }); + }else{ + this.vc.navigateTo({ + url: "/pages/questionAnswer/questionAnswerDetail?qaId=" + _question.qaId+"&objType="+_question.objType + }); + } }, } }; diff --git a/pages/questionAnswer/questionAnswerDetail.vue b/pages/questionAnswer/questionAnswerDetail.vue index e74871d..b491e9e 100644 --- a/pages/questionAnswer/questionAnswerDetail.vue +++ b/pages/questionAnswer/questionAnswerDetail.vue @@ -4,7 +4,7 @@ {{qaInfo.qaName}} - 投票人姓名(业主) + 问卷人姓名(业主) {{qaInfo.ownerName}} @@ -126,7 +126,7 @@ queryQuestionAnswer({ page: 1, row: 1, - qaType: '3003', + qaId:this.qaId, communityId: that.communityId, }) .then(_data => { @@ -196,7 +196,7 @@ .then(_data => { uni.showToast({ icon: 'none', - title: '投票成功' + title: '提交成功' }); uni.navigateBack({ delta: 1