点赞点踩接口对接

main
guanxiaohan 11 months ago
parent f61223c889
commit cfaf1cce4f
  1. 4
      common/globalJs/globalJs.js
  2. 3
      pages/index/index.vue
  3. 41
      pages/knowledge/index.vue

@ -2,8 +2,8 @@
// #ifdef APP-PLUS || MP
// const baseUrl = "http://116.62.210.143:9002";
// const baseUrl = "http://118.89.79.160:8800/HiatmpPro";
// const baseUrl = "http://49.235.207.167:8800/HiatmpPro";
const baseUrl = "http://219.147.31.25:30001/tht-app-api/HiatmpPro";
const baseUrl = "http://49.235.207.167:8800/HiatmpPro";
// const baseUrl = "http://219.147.31.25:30001/tht-app-api/HiatmpPro";
const chatUrl = "http://219.147.31.25:30001/hitap";
// #endif
// #ifdef H5

@ -155,10 +155,11 @@
let datas = {
nuserid: this.$.getData('token'),
status: '10',
// approve: '1'
}
this.loadmorestatus = 'loading'
this.$request.globalRequest(
`/hiddenDanger/highDanger/getHigDangerDealt?pageNum=${this.page}&pageSize=${10}`, datas, 'POST')
`/hiddenDanger/highDanger/getHigDangerDealt?pageNum=${this.page}&pageSize=${10}&approve=${'1'}`, datas, 'POST')
.then(res => {
this.loadmorestatus = 'loadmore'
if (res.code === 200) {

@ -37,8 +37,17 @@
<zeroMarkdownView :markdown="item.data" />
<!-- <ua-markdown :source="mdvalue" /> -->
<view class="icon" v-show="item.answerId != '0' && item.isOver && item.isSuccess">
<uni-icons :type="iconsType == '' ? 'hand-up' : (iconsType == 'handUp' ? 'hand-up-filled' : 'hand-up')" :color="iconsType == 'handUp' ? '#FFD131' : ''" size="22" @click="clickIcon('handUp')"></uni-icons>
<uni-icons :type="iconsType == '' ? 'hand-down' : (iconsType == 'handDown' ? 'hand-down-filled' : 'hand-down')" size="22" @click="clickIcon('handDown')"></uni-icons>
<uni-icons
:type="iconsType == '' ? 'hand-up' : (iconsType == 'handUp' ? 'hand-up-filled' : 'hand-up')"
:color="iconsType == 'handUp' ? '#FFD131' : ''"
size="22"
@click="clickIcon('handUp', item.qaId)">
</uni-icons>
<uni-icons
:type="iconsType == '' ? 'hand-down' : (iconsType == 'handDown' ? 'hand-down-filled' : 'hand-down')"
size="22"
@click="clickIcon('handDown', item.qaId)">
</uni-icons>
</view>
</view>
</view>
@ -157,7 +166,7 @@
}
},
methods: {
clickIcon(type) {
async clickIcon(type, qaId) {
if(this.iconsType == '') {
this.iconsType = type
} else {
@ -176,11 +185,28 @@
}
}
const params = {
qaId: '',
qaId,
feedbackStatus : this.iconsType == '' ? 0 : (this.iconsType == 'handUp' ? 1 : 2),
feedbackInfo: ''
}
// this.$request.globalRequest('/hitapChat/hitap/feadBack', params, 'POST').then(res => {})
// this.$request.globalRequest('/hitap/feadBack', params, 'POST').then(res => {
// })
const [err, res] = await uni.request({
url: this.$.chatUrl + "/feadBack",
dataType: "json",
method: "POST",
headers: {
"content-type": "application/json",
},
data: params
})
uni.showToast({
title: res.data.result,
// icon: 'success',
duration: 2000
});
},
handleTouchStart(e) {
//
@ -280,7 +306,7 @@
// this.active = data.tabkey - 1 > 0 ? data.tabkey - 1 : 0;
// }
if (res.data.result) {
this.changeMsgList("1", res.data.result);
this.changeMsgList("1", res.data.result, res.data.qaId);
}
this.loading = false;
} else {
@ -320,7 +346,7 @@
this.inputValue = "";
},
//
changeMsgList(answerId, data) {
changeMsgList(answerId, data, qaId) {
data = data.replace("undefined", '')
data = data.replace("null", '')
let id = 1;
@ -339,6 +365,7 @@
{
id,
answerId,
qaId,
data: newdata,
isSuccess: true,
},

Loading…
Cancel
Save