铝交易,微信公众号
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

220 lines
4.8 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <view class="page">
  3. <navbar :title="$t('components.helpFeedback')" leftClick @leftClick="$utils.navigateBack"/>
  4. <view class="frame">
  5. <!--帮助与反馈-->
  6. <view class="helpFeedback">
  7. <view class="title"> {{ $t('components.helpAndFeedback') }} <span style="color: red;">*</span></view>
  8. <view class="desc">
  9. <textarea :placeholder="$t('components.pleaseSubmit')"/>
  10. </view>
  11. </view>
  12. <!--问题截图-->
  13. <view class="problemImg">
  14. <view class="title">{{ $t('components.screenshot') }} <span style="color: red;">*</span></view>
  15. <view class="img">
  16. <uv-upload
  17. :fileList="fileList"
  18. :maxCount="5"
  19. multiple
  20. width="150rpx"
  21. height="150rpx"
  22. @delete="deleteImage"
  23. @afterRead="afterRead"
  24. :previewFullImage="true">
  25. </uv-upload>
  26. </view>
  27. </view>
  28. <!--联系方式-->
  29. <view class="name_phone">
  30. <view class="title">{{ $t('components.contactInfo') }} <span style="color: red;">*</span></view>
  31. <view class="items">
  32. <view class="item">
  33. <view>{{ $t('components.contactName') }}</view>
  34. <view>
  35. <input :placeholder="$t('components.enterContactName')" clearable></input>
  36. </view>
  37. </view>
  38. <view class="item">
  39. <view>{{ $t('components.lxPhone') }}</view>
  40. <view>
  41. <input :placeholder="$t('components.plePhoneNumber')" clearable></input>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <!--提交反馈-->
  47. <view class="btns">
  48. <view @click="submitFeedback" class="btn">
  49. {{ $t('components.submitFeedback') }}
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. import topbar from "@/components/base/topbar.vue";
  57. import tabber from "@/components/base/tabbar.vue";
  58. export default {
  59. name: "helpFeedback",
  60. components: {tabber, topbar},
  61. data() {
  62. return {
  63. fileList: [],
  64. form: {
  65. "content": "",
  66. "proofImg": "",
  67. "userName": "",
  68. "userPhone": ""
  69. }
  70. }
  71. },
  72. methods: {
  73. // 提交反馈
  74. submitFeedback() {
  75. this.form.proofImg = this.fileList.join(",")
  76. this.$api('addSuggest', this.form, res => {
  77. if (res.code === 200) {
  78. uni.showToast({
  79. title: '',
  80. icon: 'success',
  81. duration: 2000
  82. })
  83. setTimeout(() => {
  84. uni.navigateBack(-1)
  85. }, 1000)
  86. }
  87. })
  88. },
  89. deleteImage(e) {
  90. this.fileList.splice(e.index, 1)
  91. },
  92. afterRead(e) {
  93. let self = this
  94. e.file.forEach(file => {
  95. self.$Oss.ossUpload(file.url).then(url => {
  96. self.fileList.push({
  97. url
  98. })
  99. })
  100. })
  101. },
  102. },
  103. }
  104. </script>
  105. <style scoped lang="scss">
  106. .page {
  107. height: 100vh;
  108. background-color: #f2f5f5;
  109. .frame {
  110. padding: 40rpx;
  111. display: flex;
  112. flex-direction: column;
  113. justify-content: center;
  114. gap: 40rpx;
  115. .helpFeedback {
  116. .title {
  117. }
  118. .desc {
  119. margin-top: 20rpx;
  120. height: 300rpx;
  121. border-radius: 40rpx;
  122. overflow: hidden;
  123. padding: 20rpx;
  124. font-size: 28rpx;
  125. background-color: #fff;
  126. }
  127. }
  128. .problemImg {
  129. .img {
  130. margin-top: 20rpx;
  131. height: 150rpx;
  132. border-radius: 40rpx;
  133. overflow: hidden;
  134. padding: 20rpx;
  135. font-size: 28rpx;
  136. background-color: #fff;
  137. }
  138. }
  139. .name_phone {
  140. .title {
  141. }
  142. .items {
  143. margin-top: 20rpx;
  144. .item {
  145. display: flex;
  146. align-items: center;
  147. background-color: #FFF;
  148. height: 80rpx;
  149. padding: 10rpx 0 0 20rpx;
  150. border-bottom: 1px solid #efefef;
  151. > view:nth-of-type(1) {
  152. width: 30%;
  153. // font-weight: 700;
  154. }
  155. > view:nth-of-type(2) {
  156. width: 70%;
  157. border-radius: 10rpx;
  158. overflow: hidden;
  159. input {
  160. background-color: #FFF;
  161. font-size: 28rpx;
  162. padding: 16rpx 8rpx 16rpx 15rpx;
  163. }
  164. }
  165. }
  166. }
  167. }
  168. .btns {
  169. width: 100%;
  170. display: flex;
  171. flex-direction: column;
  172. align-items: center;
  173. justify-content: center;
  174. gap: 20rpx;
  175. .btn {
  176. display: flex;
  177. align-items: center;
  178. justify-content: center;
  179. width: 500rpx;
  180. height: 70rpx;
  181. border-radius: 40rpx;
  182. color: #FFF;
  183. font-size: 28rpx;
  184. margin: 20rpx 10rpx 0 0;
  185. background: $uni-color;
  186. //margin-top: 20rpx;
  187. border-radius: 40rpx;
  188. }
  189. }
  190. }
  191. }
  192. </style>