特易招,招聘小程序
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.

171 lines
3.5 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
  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.question" :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. </view>
  52. </template>
  53. <script>
  54. export default {
  55. data() {
  56. return {
  57. form : {
  58. question : '',
  59. phone : '',
  60. name : '',
  61. image : '',
  62. },
  63. fileList: []
  64. }
  65. },
  66. onLoad(args) {
  67. },
  68. methods: {
  69. deleteImage(e){
  70. this.fileList.splice(e.index, 1)
  71. },
  72. afterRead(e){
  73. let self = this
  74. e.file.forEach(file => {
  75. self.$Oss.ossUpload(file.url).then(url => {
  76. self.fileList.push({
  77. url
  78. })
  79. })
  80. })
  81. },
  82. submit(){
  83. let data = JSON.parse(JSON.stringify(this.form))
  84. if(this.$utils.verificationAll(this.form, {
  85. question : '请输入你的问题和意见',//问题和意见
  86. // image : '请上传截图',//
  87. name : '请输入姓名',//
  88. phone : '请输入手机号码',//手机号码
  89. })){
  90. return
  91. }
  92. data.image = this.fileList.map((item) => item.url).join(",")
  93. this.$api('addQuestion', data, res => {
  94. if(res.code == 200){
  95. uni.showToast({
  96. title: "反馈成功",
  97. icon:'none'
  98. })
  99. setTimeout(uni.navigateBack, 800, -1)
  100. }
  101. })
  102. },
  103. }
  104. }
  105. </script>
  106. <style scoped lang="scss">
  107. .help {
  108. .help-box {
  109. width: 92%;
  110. margin-left: 4%;
  111. .help-issue {
  112. margin: 20rpx;
  113. font-size: 28rpx;
  114. font-weight: 600;
  115. color: #333333;
  116. }
  117. .help-screenshot {
  118. display: flex;
  119. align-items: center;
  120. background-color: #fff;
  121. padding: 20rpx;
  122. }
  123. .form-sheet-cell{
  124. display: flex;
  125. background-color: #fff;
  126. padding: 20rpx 30rpx;
  127. font-size: 24rpx;
  128. align-items: center;
  129. view{
  130. width: 150rpx;
  131. }
  132. }
  133. .help-button {
  134. display: flex;
  135. justify-content: center;
  136. font-size: 24rpx;
  137. flex-shrink: 0;
  138. margin-top: 60rpx;
  139. view {
  140. padding: 14rpx 120rpx;
  141. border-radius: 38rpx;
  142. }
  143. view:nth-child(1) {
  144. background: $uni-color;
  145. color: #fff;
  146. }
  147. view:nth-child(2) {
  148. color: #FFFDF6;
  149. background-color: #C83741;
  150. }
  151. }
  152. }
  153. }
  154. </style>