时空网前端
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.

228 lines
6.7 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <template>
  2. <view>
  3. <mescroll-body ref="mescrollRef" @down="downCallback" :down="downOpt">
  4. <!-- 商品信息 -->
  5. <self-line/>
  6. <view class="bg-white padding-tb-sm">
  7. <skeleton :loading="skeletonLoading" :row="2" :showAvatar="false" :showTitle="true">
  8. <view class="flex justify-between align-start padding-top-sm padding-lr">
  9. <image src="@/static/tu.png" mode="aspectFill" style="width: 150rpx; height: 150rpx;"></image>
  10. <view class="flex-sub padding-left-sm">
  11. <view class="bref-box margin-top-xs">
  12. 网红辣椒棒 魔鬼辣椒挑战全网第一辣 网红优惠季
  13. </view>
  14. <text class="block margin-top-sm text-gray text-sm">数量 <text class="margin-left text-gray">x1</text></text>
  15. <view class="flex justify-between margin-top-sm">
  16. <view class="text-red text-price text-lg">
  17. <amount :value="Number(19.90 || 0)" :is-round-up="false" :precision="2" :duration="800" transition></amount>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </skeleton>
  23. </view>
  24. <self-line/>
  25. <skeleton :loading="skeletonLoading" :row="3" :showAvatar="false" :showTitle="true">
  26. <view class="bg-white">
  27. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  28. <text class="text-gray">订单金额</text>
  29. <view class="text-price">
  30. <amount :value="Number(19.90 || 0)" :is-round-up="false" :precision="2" :duration="800" transition></amount>
  31. </view>
  32. </view>
  33. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  34. <text class="text-gray">扣费率</text>
  35. <view>
  36. <text>30%</text>
  37. </view>
  38. </view>
  39. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  40. <text class="text-gray">扣费金额</text>
  41. <view class="text-price">
  42. <amount :value="Number(3.90 || 0)" :is-round-up="false" :precision="2" :duration="800" transition></amount>
  43. </view>
  44. </view>
  45. </view>
  46. </skeleton>
  47. <self-line/>
  48. <!-- 表单 -->
  49. <skeleton :loading="skeletonLoading" :row="3" :showAvatar="false" :showTitle="true">
  50. <view class="bg-white">
  51. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  52. <text class="text-gray">可退金额</text>
  53. <view class="text-price">
  54. <amount :value="Number(16.00 || 0)" :is-round-up="false" :precision="2" :duration="800" transition></amount>
  55. </view>
  56. </view>
  57. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  58. <text class="text-gray">订单编号</text>
  59. <view>
  60. <text class="margin-right">67432428794847982374</text>
  61. <text class="text-orange text-sm" @tap="copy('67432428794847982374')">复制</text>
  62. </view>
  63. </view>
  64. <view class="cu-bar padding-lr solid-bottom">
  65. <text class="text-gray">退款说明</text>
  66. <input type="text" class="text-right text-df" placeholder="请输入反馈信息" />
  67. </view>
  68. </view>
  69. </skeleton>
  70. <self-line/>
  71. <skeleton :loading="skeletonLoading" :row="6" :showAvatar="false" :showTitle="true">
  72. <view class="padding-top padding-lr bg-white">
  73. <view class="cu-self menu">
  74. <view class="text-gray">
  75. 由于产品的特殊性在申请的过程中供应商会向您收取部分费用如有疑问可参与产品的售后说明或咨询客服
  76. </view>
  77. </view>
  78. </view>
  79. <view class="padding bg-white">
  80. <view class="cu-self menu">
  81. <view class="text-df text-bold">请上传退款凭证</view>
  82. </view>
  83. </view>
  84. <view class="cu-form-group solid-bottom">
  85. <view class="grid col-4 grid-square flex-sub">
  86. <view class="solids" @tap="ChooseImage" v-if="hostImg == ''"><text class="cuIcon-cameraadd"></text></view>
  87. <view class="bg-img" v-else>
  88. <image :src="hostImg" @tap="showImg" mode="aspectFill"></image>
  89. <view class="cu-tag bg-red" @tap.stop="DelImg"><text class="cuIcon-close"></text></view>
  90. </view>
  91. </view>
  92. </view>
  93. <view class="padding-top-sm padding-lr-lg">
  94. <button class="cu-btn block bg-orange lg margin-top round" @tap="$routerGo('/pages/order/apply-details')">
  95. <text class="cuIcon-loading2 cuIconfont-spin margin-right-xs text-white" v-if="loading"></text>
  96. <text class="text-df text-white">确认申请</text>
  97. </button>
  98. </view>
  99. </skeleton>
  100. </mescroll-body>
  101. </view>
  102. </template>
  103. <script>
  104. import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
  105. export default {
  106. mixins: [MescrollMixin], // 使用mixin
  107. data() {
  108. return {
  109. skeletonLoading: true,
  110. loading: false,
  111. // 选择的本地图片路径
  112. hostImg: '',
  113. // 已上传服务器的图片名称
  114. serverImg:'',
  115. }
  116. },
  117. computed: {
  118. },
  119. onLoad(e) {
  120. setTimeout(()=>{
  121. this.skeletonLoading = false
  122. this.mescroll.endSuccess(); // 请求成功,隐藏加载状态
  123. },1000)
  124. },
  125. methods: {
  126. // 选择图片
  127. ChooseImage(e) {
  128. uni.chooseImage({
  129. count: 1,
  130. success: e => {
  131. this.hostImg = e.tempFilePaths[0];
  132. this.upload(this.hostImg)
  133. }
  134. });
  135. },
  136. // 上传图片到服务器
  137. upload(url){
  138. this.$http.upload({
  139. url: '/user/api/file/image',
  140. data: url,
  141. }).then(res=>{
  142. let imgurl = JSON.parse(res.data)
  143. this.serverImg=imgurl.data;
  144. })
  145. },
  146. // 预览图片
  147. showImg() {
  148. uni.previewImage({
  149. urls: [this.hostImg]
  150. });
  151. },
  152. // 删除图片
  153. DelImg() {
  154. uni.showModal({
  155. title: '提示',
  156. content: '即将取消上传这张图片,请确认?',
  157. success: e => {
  158. if (!e.confirm) return;
  159. this.hostImg = '';
  160. this.serverImg = '';
  161. }
  162. });
  163. },
  164. // 点击复制
  165. copy(text) {
  166. uni.setClipboardData({
  167. data: text
  168. });
  169. },
  170. //下拉刷新
  171. downCallback() {
  172. setTimeout(()=>{
  173. this.mescroll.endSuccess(); // 请求成功,隐藏加载状态
  174. this.mescroll.endErr(); // 请求失败,隐藏加载状态
  175. },1000)
  176. },
  177. }
  178. }
  179. </script>
  180. <style lang="scss" scoped>
  181. .address-box {
  182. // background-image: url(../../static/images/shop/envelope.png);
  183. background-repeat: repeat-x;
  184. background-position: left bottom;
  185. background-size: auto 8rpx;
  186. }
  187. .self-img-sm {
  188. width: 40rpx;
  189. height: 40rpx;
  190. }
  191. .bref-box {
  192. text-overflow: -o-ellipsis-lastline;
  193. overflow: hidden;
  194. text-overflow: ellipsis;
  195. display: -webkit-box;
  196. -webkit-line-clamp: 2;
  197. -webkit-box-orient: vertical;
  198. }
  199. .order-bottom {
  200. position: relative;
  201. .cuIcon-fold {
  202. position: absolute;
  203. right: 50rpx;
  204. top: -19rpx;
  205. color: rgba(0, 0, 0, 0.1)
  206. }
  207. }
  208. </style>