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

200 lines
5.3 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 class="cu-btn border-blue bg-white text-blue round margin-left-sm text-sm">等待审核</button>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </skeleton>
  26. </view>
  27. <self-line/>
  28. <!-- 表单 -->
  29. <view class="bg-white">
  30. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  31. <text class="text-gray">可退金额</text>
  32. <view class="text-red text-price text-lg">
  33. <amount :value="Number(19.90 || 0)" :is-round-up="false" :precision="2" :duration="800" transition></amount>
  34. </view>
  35. </view>
  36. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  37. <text class="text-gray">订单编号</text>
  38. <view>
  39. <text class="margin-right">67432428794847982374</text>
  40. <text class="text-orange text-sm" @tap="copy('67432428794847982374')">复制</text>
  41. </view>
  42. </view>
  43. </view>
  44. <self-line/>
  45. <view class="padding bg-white" style="border-radius: 6rpx 6rpx 0 0">
  46. <view class="cu-self menu">
  47. <view class="text-gray">退款说明</view>
  48. </view>
  49. <view class="cu-self menu margin-top">
  50. <view class="text-gray">看着不是很新鲜了然后还有一些都烂了看着不是很新鲜了然后还有一些都烂了看着不是很新鲜了然后还有一些都烂了看着不是很新鲜了然后还有一些都烂了看着不是很新鲜了然后还有一些都烂了</view>
  51. </view>
  52. </view>
  53. <view class="cu-form-group solid-bottom">
  54. <view class="grid col-4 grid-square flex-sub">
  55. <view class="bg-img">
  56. <image src="../../static/tu.png" @tap="showImg" mode="aspectFill"></image>
  57. </view>
  58. <view class="bg-img">
  59. <image src="../../static/tu.png" @tap="showImg" mode="aspectFill"></image>
  60. </view>
  61. <view class="bg-img">
  62. <image src="../../static/tu.png" @tap="showImg" mode="aspectFill"></image>
  63. </view>
  64. </view>
  65. </view>
  66. </mescroll-body>
  67. </view>
  68. </template>
  69. <script>
  70. import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
  71. export default {
  72. mixins: [MescrollMixin], // 使用mixin
  73. data() {
  74. return {
  75. skeletonLoading: true,
  76. loading: false,
  77. // 选择的本地图片路径
  78. hostImg: '',
  79. // 已上传服务器的图片名称
  80. serverImg:'',
  81. }
  82. },
  83. computed: {
  84. },
  85. onLoad(e) {
  86. setTimeout(()=>{
  87. this.skeletonLoading = false
  88. this.mescroll.endSuccess(); // 请求成功,隐藏加载状态
  89. },1000)
  90. },
  91. methods: {
  92. // 选择图片
  93. ChooseImage(e) {
  94. uni.chooseImage({
  95. count: 1,
  96. success: e => {
  97. this.hostImg = e.tempFilePaths[0];
  98. }
  99. });
  100. },
  101. // 预览图片
  102. showImg() {
  103. uni.previewImage({
  104. urls: ['../../static/tu.png']
  105. });
  106. },
  107. // 删除图片
  108. DelImg() {
  109. uni.showModal({
  110. title: '提示',
  111. content: '即将取消上传这张图片,请确认?',
  112. success: e => {
  113. if (!e.confirm) return;
  114. this.hostImg = '';
  115. this.serverImg = '';
  116. }
  117. });
  118. },
  119. // 点击复制
  120. copy(text) {
  121. //app的复制方法
  122. // #ifdef APP-PLUS
  123. uni.setClipboardData({
  124. data: text
  125. });
  126. // #endif
  127. //html的复制方法
  128. // #ifdef H5
  129. this.$copyText(text)
  130. .then(res => {
  131. uni.showToast({
  132. title: '复制成功'
  133. });
  134. })
  135. .catch(err => {
  136. uni.showToast({
  137. icon: 'none',
  138. title: '复制失败,您的浏览器不支持'
  139. });
  140. });
  141. // #endif
  142. },
  143. //下拉刷新
  144. downCallback() {
  145. setTimeout(()=>{
  146. this.mescroll.endSuccess(); // 请求成功,隐藏加载状态
  147. this.mescroll.endErr(); // 请求失败,隐藏加载状态
  148. },1000)
  149. },
  150. }
  151. }
  152. </script>
  153. <style lang="scss" scoped>
  154. .address-box {
  155. // background-image: url(../../static/images/shop/envelope.png);
  156. background-repeat: repeat-x;
  157. background-position: left bottom;
  158. background-size: auto 8rpx;
  159. }
  160. .self-img-sm {
  161. width: 40rpx;
  162. height: 40rpx;
  163. }
  164. .bref-box {
  165. text-overflow: -o-ellipsis-lastline;
  166. overflow: hidden;
  167. text-overflow: ellipsis;
  168. display: -webkit-box;
  169. -webkit-line-clamp: 2;
  170. -webkit-box-orient: vertical;
  171. }
  172. .order-bottom {
  173. position: relative;
  174. .cuIcon-fold {
  175. position: absolute;
  176. right: 50rpx;
  177. top: -19rpx;
  178. color: rgba(0, 0, 0, 0.1)
  179. }
  180. }
  181. </style>