反馈接口对接

This commit is contained in:
仲么了
2023-04-10 09:48:03 +08:00
parent 89eb283368
commit ee55de8bf4
6 changed files with 132 additions and 37 deletions

View File

@@ -3,9 +3,9 @@
<view slot='body'>
<view class='detail'>
<view class="detail-content ">
<view class="detail-content-title mb20">机器不稳定</view>
<view> 2023-02-14</view>
<view class="mt10 mb10">机器不稳定机器不稳定机器不稳定机器不稳定机器不稳定</view>
<view class="detail-content-title mb20">{{ pageData.title }}</view>
<view> {{ pageData.createTime }}</view>
<view class="mt10 mb10">{{ pageData.description }}</view>
<uni-file-picker readonly v-model="imageValue" mode="grid" />
</view>
<view class="detail-content " style="margin-bottom:0">
@@ -15,15 +15,15 @@
</view>
</view>
<uni-list>
<uni-list-item title="客服" note="已经安排专员处理,请保持电话畅通" rightText="09-13 10:52" />
<uni-list-item title="用户名" note="重启还是不行" rightText="09-13 10:50" />
<uni-list-item title="客服" note="重启试试" rightText="09-13 09:50" />
<uni-list-item :title="item.createBy" :note="item.chatContent" :rightText="item.createTime"
v-for="(item, index) in pageData.csFeedbackChatPOList" :key="index" />
</uni-list>
<!-- 输入框示例 -->
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" type="info" mode="input" title="输入内容" value="对话框预置提示内容!"
placeholder="请输入内容" @confirm="dialogInputConfirm">
<uni-easyinput type="textarea" :maxlength="250" autoHeight v-model="value" placeholder="请输入内容"></uni-easyinput>
<uni-easyinput type="textarea" :maxlength="250" autoHeight v-model="chatContent"
placeholder="请输入内容"></uni-easyinput>
</uni-popup-dialog>
</uni-popup>
</view>
@@ -31,23 +31,53 @@
</Cn-page>
</template>
<script>
import { queryFeedBackDetail, AddFeedbackChat, updateChatStatus } from '../../common/api/feedback'
export default {
data () {
data() {
return {
loading: false,
value: "",
chatContent: "",
imageValue: [
{
"name": "file.png",
"extname": "png",
"url": "/static/logo.png",
}
]
],
pageData: {
},
pageOption: {}
}
},
onLoad(o) {
this.pageOption = o
this.init()
if (o.chatCount > 0) {
updateChatStatus({
id: o.id,
})
}
},
methods: {
open () {
init() {
this.loading = true
queryFeedBackDetail(this.pageOption.id).then(res => {
// 反转数组
res.data.csFeedbackChatPOList.reverse()
this.pageData = res.data
this.loading = false
console.log(res);
})
},
dialogInputConfirm() {
AddFeedbackChat({ chatContent: this.chatContent, id: this.pageOption.id }).then(res => {
console.log(res);
this.$util.toast('回复成功')
this.init()
this.chatContent = ''
})
},
open() {
this.$refs.inputDialog.open()
}
}