反馈接口对接
This commit is contained in:
@@ -1,26 +1,36 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<uni-list :border="false">
|
||||
<uni-list-item show-badge badgeType="error" isDot badge-text="新消息" title="机器死机" note="2023-02-03" clickable @click="jump" />
|
||||
<uni-list-item title="机器开不了机" note="2023-01-31" clickable @click="jump" />
|
||||
<uni-list-item :show-badge="item.chatCount > 0" badgeType="error" isDot badge-text="新消息" :title="item.title"
|
||||
:note="item.createTime" clickable v-for="(item, index) in store.data" :key="index" @click="jump(item)" />
|
||||
</uni-list>
|
||||
<uni-load-more status="nomore"></uni-load-more>
|
||||
<Cn-empty v-if="store.empty"></Cn-empty>
|
||||
<uni-load-more v-if="store.data && store.data.length > 0" :status="store.status"></uni-load-more>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { queryFeedBackPage } from '../../common/api/feedback'
|
||||
import list from '../../common/js/list'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
mixins: [list],
|
||||
data() {
|
||||
return {
|
||||
title: '灿能'
|
||||
}
|
||||
},
|
||||
onLoad () {
|
||||
|
||||
onShow() {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
jump(){
|
||||
uni.navigateTo({ url: '/pages/message/feedbackDetail' })
|
||||
init() {
|
||||
this.store = this.DataSource('/feedback/queryFeedBackPage')
|
||||
this.store.params.userId = uni.getStorageSync('userInfo').id
|
||||
this.store.reload()
|
||||
},
|
||||
jump(item) {
|
||||
uni.navigateTo({ url: '/pages/message/feedbackDetail?id=' + item.id +'&chatCount=' + item.chatCount })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user