This commit is contained in:
2020-07-07 17:47:00 +08:00
parent 77083c0404
commit 5ede514a02
8 changed files with 230 additions and 90 deletions

View File

@@ -1,19 +1,19 @@
<template>
<view class="complaints">
<view class="complaints-box">
<view class="complaints-box" v-for="item in feedbackList" :key="item.fb_id">
<view class="suggestions">
<view class="text">您的满意是对我们最大的支持茫茫德铭阳光之中能够遇到亲也是我们的荣幸</view>
<view class="text">{{ item.fb_content }}</view>
<view class="image">
<image v-for="(url, index) in imgList" :key="index" :src="url"></image>
<image v-for="(url, index) in item.fb_images" :key="index" :src="url"></image>
</view>
</view>
<view class="reply">
<view class="reply-title">后台回复</view>
<view class="reply-content u-line-4">您的满意是对我们最大的支持茫茫德铭阳光之中能够遇到亲也是我们的荣幸您的评价是对我们付出最好的认可我们会不断前行不忘初衷给亲们提供更好的服务和产品!我把对您的谢意写在纸上被风吹走了;我把对您的谢意写在沙滩上被海浪卷走了;我只好把对您的谢意写在解释里这样才会永驻心间!感谢您对的支持!加油!加油! 祝您生活愉快工作顺利期待我们下次合作愉快! ! !</view>
<view class="reply-content u-line-4">{{ item.reply_content }}</view>
</view>
<view class="date">
<image src="../static/mine/26.png"></image>
<view>2020-05-14</view>
<view>{{ reply_time }}</view>
</view>
</view>
</view>
@@ -27,7 +27,9 @@ export default {
require('../static/mine/23.png'),
require('../static/mine/23.png'),
require('../static/mine/23.png')
]
],
feedbackList: [],
page: 1, // 默认1
}
},
onNavigationBarButtonTap() {
@@ -35,6 +37,18 @@ export default {
url: '/pageE/more/WriteComments'
});
},
onShow() {
this.getFeedbackList();
},
methods: {
getFeedbackList() {
this.$u.api.getFeedbackList({ page: this.page }).then(res => {
if(res.errCode == 0) {
this.feedbackList = res.data.feedbackList;
}
})
},
},
}
</script>
<style lang="scss" scoped>

View File

@@ -3,8 +3,7 @@
<view class="main-container">
<textarea auto-height placeholder="发表您的意见吧,我们会做得更好." maxlength="200" v-model="text" />
<u-upload
ref="uUpload"
@on-uploaded="onUploaded"
ref="uUpload"
:custom-btn="true"
:max-count="count"
:auto-upload="false"
@@ -21,6 +20,7 @@
export default {
data() {
return {
action: $u.http.baseUrl + 'Upload/uploadfile',
count: 4, // 最大图片数量
text: '',
imageList: []
@@ -28,11 +28,33 @@ export default {
},
methods: {
submit() {
this.$refs.uUpload.upload();
console.log(this.action);
console.log(this.imageList);
// this.$refs.uUpload.upload();
let promise = [];
this.imageList.forEach(url => {
// this.uploadImage(url);
})
Promise.all(promise).then(() => {
})
},
async uploadImage(file) {
this.$u.api.uploadfile({
file: file,
}).then(res => {
if(res.errCode == 0) {}
})
},
writeFeedback() {
this.$u.api.writeFeedback({
fb_content: this.text,
fb_images: '',
}).then(res => {
if(res.errCode == 0) {}
})
},
onUploaded(list) {
console.log(this.text, list)
}
},
}
</script>