多租户商城-商户小程序端
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.

173 lines
4.4 KiB

2 years ago
2 years ago
2 years ago
  1. <template>
  2. <view class="container">
  3. <global-loading />
  4. <!-- 平台介入 -->
  5. <view class="addEvaluate-box flex-items-plus flex-column-plus">
  6. <view class="addEvaluate flex-column-plus">
  7. <view class="fs26 mar-top-40 mar-left-20 addEvaluateText"><label>*</label>问题描述</view>
  8. <view class="textarea-box mar-top-20 mar-left-20">
  9. <textarea class="textarea-text" v-model="commentText" maxlength="200" placeholder-style="color:#BBBBBB" placeholder="填写相关问题"/>
  10. </view>
  11. <view class="fs26 mar-top-40 mar-left-20 addEvaluateText"><label>*</label>举证照片</view>
  12. <view class="mar-left-10 mar-top-10 evaluateImg">
  13. <u-upload upload-text="上传凭证" :action="action" ref="uUpload" :limitType="['png', 'jpg', 'jpeg', 'webp', 'gif', 'image']" :header="headerToken" :form-data="formData"></u-upload>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="butBox flex-items-plus mar-left-30">
  18. <view class="submitbut" @click="submitTap">提交</view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. const NET = require('../../utils/request')
  24. const API = require('../../config/api')
  25. export default {
  26. data() {
  27. return {
  28. addCommentVOList:{},
  29. orderProductVO:{},
  30. commentText:'',
  31. fileList:[],
  32. commentImgsFlag:false,
  33. commentImgs:'',
  34. action:API.UploadUrl,
  35. formData:{'folderId': -1},
  36. headerToken:{Authorization:''},
  37. productImage:'',
  38. afterId: 0,
  39. orderId: 0
  40. }
  41. },
  42. onLoad(options) {
  43. this.afterId = options.afterId;
  44. this.orderId = options.orderId;
  45. },
  46. onReady() {
  47. this.fileList = this.$refs.uUpload.lists
  48. },
  49. methods: {
  50. submitTap(){
  51. if (!this.commentText) {
  52. uni.showToast({
  53. title: '请先说点什么吧',
  54. icon: 'none'
  55. })
  56. return false
  57. }
  58. if(this.fileList.length>0){
  59. this.commentImgsFlag = true
  60. for(let i=0;i<this.fileList.length;i++){
  61. this.commentImgs += this.fileList[i].response.data.url+','
  62. }
  63. } else {
  64. uni.showToast({
  65. title:'请上传举证图片',
  66. })
  67. return false
  68. }
  69. // uni.showLoading({
  70. // title:'正在申请介入...'
  71. // })
  72. NET.request(API.platform, {
  73. afterId: this.afterId,
  74. orderId: this.orderId,
  75. image: this.commentImgs,
  76. reason: this.commentText
  77. }, 'POST').then(res => {
  78. uni.hideLoading()
  79. this.intervention = false
  80. uni.showToast({
  81. title:'申请成功',
  82. })
  83. setTimeout(() => {
  84. uni.navigateTo({
  85. url:`../../pages_category_page2/orderModule/afterSale`
  86. })
  87. }, 2000)
  88. }).catch(res => {
  89. uni.hideLoading()
  90. })
  91. }
  92. }
  93. }
  94. </script>
  95. <style lang="scss">
  96. page{
  97. background-color: #F7F7F7;
  98. }
  99. .container{
  100. .addEvaluate-box{
  101. margin-top: 20upx;
  102. .addEvaluate{
  103. width: 690upx;
  104. background-color: #FFFFFF;
  105. border-radius: 10upx;
  106. padding-bottom: 30upx;
  107. .addEvaluateText {
  108. font-weight: 400;
  109. label {
  110. color: #C5AA7B;
  111. margin-right: 10rpx;
  112. }
  113. }
  114. }
  115. .textarea-box{
  116. .textarea-text{
  117. width: 610upx;
  118. height: 200upx;
  119. background-color: #FFFFFF;
  120. font-size: 26upx;
  121. padding: 20upx 20upx;
  122. border: 2rpx solid #E4E5E6;
  123. }
  124. }
  125. .addPicture-box{
  126. background-color: #F5F5F5;
  127. width: 40upx;
  128. height: 40upx;
  129. margin-top: 100upx;
  130. margin-left: 100upx;
  131. border-radius: 10upx;
  132. display: flex;
  133. justify-content: center;
  134. align-items: center;
  135. color: #BBBBBB;
  136. }
  137. }
  138. .butBox{
  139. position: absolute;
  140. bottom: 40upx;
  141. .submitbut{
  142. height: 100upx;
  143. width: 690upx;
  144. background: #333333;
  145. color: #FFEBC4;
  146. font-size: 28upx;
  147. text-align: center;
  148. line-height: 100upx;
  149. }
  150. }
  151. }
  152. </style>
  153. <style scoped>
  154. .evaluateImg /deep/ .u-upload .u-list-item {
  155. background: none;
  156. border: 2rpx solid #E4E5E6;
  157. border-radius: 0;
  158. }
  159. .evaluateImg /deep/ .u-upload .u-list-item .uicon-plus:before {
  160. content: '';
  161. height: 71rpx;
  162. width: 71rpx;
  163. background: url("https://ceres.zkthink.com/static/images/addImg.png") no-repeat center center;
  164. display: block;
  165. background-size: contain;
  166. }
  167. .evaluateImg /deep/ .u-add-tips {
  168. color: #999999 !important;
  169. }
  170. </style>