海南旅游项目 前端仓库
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.

291 lines
7.1 KiB

  1. <template>
  2. <view>
  3. <!-- 商品信息 -->
  4. <block>
  5. <view class="bg-white">
  6. <view class="flex justify-between align-start" style="padding: 32rpx 32rpx 30rpx 32rpx;">
  7. <image src="../../static/logo.png" mode="aspectFill"
  8. style="width: 240rpx; height: 240rpx;border-radius: 20rpx;"></image>
  9. <view class="flex-sub padding-left-sm">
  10. <view class="bref-box lf-line-2 text-black1 lf-font-28 lf-font-bold"
  11. style="height: 88rpx;line-height: 44rpx;">
  12. 南澳站·潮玩旅游胜地 身处亚热带风情/玩转南澳
  13. </view>
  14. <text class="block lf-color-gray lf-font-28" style="margin-top: 20rpx;line-height: 40rpx;">数量
  15. <text class="margin-left margin-right-xs lf-color-gray">x</text>1</text>
  16. <view class="flex justify-between" style="margin-top: 28rpx;">
  17. <lf-price :price="599" style="margin-top: 8rpx;" />
  18. <view>
  19. <!-- <button class="cu-btn1 lf-color-gray lf-border-gray">申请退款</button> -->
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. <self-line />
  26. <!-- 表单 -->
  27. <view class="bg-white">
  28. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  29. <text class="lf-color-555 lf-font-28">订单编号</text>
  30. <view>
  31. <text class="margin-right lf-font-28 text-black1">2368492461046128742764</text>
  32. <text class="text-orange lf-font-28" @click="copy(2368492461046128742764)">复制</text>
  33. </view>
  34. </view>
  35. <view class="cu-bar padding-lr solid-bottom">
  36. <text class="lf-color-555 lf-font-28">下单时间</text>
  37. <text class="lf-font-28 text-black1">2021-7-6 22:34:14</text>
  38. </view>
  39. <view class="cu-bar padding-lr solid-bottom">
  40. <text class="lf-color-555 lf-font-28">付款时间</text>
  41. <text class="lf-font-28 text-black1">2021-7-6 22:34:14</text>
  42. </view>
  43. <view class="cu-bar padding-lr">
  44. <text class="lf-color-555 lf-font-28">支付方式</text>
  45. <text class="lf-font-28 text-black1">微信支付</text>
  46. </view>
  47. </view>
  48. <self-line />
  49. <view class="bg-white">
  50. <view class="cu-bar padding-lr">
  51. <text class="lf-color-555 lf-font-28">优惠</text>
  52. <text class="lf-font-28 lf-color-price">活动优惠-50</text>
  53. </view>
  54. </view>
  55. <view>
  56. <self-line />
  57. <view class="bg-white flex flex-direction justify-around align-center text-center padding-tb"
  58. style="padding-bottom: 116rpx;">
  59. <view>
  60. <tki-qrcode ref="qrcode" @result="qrR" :val="checkArea" :size="115" unit="px" background="#fff"
  61. foreground="#000" pdground="#000" :onval="true" :loadMake="true" />
  62. </view>
  63. <view style="margin-top: 10rpx;position: relative;top: 26rpx;">
  64. <view class="lf-font-28 text-black1">
  65. {{checkArea}}
  66. <text v-if="false" style="position: relative;left: 172rpx;top: -36rpx;display: inherit;" class="lf-color-blue lf-font-28" @tap="copy(checkArea)">复制</text></view>
  67. </view>
  68. <view style="margin-top: 10rpx;" v-if="false">
  69. <view class="lf-color-green lf-font-28">
  70. 待使用
  71. <text class="lf-iconfont lf-icon-shuaxin1 lf-font-40"
  72. style="color: #999;position: relative;left: 84rpx;top: -42rpx;display: inherit;"
  73. @tap="refreshCode()"></text>
  74. </view>
  75. </view>
  76. <view style="margin-top: 44rpx;" v-else>
  77. <view class="lf-color-999 lf-font-28">
  78. 已使用
  79. </view>
  80. </view>
  81. </view>
  82. <view class="padding-lr padding-tb-sm bg-white flex justify-between align-center solid-top1 btn-bottom">
  83. <view class="flex align-center">
  84. <text class="lf-color-555 lf-font-28" style="margin-right: 20rpx;">实付款</text>
  85. <lf-price :price="549" />
  86. </view>
  87. <button class="btn bg-green" @tap="submit">
  88. <text class="lf-font-32 text-white">立即使用</text>
  89. </button>
  90. <!-- <button class="btn bg-blue">
  91. <text class="lf-font-32 text-white">已使用</text>
  92. </button>
  93. <button class="btn lf-bg-gray">
  94. <text class="lf-font-32 text-white">等待审核</text>
  95. </button> -->
  96. </view>
  97. </view>
  98. </block>
  99. </view>
  100. </template>
  101. <script>
  102. import tkiQrcode from "tki-qrcode" // 二维码生成器
  103. export default {
  104. components: {
  105. tkiQrcode
  106. },
  107. data() {
  108. return {
  109. base64Img: '', //
  110. skeletonLoading: true,
  111. loading: false,
  112. order_id: 1,
  113. orderDetails: {},
  114. checkArea: 'USI782936437829'
  115. }
  116. },
  117. computed: {
  118. total() {
  119. return this.num * this.price
  120. },
  121. isRight() {
  122. return function(val) {
  123. return this.$shared.isRight(val);
  124. }
  125. }
  126. },
  127. onLoad(e) {
  128. this.order_id = e.order_id
  129. if (this.order_id) {
  130. // this.getOrderDetails()
  131. }
  132. },
  133. methods: {
  134. refreshCode() {
  135. this.getOrderDetails()
  136. this.$msg('刷新成功')
  137. },
  138. //二维码回调
  139. qrR(data) {
  140. this.base64Img = data;
  141. },
  142. getOrderDetails() {
  143. this.$http(this.API.API_ORDER_DETAILS, {
  144. order_id: this.order_id
  145. }).then(res => {
  146. if (res.code == 0) {
  147. this.orderDetails = res.data
  148. this.checkArea = res.data.confirm_code
  149. this.skeletonLoading = false
  150. }
  151. }).catch(err => {
  152. setTimeout(() => {
  153. this.$toBack()
  154. }, 1000)
  155. });
  156. },
  157. // 点击复制
  158. copy(text) {
  159. uni.setClipboardData({
  160. data: text
  161. });
  162. },
  163. submit() {
  164. this.$routerGo('/pages/order/order?type=all')
  165. },
  166. },
  167. created() {
  168. }
  169. }
  170. </script>
  171. <style lang="scss" scoped>
  172. .btn{
  173. margin: 0;
  174. padding: 0;
  175. width: 212rpx;
  176. height: 82rpx;
  177. background-color: #1998FE;
  178. color: #FFFFFF;
  179. line-height: 80rpx;
  180. font-size: 32rpx;
  181. border-radius: 41rpx;
  182. }
  183. .tag-self {
  184. position: absolute !important;
  185. top: 0 !important;
  186. border-radius: 20rpx 0 20rpx 0 !important;
  187. width: max-content;
  188. height: 32rpx !important;
  189. }
  190. .title {
  191. font-size: 28rpx;
  192. color: $u-content-color;
  193. height: 90rpx;
  194. }
  195. // tab
  196. .ctab {
  197. width: 100%;
  198. margin: 20rpx 0 0rpx 0rpx;
  199. padding: 0 22rpx;
  200. }
  201. // 商品列表
  202. .com {
  203. width: 100%;
  204. overflow: hidden;
  205. .list {
  206. border-radius: 10rpx;
  207. overflow: hidden;
  208. margin: 20rpx 32rpx;
  209. background-color: #FFFFFF;
  210. // box-shadow: 0 0 10px 5px #e5e5e5;
  211. box-shadow: 0 10rpx 20rpx 0 rgba(0, 0, 0, 0.1);
  212. align-items: flex-start;
  213. .left {
  214. overflow: hidden;
  215. image {
  216. width: 186rpx;
  217. height: 186rpx;
  218. margin: 20rpx;
  219. border-radius: 10rpx;
  220. }
  221. }
  222. .right {
  223. overflow: hidden;
  224. width: 64%;
  225. .title {
  226. margin: 0rpx 20rpx 10rpx 0;
  227. color: #222222;
  228. font-size: 32rpx;
  229. }
  230. .tips {
  231. margin: 16rpx 0;
  232. overflow: hidden;
  233. .u-line-progress {
  234. width: 112rpx;
  235. overflow: hidden;
  236. margin-right: 20rpx;
  237. }
  238. .progress {
  239. color: #777777;
  240. font-size: 24rpx;
  241. }
  242. .bought {
  243. color: #777777;
  244. font-size: 24rpx;
  245. margin-right: 20rpx;
  246. }
  247. }
  248. .price {
  249. overflow: hidden;
  250. color: #FF0000;
  251. margin-top: 10rpx;
  252. button {
  253. width: 176rpx;
  254. height: 60rpx;
  255. background: #FE9903;
  256. border-radius: 15px;
  257. font-size: 24rpx;
  258. color: #FFFFFF;
  259. margin: 0rpx 20rpx 0rpx 20rpx;
  260. border: none;
  261. }
  262. }
  263. }
  264. }
  265. }
  266. </style>