|
|
|
@ -33,10 +33,10 @@ |
|
|
|
</view> |
|
|
|
<view class="input_section"> |
|
|
|
<view class="left_box"> |
|
|
|
<input class="input" type="text" placeholder="请输入"> |
|
|
|
<input class="input" v-model="formData.content" type="text" placeholder="请输入"> |
|
|
|
</view> |
|
|
|
<view class="right_box"> |
|
|
|
<image class="send_img" src="@/static/images/common/fa_song.png"></image> |
|
|
|
<image @click="submitForm()" class="send_img" src="@/static/images/common/fa_song.png"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -70,10 +70,7 @@ export default { |
|
|
|
tableList:[],//聊天数据列表 |
|
|
|
|
|
|
|
formData: { |
|
|
|
images_arr: [], |
|
|
|
images: '', |
|
|
|
content: '', |
|
|
|
mailbox: '', |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -166,32 +163,44 @@ export default { |
|
|
|
// console.log('接收AQ上传回调xxx2',this.formData.member_store_certification_arr) |
|
|
|
}, |
|
|
|
|
|
|
|
//发送站内信 |
|
|
|
async submitForm() { |
|
|
|
let data = {...this.formData} |
|
|
|
data.images = data.images_arr.join(',') |
|
|
|
let data = { |
|
|
|
hair_staff_id: this.filteredData.hair_staff_id, |
|
|
|
content: this.formData.content, |
|
|
|
} |
|
|
|
if (!data.content) { |
|
|
|
//反馈内容为必填项 |
|
|
|
uni.showToast({ |
|
|
|
title: '反馈内容为必填项', |
|
|
|
title: '请输入内容', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
let res = await memberApi.setFeedback(data) |
|
|
|
let res = await commonApi.sendMessage(data) |
|
|
|
if (res.code != 1) { |
|
|
|
uni.showToast({ |
|
|
|
title: res.msg, |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: '提交成功', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
//延迟1s执行 |
|
|
|
setTimeout(() => { |
|
|
|
this.$util.openHomeView(); |
|
|
|
}, 1000); |
|
|
|
let content = this.formData.content |
|
|
|
this.formData.content = ''//清空输入框 |
|
|
|
let msgData = { |
|
|
|
"id": '', |
|
|
|
"hair_staff_id": this.filteredData.hair_staff_id, |
|
|
|
"closed_staff_id": '', |
|
|
|
"content": content, |
|
|
|
"status": 1, |
|
|
|
"type": 2, |
|
|
|
"create_time": "", |
|
|
|
"redirect": null, |
|
|
|
"title": null, |
|
|
|
"direction": "right", |
|
|
|
"show_time": "" |
|
|
|
} |
|
|
|
//将发送的消息放在最下方 |
|
|
|
this.tableList = this.tableList.concat(msgData); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|