commentback.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. this.imageList = e;
  33. },
  34. submitValue(e) {
  35. this.goodComment = e.detail.value;
  36. },
  37. submitRemin() {
  38. if(this.goodComment == '') {
  39. this.$msg("请输入意见反馈");
  40. return;
  41. }
  42. let images = this.imageList.join(',');
  43. this.request({
  44. url: '/v2/member/feedback',
  45. method: 'post',
  46. data: {
  47. content: this.goodComment,
  48. images: images
  49. },
  50. success: (res) => {
  51. if(res.data.code == 1000) {
  52. this.$msg("感谢您的反馈");
  53. setTimeout(() => {
  54. uni.navigateBack();
  55. }, 1000);
  56. }
  57. }
  58. })
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss">
  64. .layout {
  65. padding: 0 32upx;
  66. .assessHead {
  67. padding: 20upx 0;
  68. }
  69. .deepHeight {
  70. height: 108upx;
  71. width: 108upx;
  72. }
  73. }
  74. </style>