feedback.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <view class="padding-30">
  3. <textarea name="" class="text-area" cols="30" rows="10" v-model="value"
  4. placeholder="请提出您遇到的问题,或者反馈意见~"></textarea>
  5. <!-- <view class="imgg">
  6. <view class="chooseImg" v-for="(item,index) in imgList">
  7. <image :src="item" mode=""></image>
  8. <image src="../../static/user/delete.png" class="del" mode="" @click="dele(index)"></image>
  9. </view>
  10. <view class="chooseImg" @click="shangchaun">
  11. <image src="../../static/img/chooseImg.png" mode=""></image>
  12. </view>
  13. </view> -->
  14. <view class="button" @click="proposal">
  15. 提交
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import {proposal} from '@/api/user.js'
  21. import { upload } from '@/api/order.js';
  22. export default {
  23. data() {
  24. return {
  25. value: '', //反馈内容
  26. imgList: [] ,//照片
  27. up:false
  28. }
  29. },
  30. methods: {
  31. proposal(){
  32. proposal({
  33. content:this.value,
  34. }).then(()=>{
  35. uni.showModal({
  36. title: '提示',
  37. content: '提交成功',
  38. showCancel: false,
  39. success: res => {},
  40. fail: () => {},
  41. complete: () => {}
  42. });
  43. })
  44. },
  45. //上传图片
  46. shangchaun() {
  47. const that = this;
  48. upload({
  49. filename: ''
  50. }).then(res => {
  51. that.imgList.push(res[0].url)
  52. });
  53. },
  54. dele(index) {
  55. console.log('删除');
  56. this.imgList.splice(index, 1)
  57. console.log(this.imgList);
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss">
  63. page {
  64. width: 750rpx;
  65. height: 100%;
  66. margin: 0;
  67. padding: 0;
  68. background: #111111;
  69. .text-area {
  70. color: aliceblue;
  71. width: 750rpx;
  72. height: 400rpx;
  73. background: #181818;
  74. padding: 40rpx 20rpx;
  75. }
  76. .imgg {
  77. display: flex;
  78. flex-grow: 4;
  79. flex-grow: 4;
  80. }
  81. .chooseImg {
  82. position: relative;
  83. border-radius: 20rpx;
  84. width: 160rpx;
  85. height: 160rpx;
  86. margin: 20rpx;
  87. .del {
  88. width: 40rpx;
  89. height: 40rpx;
  90. position: absolute;
  91. z-index: 1000;
  92. top:0;
  93. right: 0;
  94. }
  95. image {
  96. width: 100%;
  97. height: 100%;
  98. }
  99. }
  100. }
  101. .button{
  102. width: 560rpx;
  103. height: 90rpx;
  104. background: linear-gradient(270deg, #6E8DF7, #9977F6);
  105. border-radius: 45rpx;
  106. font-size: 36rpx;
  107. font-weight: 500;
  108. color: #FFFFFF;
  109. margin: 50rpx auto;
  110. text-align: center;
  111. line-height: 90rpx;
  112. }
  113. </style>