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

182 lines
5.2 KiB

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. <button v-if="true" class="cu-btn line-orange round margin-left-sm text-sm" @tap="$routerGo('/pages/order/apply-refund')">申请退款</button>
  21. <button v-else class="cu-btn line-gray bg-gray round margin-left-sm text-sm">退款中</button>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </skeleton>
  27. </view>
  28. <self-line/>
  29. <!-- 表单 -->
  30. <view class="bg-white">
  31. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  32. <text class="text-gray">订单编号</text>
  33. <view>
  34. <text class="margin-right">67432428794847982374</text>
  35. <text class="text-orange text-sm" @click="copy('67432428794847982374')">复制</text>
  36. </view>
  37. </view>
  38. <view class="cu-bar padding-lr solid-bottom">
  39. <text class="text-gray">下单时间</text>
  40. <text>2021-6-17 15:35:46</text>
  41. </view>
  42. <view class="cu-bar padding-lr solid-bottom">
  43. <text class="text-gray">付款时间</text>
  44. <text>微信支付</text>
  45. </view>
  46. <view class="cu-bar padding-lr solid-bottom">
  47. <text class="text-gray">支付方式</text>
  48. <text>2021-6-17 15:35:46</text>
  49. </view>
  50. </view>
  51. <self-line/>
  52. <view class="bg-white">
  53. <view class="cu-bar padding-lr solid-bottom">
  54. <text class="text-gray">优惠</text>
  55. <text>暂无优惠</text>
  56. </view>
  57. </view>
  58. <self-line/>
  59. <view class="bg-white flex flex-direction justify-around align-center text-center padding-tb">
  60. <view>
  61. <image src="../../static/tu.png" mode="widthFix" style="height: 150px;width: 150px;"></image>
  62. </view>
  63. <view class="flex justify-around align-center text-center margin-top-sm">
  64. <view>
  65. <image class="margin-right" src="@/static/images/system/refresh.png" mode="widthFix" style="width: 20px;height: 20px;"></image>
  66. </view>
  67. <view class="text-lg">SP738644872</view>
  68. <view class="text-orange text-sm margin-left" @tap="copy('SP738644872')">复制</view>
  69. </view>
  70. <view class="margin-top-sm text-green text-sm">
  71. 待使用
  72. </view>
  73. </view>
  74. <view class="padding-lr padding-tb-sm bg-white flex justify-between align-center solid-top">
  75. <view class="flex align-center">
  76. <text class="text-gray text-sm">已付款</text>
  77. <view class="text-lg text-price text-red">
  78. <amount :value="Number(19.90 || 0)" :is-round-up="false" :precision="2" :duration="800" transition></amount>
  79. </view>
  80. </view>
  81. <view>
  82. 已付款
  83. </view>
  84. </view>
  85. </mescroll-body>
  86. </view>
  87. </template>
  88. <script>
  89. import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
  90. export default {
  91. mixins: [MescrollMixin], // 使用mixin
  92. data() {
  93. return {
  94. base64Img: '', //
  95. skeletonLoading: true,
  96. payCur: 0, //支付方式下标
  97. loading: false,
  98. address: {},
  99. shopData: {},
  100. num: 0,
  101. payPwd: '',
  102. price: '', //价格
  103. }
  104. },
  105. computed: {
  106. disabled() {
  107. // 必须输入 邮箱和验证码 才能点击下一步
  108. if (this.payPwd) return false
  109. return true
  110. },
  111. total(){
  112. return this.num * this.price
  113. }
  114. },
  115. onLoad(e) {
  116. setTimeout(()=>{
  117. this.skeletonLoading = false
  118. this.mescroll.endSuccess(); // 请求成功,隐藏加载状态
  119. },1000)
  120. },
  121. methods: {
  122. // 点击复制
  123. copy(text) {
  124. uni.setClipboardData({
  125. data: text
  126. });
  127. },
  128. submit(){
  129. this.$routerGo('/pages/order/order?type=all')
  130. },
  131. //下拉刷新
  132. downCallback() {
  133. setTimeout(()=>{
  134. this.mescroll.endSuccess(); // 请求成功,隐藏加载状态
  135. this.mescroll.endErr(); // 请求失败,隐藏加载状态
  136. },1000)
  137. },
  138. }
  139. }
  140. </script>
  141. <style lang="scss" scoped>
  142. .address-box {
  143. // background-image: url(../../static/images/shop/envelope.png);
  144. background-repeat: repeat-x;
  145. background-position: left bottom;
  146. background-size: auto 8rpx;
  147. }
  148. .self-img-sm {
  149. width: 40rpx;
  150. height: 40rpx;
  151. }
  152. .bref-box {
  153. text-overflow: -o-ellipsis-lastline;
  154. overflow: hidden;
  155. text-overflow: ellipsis;
  156. display: -webkit-box;
  157. -webkit-line-clamp: 2;
  158. -webkit-box-orient: vertical;
  159. }
  160. .order-bottom {
  161. position: relative;
  162. .cuIcon-fold {
  163. position: absolute;
  164. right: 50rpx;
  165. top: -19rpx;
  166. color: rgba(0, 0, 0, 0.1)
  167. }
  168. }
  169. </style>