金诚优选前端代码
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.

297 lines
7.9 KiB

  1. <template>
  2. <view>
  3. <lf-nav title="订单详情" :showIcon="true"></lf-nav>
  4. <view class="tips">
  5. <view class="lf-font-24 lf-color-white">剩余支付时间</view>
  6. <view>
  7. <countdown-timer :time="time" :autoStart="true" @finish="dateFinish">
  8. <template v-slot="{minute, second}">
  9. <!-- <view>{{minute}}:{{second}}</view> -->
  10. <view class="lf-flex">
  11. <view class="lf-font-24 lf-color-white">{{ minute >= 10 ? minute : "0" + minute }}</view>
  12. <view class="lf-font-24 lf-color-white">:</view>
  13. <view class="lf-font-24 lf-color-white">{{ second >= 10 ? second : "0" + second }}</view>
  14. </view>
  15. </template>
  16. </countdown-timer>
  17. </view>
  18. </view>
  19. <view class="card" v-if="type == 'default'" style="margin-top: 0;">
  20. <view class="lf-font-28">
  21. <text class="lf-color-222 lf-font-bold">王小二</text>
  22. <text class="lf-color-777 lf-m-l-20">18284385380</text>
  23. </view>
  24. <view class="lf-font-28 lf-color-333 lf-m-t-20">
  25. <text>广西壮族自治区-南宁市-青秀区-民族大道民族大道民族大道民族大道民族大道民族大道15号</text>
  26. </view>
  27. </view>
  28. <view class="card goods">
  29. <view>
  30. <text class="lf-iconfont icon-Group- lf-font-30"></text>
  31. <text class="shop-name">精品超市</text>
  32. <text class="lf-iconfont icon-xiangyou lf-font-24"></text>
  33. </view>
  34. <view class="lf-flex lf-m-t-20">
  35. <image class="goods-img"></image>
  36. <view class="info">
  37. <view class="lf-font-26 lf-color-333 lf-line-1">爱他美较大婴儿配方奶粉较大配方奶粉较2段 </view>
  38. <view class="lf-font-24 lf-color-777">500g</view>
  39. <view class="lf-row-between" style="line-height: 1;">
  40. <text class="price">¥385</text>
  41. <text class="lf-font-28 lf-color-777">x 2</text>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="card" v-if="type == 'point'">
  47. <view class="lf-row-between lf-font-28">
  48. <text class="lf-color-777">积分数量</text>
  49. <text class="lf-color-222">385</text>
  50. </view>
  51. </view>
  52. <view class="lf-bg-white lf-m-t-20 lf-p-b-30 lf-row-center lf-flex-column">
  53. <view class="qrcode">
  54. <lf-qrcode :options="qrc"></lf-qrcode>
  55. </view>
  56. <view class="lf-font-28" style="color:#15716E" v-if="true">待提货</view>
  57. <view class="lf-font-28 lf-color-777" v-else>已取货</view>
  58. </view>
  59. <view class="card" v-if="type == 'default'">
  60. <view class="lf-row-between lf-font-28">
  61. <text class="lf-color-777">优惠券</text>
  62. <text style="color: #F63434;">-¥20</text>
  63. </view>
  64. <view class="lf-row-between lf-m-t-30 lf-font-28">
  65. <text class="lf-color-777">订单总价</text>
  66. <text class="lf-color-222">¥375</text>
  67. </view>
  68. </view>
  69. <view class="card">
  70. <view class="lf-row-between lf-font-28 lf-m-t-30">
  71. <text class="lf-color-777">订单编号</text>
  72. <text class="lf-color-222">75894375395739345</text>
  73. </view>
  74. <view class="lf-row-between lf-font-28 lf-m-t-30">
  75. <text class="lf-color-777">创建时间</text>
  76. <text class="lf-color-222">2021-09-07 10:21:38</text>
  77. </view>
  78. <view class="lf-row-between lf-font-28 lf-m-t-30">
  79. <text class="lf-color-777">留言</text>
  80. <text class="lf-color-222">暂无留言</text>
  81. </view>
  82. <!-- 待自提 -->
  83. <view class="lf-row-between lf-font-28 lf-m-t-30">
  84. <text class="lf-color-777">支付方式</text>
  85. <text class="lf-color-222">余额支付</text>
  86. </view>
  87. <view class="lf-row-between lf-font-28 lf-m-t-30">
  88. <text class="lf-color-777">收货方式</text>
  89. <text class="lf-color-222">自提</text>
  90. </view>
  91. <view class="lf-row-between lf-font-28 lf-m-t-30">
  92. <text class="lf-color-777">支付时间</text>
  93. <text class="lf-color-222">2021-09-07 10:21:38</text>
  94. </view>
  95. </view>
  96. <view style="height: 120rpx;margin-top: 20rpx;"></view>
  97. <!-- 待付款 -->
  98. <view class="order-btn">
  99. <view class="lf-font-28 lf-row-center" style="color:#F63434">
  100. 待付款
  101. </view>
  102. <view class="lf-flex">
  103. <view class="btn-cancel lf-m-r-20">
  104. 取消订单
  105. </view>
  106. <view class="btn-atonce">
  107. 立即付款
  108. </view>
  109. </view>
  110. </view>
  111. <!-- 待自提 -->
  112. <view class="order-btn">
  113. <view class="lf-font-28 lf-row-center lf-color-black">
  114. 待自提
  115. </view>
  116. <view class="lf-flex">
  117. <view style="width: 220rpx;"></view>
  118. <view style="width: 220rpx;"></view>
  119. </view>
  120. </view>
  121. <!-- 已完成 -->
  122. <view class="order-btn">
  123. <view class="lf-font-28 lf-row-center" style="color: #22A19F;">
  124. 已完成
  125. </view>
  126. <view class="lf-flex">
  127. <view style="width: 220rpx;"></view>
  128. <view style="width: 220rpx;"></view>
  129. </view>
  130. </view>
  131. </view>
  132. </template>
  133. <script>
  134. import countdownTimer from '@/components/countdown-timer/countdown-timer';
  135. import lfQrcode from '@/components/lf-code/lf-qrcode.vue';
  136. export default {
  137. data(){
  138. return {
  139. type: 'default' ,// point积分订单详情, default默认普通商品订单详情
  140. time: new Date('2021/09/8 14:15:00').getTime() - new Date('2021/09/8 14:10:00').getTime(),
  141. qrc: {
  142. code: "https://weixin.qq.com/g/AwYAAHO3aO4zlasEij6bLsk4hlZd5XNFkkBmqyS55mLPFxmn5c9PaI1omqLhd24fABCD23333",
  143. size: 300, // 二维码大小
  144. level: 4, //等级 0~4
  145. bgColor: '#FFFFFF', //二维码背景色 默认白色
  146. // border: {
  147. // color: ['#8A2387', '#F27121'], //边框颜色支持渐变色
  148. // lineWidth: 3, //边框宽度
  149. // },
  150. // img: '/static/logo.png', //图片
  151. // iconSize: 40, //二维码图标的大小
  152. color: '#000000', //边框颜色支持渐变色
  153. }
  154. }
  155. },
  156. components: {
  157. countdownTimer,
  158. lfQrcode
  159. },
  160. onLoad(options){
  161. this.type = options.type || this.type;
  162. },
  163. methods: {
  164. dateFinish(){
  165. console.log("倒计时结束");
  166. },
  167. }
  168. }
  169. </script>
  170. <style>
  171. page{
  172. background-color: #F8F8F8;
  173. }
  174. </style>
  175. <style lang="scss" scoped="scoped">
  176. .qrcode{
  177. display: flex;
  178. justify-content: center;
  179. margin-top: 30rpx;
  180. }
  181. .tips-waitconfirm {
  182. width: 100%;
  183. height: 113rpx;
  184. background: #15716E;
  185. display: flex;
  186. justify-content: space-between;
  187. padding: 0 32rpx;
  188. align-items: center;
  189. }
  190. .waitconfirm-tag {
  191. width: 136rpx;
  192. height: 53rpx;
  193. border-radius: 27rpx;
  194. border: 2rpx solid #FFFFFF;
  195. font-size: 24rpx;
  196. color: white;
  197. display: flex;
  198. justify-content: center;
  199. align-items: center;
  200. }
  201. .btn-cancel {
  202. width: 220rpx;
  203. height: 90rpx;
  204. border-radius: 45rpx;
  205. border: 2rpx solid #999999;
  206. color: #777;
  207. font-size: 28rpx;
  208. display: flex;
  209. justify-content: center;
  210. align-items: center;
  211. }
  212. .btn-confirm {
  213. width: 220rpx;
  214. height: 90rpx;
  215. border-radius: 45rpx;
  216. background-color: #15716E;
  217. color: #fff;
  218. font-size: 28rpx;
  219. display: flex;
  220. justify-content: center;
  221. align-items: center;
  222. }
  223. .btn-atonce {
  224. width: 220rpx;
  225. height: 90rpx;
  226. border-radius: 45rpx;
  227. background-color: #F63434;
  228. color: #fff;
  229. font-size: 28rpx;
  230. display: flex;
  231. justify-content: center;
  232. align-items: center;
  233. }
  234. .order-btn {
  235. width: 100%;
  236. height: 120rpx;
  237. background: #FFFFFF;
  238. display: flex;
  239. justify-content: space-between;
  240. padding: 0 32rpx;
  241. position: fixed;
  242. bottom: 0;
  243. }
  244. .tips {
  245. display: flex;
  246. background-color: #F63434;
  247. height: 64rpx;
  248. width: 100%;
  249. justify-content: center;
  250. align-items: center;
  251. }
  252. .card{
  253. height: max-content;
  254. width: 750rpx;
  255. padding: 30rpx 32rpx;
  256. background-color: #FFFFFF;
  257. &:nth-child(n+2){
  258. margin-top: 20rpx;
  259. }
  260. }
  261. .goods{
  262. .shop-name{
  263. font-size: 28rpx;
  264. color: #222222;
  265. font-weight: bold;
  266. margin: 0 15rpx;
  267. }
  268. .goods-img{
  269. width: 130rpx;
  270. height: 130rpx;
  271. border-radius: 4rpx;
  272. margin-right: 15rpx;
  273. background-color: #EEEEEE;
  274. }
  275. .info{
  276. width: 540rpx;
  277. height: 130rpx;
  278. display: flex;
  279. flex-direction: column;
  280. justify-content: space-around;
  281. .price{
  282. font-size: 32rpx;
  283. color: #F63434;
  284. font-weight: bold;
  285. }
  286. }
  287. .order-num{
  288. font-size: 24rpx;
  289. color: #999999;
  290. display: flex;
  291. justify-content: space-between;
  292. margin-top: 28rpx;
  293. }
  294. }
  295. </style>