建材商城系统20241014
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.

175 lines
3.6 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. <template>
  2. <!-- 帮助与反馈 -->
  3. <view class="help">
  4. <navbar title="帮助与反馈" leftClick @leftClick="$utils.navigateBack" />
  5. <view class="help-box">
  6. <view>
  7. <view class="help-issue">
  8. <text>问题和意见</text>
  9. <text style="color: #BD3624;">*</text>
  10. </view>
  11. <uv-textarea v-model="form.title" :count="true" border="none" height="400"
  12. placeholder="请把发现的问题提交给我们,感谢您的参与(必填)"
  13. :text-style="{color:'#BCB7B7',fontSize:'28rpx'}" />
  14. </view>
  15. <view>
  16. <view class="help-issue">
  17. <text>问题截图</text>
  18. <!-- <text style="color: #BD3624;">*</text> -->
  19. </view>
  20. <view class="help-screenshot">
  21. <uv-upload :fileList="fileList" multiple :maxCount="3" width="180rpx"
  22. height="180rpx" multiple @afterRead="afterRead" @delete="deleteImage">
  23. <image src="../static/help/uploading.png" mode="aspectFill"
  24. style="width: 180rpx;height: 180rpx;" />
  25. </uv-upload>
  26. </view>
  27. </view>
  28. <view>
  29. <view class="help-issue">
  30. <text>联系方式</text>
  31. <text style="color: #BD3624;">*</text>
  32. </view>
  33. <view class="form-sheet-cell">
  34. <view>
  35. 联系姓名
  36. </view>
  37. <input placeholder="请输入联系姓名" v-model="form.name" />
  38. </view>
  39. <view class="form-sheet-cell">
  40. <view>
  41. 联系电话
  42. </view>
  43. <input placeholder="请输入联系电话" v-model="form.phone" />
  44. </view>
  45. </view>
  46. <view class="help-button">
  47. <!-- <view>历史提交</view> -->
  48. <view @click="submit">确认</view>
  49. </view>
  50. </view>
  51. <quick-order-entry
  52. ref="quickOrderEntry"
  53. />
  54. </view>
  55. </template>
  56. <script>
  57. export default {
  58. data() {
  59. return {
  60. form : {
  61. title : '',
  62. phone : '',
  63. name : '',
  64. image : '',
  65. },
  66. fileList: []
  67. }
  68. },
  69. onLoad(args) {
  70. },
  71. methods: {
  72. deleteImage(e){
  73. this.fileList.splice(e.index, 1)
  74. },
  75. afterRead(e){
  76. let self = this
  77. e.file.forEach(file => {
  78. self.$Oss.ossUpload(file.url).then(url => {
  79. self.fileList.push({
  80. url
  81. })
  82. })
  83. })
  84. },
  85. submit(){
  86. let data = JSON.parse(JSON.stringify(this.form))
  87. if(this.$utils.verificationAll(this.form, {
  88. title : '请输入你的问题和意见',//问题和意见
  89. // image : '请上传截图',//
  90. name : '请输入姓名',//
  91. phone : '请输入手机号码',//手机号码
  92. })){
  93. return
  94. }
  95. data.image = this.fileList.map((item) => item.url).join(",")
  96. this.$api('addHelp', data, res => {
  97. if(res.code == 200){
  98. uni.showToast({
  99. title: "反馈成功",
  100. icon:'none'
  101. })
  102. setTimeout(uni.navigateBack, 800, -1)
  103. }
  104. })
  105. },
  106. }
  107. }
  108. </script>
  109. <style scoped lang="scss">
  110. .help {
  111. .help-box {
  112. width: 92%;
  113. margin-left: 4%;
  114. .help-issue {
  115. margin: 20rpx;
  116. font-size: 28rpx;
  117. font-weight: 600;
  118. color: #333333;
  119. }
  120. .help-screenshot {
  121. display: flex;
  122. align-items: center;
  123. background-color: #fff;
  124. padding: 20rpx;
  125. }
  126. .form-sheet-cell{
  127. display: flex;
  128. background-color: #fff;
  129. padding: 20rpx 30rpx;
  130. font-size: 24rpx;
  131. align-items: center;
  132. view{
  133. width: 150rpx;
  134. }
  135. }
  136. .help-button {
  137. display: flex;
  138. justify-content: center;
  139. font-size: 24rpx;
  140. flex-shrink: 0;
  141. margin-top: 60rpx;
  142. view {
  143. padding: 14rpx 120rpx;
  144. border-radius: 38rpx;
  145. }
  146. view:nth-child(1) {
  147. background: $uni-color;
  148. color: #fff;
  149. }
  150. view:nth-child(2) {
  151. color: #FFFDF6;
  152. background-color: #C83741;
  153. }
  154. }
  155. }
  156. }
  157. </style>