From 37e1e6f894dc76fe36c5e58e63de0c56ecf40047 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Tue, 18 Jul 2023 19:34:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- constant/url.js | 4 +- pages/questionAnswer/questionAnswerDetail.vue | 82 ++++++++++--------- 2 files changed, 45 insertions(+), 41 deletions(-) diff --git a/constant/url.js b/constant/url.js index 96b7575..cbc47c7 100755 --- a/constant/url.js +++ b/constant/url.js @@ -120,8 +120,8 @@ export default { queryRoomRenovationRecordDetail: baseUrl + "app/roomRenovation/queryRoomRenovationRecordDetail", queryContract: baseUrl + "app/contract/queryContract", queryQuestionAnswer: baseUrl + "app/question.queryOwnerQuestionAnswer", - queryQuestionAnswerTitle: baseUrl + "app/questionAnswer/queryQuestionAnswerTitle", - saveUserQuestionAnswerValue: baseUrl + "app/userQuestionAnswer/saveUserQuestionAnswerValue", + queryQuestionAnswerTitle: baseUrl + "app/question.listQuestionTitle", + saveUserQuestionAnswerValue: baseUrl + "app/question.saveOwnerQuestionAnswer", listMachineTranslates: baseUrl + "app/machineTranslate.listMachineTranslates", generatorHcCode: baseUrl + "app/userLogin/generatorHcCode", queryApplyRoomDiscount: baseUrl + "app/applyRoomDiscount/queryApplyRoomDiscount", diff --git a/pages/questionAnswer/questionAnswerDetail.vue b/pages/questionAnswer/questionAnswerDetail.vue index 8190516..e74871d 100644 --- a/pages/questionAnswer/questionAnswerDetail.vue +++ b/pages/questionAnswer/questionAnswerDetail.vue @@ -1,21 +1,27 @@ @@ -63,10 +65,16 @@ export default { data() { return { - qaInfo: {}, + qaInfo: { + qaName:'', + ownerName:'', + link:'', + roomName:'', + userQaId:'' + }, titles: [], qaId: '', - objType: '' + communityId: '' }; }, @@ -76,16 +84,15 @@ onLoad: function(options) { let that = this; context.onLoad(options); + this.communityId = context.getCurrentCommunity().communityId; this.qaId = options.qaId; - this.objType = options.objType this._queryQuestionAnswer(); queryQuestionAnswerTitle({ - objType: this.objType, qaId: this.qaId, page: 1, row: 100, - objId:'' + communityId: this.communityId }) .then(_data => { _data.data.forEach(item => { @@ -94,7 +101,7 @@ } else if (item.titleType == '2002') { // checked: false item.radio = []; - item.questionAnswerTitleValues.forEach(value => { + item.titleValues.forEach(value => { item.radio.push({ checked: false, valueId: value.valueId, @@ -114,18 +121,17 @@ */ onShareAppMessage: function() {}, methods: { - _queryQuestionAnswer: function(){ + _queryQuestionAnswer: function() { let that = this; queryQuestionAnswer({ - page:1, - row:1, - qaTypes:'1001,3003', - objType:'3306', - qaId: that.qaId, - }) - .then(_data=>{ - that.qaInfo = _data.data[0]; - }) + page: 1, + row: 1, + qaType: '3003', + communityId: that.communityId, + }) + .then(_data => { + that.qaInfo = _data.data[0]; + }) }, radioChange: function(e, item) { console.log(e, item) @@ -138,7 +144,7 @@ }) item.radio.forEach(value => { - e.detail.value.forEach(_dValue =>{ + e.detail.value.forEach(_dValue => { if (value.valueId == _dValue) { if (value.selected == '0') { value.selected = '1'; @@ -158,7 +164,6 @@ let _titles = this.titles; let _valueId = ''; _titles.forEach(item => { - if (item.titleType == '2002') { item.radio.forEach(_radio => { if (_radio.selected == '1') { @@ -181,9 +186,9 @@ let obj = { "qaId": this.qaId, - "objType": this.objType, - "objId": context.getCurrentCommunity().communityId, + "communityId": this.communityId, "answerType": '1002', + "userQaId":this.qaInfo.userQaId, questionAnswerTitles: _questionAnswerTitles } @@ -217,17 +222,16 @@ font-weight: 400; font-size: 14px; color: rgba(69, 90, 100, .6); - padding: 40rpx 30rpx 0rpx; + padding: 10rpx 20rpx 15upx; } .button_up_blank { height: 40rpx; } - - .img-bg{ - - } - .qa-img{ + + .img-bg {} + + .qa-img { width: 100%; }