commentback.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="layout">
  3. <TextArea :tips="tips" @submitValue="submitValue"/>
  4. <view>
  5. <view>添加图片(最多3张)</view>
  6. <uploadImage @getImg="getImg" />
  7. </view>
  8. <view class="submitRemin" @click="submitRemin">提交</view>
  9. </view>
  10. </template>
  11. <script>
  12. import TextArea from '@/component/textarea.vue'
  13. import uploadImage from '@/component/uploadImage.vue'
  14. export default {
  15. components: {
  16. TextArea,
  17. uploadImage
  18. },
  19. data() {
  20. return{
  21. tips:'您有什么意见或反馈,请告诉我们',
  22. valueNumber: 0,
  23. imageList:[],
  24. size: 25,
  25. goodComment:'',
  26. }
  27. },
  28. onUnload() {
  29. },
  30. methods: {
  31. getImg(e) {
  32. console.log(e);
  33. this.imageList = e;
  34. },
  35. submitValue(e) {
  36. this.goodComment = e.detail.value;
  37. },
  38. submitRemin() {
  39. if(this.goodComment == '') {
  40. this.$msg("请输入意见反馈");
  41. return;
  42. }
  43. let images = this.imageList.join(',');
  44. this.request({
  45. url: '/v2/member/feedback',
  46. method: 'post',
  47. data: {
  48. content: this.goodComment,
  49. images: images
  50. },
  51. success: (res) => {
  52. if(res.data.code == 1000) {
  53. this.$msg("感谢您的反馈");
  54. setTimeout(() => {
  55. uni.navigateBack();
  56. }, 1000);
  57. }
  58. }
  59. })
  60. }
  61. }
  62. }
  63. </script>
  64. <style lang="scss">
  65. .layout {
  66. padding: 0 32upx;
  67. .assessHead {
  68. padding: 20upx 0;
  69. }
  70. .deepHeight {
  71. height: 108upx;
  72. width: 108upx;
  73. }
  74. }
  75. </style>