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

211 lines
5.8 KiB

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">复制</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. <tki-qrcode ref="qrcode" @result="qrR" :val="area" :size="120" unit="px" background="#fff" foreground="#000"
  62. pdground="#000" :onval="true" :loadMake="true" :icon="require('@/static/images/system/user-default.jpg')" />
  63. </view>
  64. <view class="flex justify-around align-center text-center margin-top-sm">
  65. <view>
  66. <image class="margin-right" src="@/static/images/system/refresh.png" mode="widthFix" style="width: 20px;height: 20px;"></image>
  67. </view>
  68. <view class="text-lg">SP738644872</view>
  69. <view class="text-orange text-sm margin-left" @tap="copy('SP738644872')">复制</view>
  70. </view>
  71. <view class="margin-top-sm text-green text-sm">
  72. 待使用
  73. </view>
  74. </view>
  75. <view class="padding-lr padding-tb-sm bg-white flex justify-between align-center solid-top">
  76. <view class="flex align-center">
  77. <text class="text-gray text-sm">已付款</text>
  78. <view class="text-lg text-price text-red">
  79. <amount :value="Number(19.90 || 0)" :is-round-up="false" :precision="2" :duration="800" transition></amount>
  80. </view>
  81. </view>
  82. <view>
  83. 已付款
  84. </view>
  85. </view>
  86. </mescroll-body>
  87. </view>
  88. </template>
  89. <script>
  90. import tkiQrcode from "tki-qrcode" // 二维码生成器
  91. import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
  92. export default {
  93. mixins: [MescrollMixin], // 使用mixin
  94. data() {
  95. return {
  96. area: '币种地址',
  97. base64Img: '', //
  98. skeletonLoading: true,
  99. payCur: 0, //支付方式下标
  100. loading: false,
  101. address: {},
  102. shopData: {},
  103. num: 0,
  104. payPwd: '',
  105. price: '', //价格
  106. }
  107. },
  108. components: {
  109. tkiQrcode
  110. },
  111. computed: {
  112. disabled() {
  113. // 必须输入 邮箱和验证码 才能点击下一步
  114. if (this.payPwd) return false
  115. return true
  116. },
  117. total(){
  118. return this.num * this.price
  119. }
  120. },
  121. onLoad(e) {
  122. setTimeout(()=>{
  123. this.skeletonLoading = false
  124. this.mescroll.endSuccess(); // 请求成功,隐藏加载状态
  125. },1000)
  126. },
  127. methods: {
  128. //二维码回调
  129. qrR(data) {
  130. this.base64Img = data;
  131. },
  132. // 点击复制
  133. copy(text) {
  134. //app的复制方法
  135. // #ifdef APP-PLUS
  136. uni.setClipboardData({
  137. data: text
  138. });
  139. // #endif
  140. //html的复制方法
  141. // #ifdef H5
  142. this.$copyText(text)
  143. .then(res => {
  144. uni.showToast({
  145. title: '复制成功'
  146. });
  147. })
  148. .catch(err => {
  149. uni.showToast({
  150. icon: 'none',
  151. title: '复制失败,您的浏览器不支持'
  152. });
  153. });
  154. // #endif
  155. },
  156. submit(){
  157. this.$routerGo('/pages/order/order?type=all')
  158. },
  159. //下拉刷新
  160. downCallback() {
  161. setTimeout(()=>{
  162. this.mescroll.endSuccess(); // 请求成功,隐藏加载状态
  163. this.mescroll.endErr(); // 请求失败,隐藏加载状态
  164. },1000)
  165. },
  166. }
  167. }
  168. </script>
  169. <style lang="scss" scoped>
  170. .address-box {
  171. // background-image: url(../../static/images/shop/envelope.png);
  172. background-repeat: repeat-x;
  173. background-position: left bottom;
  174. background-size: auto 8rpx;
  175. }
  176. .self-img-sm {
  177. width: 40rpx;
  178. height: 40rpx;
  179. }
  180. .bref-box {
  181. text-overflow: -o-ellipsis-lastline;
  182. overflow: hidden;
  183. text-overflow: ellipsis;
  184. display: -webkit-box;
  185. -webkit-line-clamp: 2;
  186. -webkit-box-orient: vertical;
  187. }
  188. .order-bottom {
  189. position: relative;
  190. .cuIcon-fold {
  191. position: absolute;
  192. right: 50rpx;
  193. top: -19rpx;
  194. color: rgba(0, 0, 0, 0.1)
  195. }
  196. }
  197. </style>