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

202 lines
5.6 KiB

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">网红辣椒棒 500g <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()">复制</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. area: '币种地址',
  95. base64Img: '', //
  96. skeletonLoading: true,
  97. payCur: 0, //支付方式下标
  98. loading: false,
  99. address: {},
  100. shopData: {},
  101. num: 0,
  102. payPwd: '',
  103. price: '', //价格
  104. }
  105. },
  106. computed: {
  107. disabled() {
  108. // 必须输入 邮箱和验证码 才能点击下一步
  109. if (this.payPwd) return false
  110. return true
  111. },
  112. total(){
  113. return this.num * this.price
  114. }
  115. },
  116. onLoad(e) {
  117. setTimeout(()=>{
  118. this.skeletonLoading = false
  119. this.mescroll.endSuccess(); // 请求成功,隐藏加载状态
  120. },1000)
  121. },
  122. methods: {
  123. // 点击复制
  124. copy(text) {
  125. //app的复制方法
  126. // #ifdef APP-PLUS
  127. uni.setClipboardData({
  128. data: text
  129. });
  130. // #endif
  131. //html的复制方法
  132. // #ifdef H5
  133. this.$copyText(text)
  134. .then(res => {
  135. uni.showToast({
  136. title: '复制成功'
  137. });
  138. })
  139. .catch(err => {
  140. uni.showToast({
  141. icon: 'none',
  142. title: '复制失败,您的浏览器不支持'
  143. });
  144. });
  145. // #endif
  146. },
  147. submit(){
  148. this.$routerGo('/pages/order/order?type=all')
  149. },
  150. //下拉刷新
  151. downCallback() {
  152. setTimeout(()=>{
  153. this.mescroll.endSuccess(); // 请求成功,隐藏加载状态
  154. this.mescroll.endErr(); // 请求失败,隐藏加载状态
  155. },1000)
  156. },
  157. }
  158. }
  159. </script>
  160. <style lang="scss" scoped>
  161. .address-box {
  162. // background-image: url(../../static/images/shop/envelope.png);
  163. background-repeat: repeat-x;
  164. background-position: left bottom;
  165. background-size: auto 8rpx;
  166. }
  167. .self-img-sm {
  168. width: 40rpx;
  169. height: 40rpx;
  170. }
  171. .bref-box {
  172. text-overflow: -o-ellipsis-lastline;
  173. overflow: hidden;
  174. text-overflow: ellipsis;
  175. display: -webkit-box;
  176. -webkit-line-clamp: 2;
  177. -webkit-box-orient: vertical;
  178. }
  179. .order-bottom {
  180. position: relative;
  181. .cuIcon-fold {
  182. position: absolute;
  183. right: 50rpx;
  184. top: -19rpx;
  185. color: rgba(0, 0, 0, 0.1)
  186. }
  187. }
  188. </style>