detail.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <view>
  3. <view class="loading-content" v-if="loading">
  4. <view class="store-header">
  5. <view class="logo"><view class="skeleton-line animate"></view></view>
  6. <view class="info">
  7. <view class="skeleton-line animate"></view>
  8. <view class="skeleton-line animate mt15"></view>
  9. </view>
  10. </view>
  11. <view class="store-detail">
  12. <view class="detail-left">
  13. <view class="skeleton-line animate"></view>
  14. <view class="skeleton-line animate mt15"></view>
  15. </view>
  16. </view>
  17. <view class="store-goods">
  18. <view class="goods-item" v-for="(item,index) in 3" :key="index">
  19. <view class="image"><view class="skeleton-line animate"></view></view>
  20. <view class="info">
  21. <view class="skeleton-line animate"></view>
  22. <view class="skeleton-line animate mt15"></view>
  23. <view class="skeleton-line animate mt15"></view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. <block v-else>
  29. <view class="ts-header">
  30. <view class="ts-h-title">投诉门店</view>
  31. <view class="store-info">
  32. <view class="store-left">
  33. <view class="name">{{dataInfo.store.poi_name}}</view>
  34. <view class="address">{{dataInfo.store.poi_address}}</view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="ts-body">
  39. <view class="order-status" v-if="dataInfo.status == 0">
  40. <image src="https://jymini.oss-cn-guangzhou.aliyuncs.com/mini/complaint-2.svg"></image>
  41. </view>
  42. <view class="order-status" v-if="dataInfo.status == 1">
  43. <image src="https://jymini.oss-cn-guangzhou.aliyuncs.com/mini/complaint-3.svg"></image>
  44. </view>
  45. <view class="ts-form">
  46. <view class="ts-form-item">
  47. <view class="form-title">具体问题 <text>*</text></view>
  48. <view class="form-input">
  49. {{dataInfo.question}}
  50. </view>
  51. </view>
  52. <view class="ts-form-item">
  53. <view class="form-title">问题订单 <text>*</text></view>
  54. <view class="form-input">
  55. {{dataInfo.order_sn}}
  56. </view>
  57. </view>
  58. <view class="ts-form-item">
  59. <view class="form-title">联系方式</view>
  60. <view class="form-input">
  61. {{dataInfo.mobile}}
  62. </view>
  63. </view>
  64. <view class="ts-form-item">
  65. <view class="form-title">详细补充 <text>*</text></view>
  66. <view class="form-input-text">
  67. {{dataInfo.content}}
  68. </view>
  69. </view>
  70. <view class="ts-form-item">
  71. <view class="form-title">回复结果 <text>*</text></view>
  72. <view class="form-input-text">
  73. <view class="data" v-html="dataInfo.remark"></view>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. </block>
  79. </view>
  80. </template>
  81. <script>
  82. var app;
  83. import * as Api from "@/static/api/complaint.js";
  84. export default {
  85. data() {
  86. return {
  87. options:null,
  88. disabled:false,
  89. dataInfo:null,
  90. loading:true
  91. }
  92. },
  93. onLoad(options) {
  94. app = this;
  95. app.options = options;
  96. app.getDetail()
  97. },
  98. methods: {
  99. tipsPop(){
  100. app.$refs.tspopup.close()
  101. },
  102. getDetail(){
  103. app.loading = true;
  104. Api.detail(app.options).then((res)=>{
  105. app.loading = false;
  106. if (res.code == 0) {
  107. app.$dialog.showSuccess(validation,"none",function(){
  108. uni.navigateBack()
  109. });
  110. return false;
  111. }
  112. app.dataInfo = res.data;
  113. })
  114. },
  115. submitTs(){
  116. var validation = form.validation(app.options,[
  117. {name:"content",rule:["required"],msg:["请输入描述内容"]}
  118. ]);
  119. if(validation){
  120. app.$dialog.showSuccess(validation);
  121. return false;
  122. }
  123. Api.complaint(app.options).then((res)=>{
  124. if (res.code == 0) {
  125. return app.$dialog.showSuccess(res.msg);
  126. }
  127. app.$dialog.showSuccess(res.msg,"none",function(){
  128. uni.navigateBack()
  129. });
  130. })
  131. }
  132. }
  133. }
  134. </script>
  135. <style>
  136. page{background-color: #f8f8f8;}
  137. .loading-content{margin: 20upx;}
  138. .form-input-text{font-size: 28upx;line-height: 43upx;}
  139. .form-input-text image{width: 100%;}
  140. .form-input-text img{width: 100%;}
  141. .ts-popup{background-color: #fff;width: 90vw;border-radius: 20upx;}
  142. .ts-popup .title{font-size: 32upx;color: #333;font-weight: bold;padding: 30upx 0;text-align: center;}
  143. .ts-popup .sub-title{color: #f00;padding: 20upx 0;text-align: center;font-size: 28upx;}
  144. .ts-popup .tips-body{width: 90%;margin: 0 auto;}
  145. .ts-popup .tips-body .item-title{font-size: 28upx;color: #333;padding: 15upx 0;}
  146. .ts-popup .tips-body .item-desc{font-size: 28upx;color: #333;line-height: 46upx;margin-bottom: 20upx;}
  147. .ts-popup .pup-close{padding-top: 40upx;}
  148. .ts-popup .pup-close .pop-btn{border: 0;background-color: #f00;font-size: 32upx;color: #fff;border-radius: 0 0 20upx 20upx;padding: 15upx 0;cursor: pointer;}
  149. .ts-header{padding: 20upx 0;margin-bottom: 20upx;}
  150. .ts-header .ts-h-title{font-size: 28upx;color: #666;padding: 20upx;}
  151. .ts-header .store-info{background-color: #fff;padding: 20upx;}
  152. .ts-header .store-info .store-left .name{font-size: 30rpx;color: #333;font-weight: bold;line-height: 80upx;}
  153. .ts-header .store-info .store-left .address{font-size: 24rpx;color: #999;}
  154. .ts-body{background-color: #fff;padding: 20upx;position: relative;}
  155. .ts-body .order-status{position: absolute;right: 20upx;top: 20upx;}
  156. .ts-body .order-status image{width: 120upx;height: 120upx;transform: rotate(45deg);}
  157. .ts-form .ts-form-item{border-bottom: 2upx solid #f8f8f8;padding-bottom: 10upx;}
  158. .ts-form .ts-form-item:last-child{border-bottom: 0;}
  159. .ts-form .ts-form-item .form-title{color: #333;font-size: 28upx;padding: 20upx 0;}
  160. .ts-form .ts-form-item .form-title text{color: #f00;margin-left: 10upx;}
  161. .ts-form .ts-form-item .form-input{font-size: 28upx;color: #333;height: 80upx;display: flex;align-items: center;}
  162. .ts-form .ts-form-item .ts-input{height: 100%;border: 0;box-shadow: none;width: 100%;}
  163. .ts-form .form-input-textarea{height: 200upx;font-size: 28upx;color: #333;}
  164. .footer{position: fixed;bottom: 0;background-color: #fff;padding: 20upx 20upx 0 20upx;border-top: 2upx solid #f8f8f8;left: 0;right: 0;}
  165. .footer .footer-safe {height: env(safe-area-inset-bottom);width: 100%;}
  166. .footer .footer-btn{padding: 20upx 0;}
  167. .footer .footer-btn .btn{color: #fff;background-color: #f00;border-radius: 10upx;}
  168. </style>