铝交易,微信公众号
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.

239 lines
5.0 KiB

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