list.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. <template>
  2. <div class="point-list">
  3. <div v-if="orderList.length === 0" class="no-img">
  4. <div></div>
  5. <span>无订单</span>
  6. </div>
  7. <template v-else>
  8. <div class="order" v-for="item in orderList" :key="item.id">
  9. <div class="top">
  10. <div class="code">{{ "订单号 " + item.integralOrderNo }}</div>
  11. <div class="status">已兑换</div>
  12. </div>
  13. <div class="middle">
  14. <div class="imgcon">
  15. <img :src="item.waresPic" alt="" srcset="" />
  16. </div>
  17. <div class="content">
  18. <div class="title">{{ item.waresName }}</div>
  19. <div class="desc">{{ item.waresDetail }}</div>
  20. <div class="amount">
  21. <div>
  22. <span class="text">共{{ item.exchangeNum }}件商品 合计 </span
  23. ><span class="icon"></span><span>{{ item.integral }}</span>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. <!-- <div class="footer">
  29. <span class="paytime">付款倒计时:23:59:59</span>
  30. <div class="paybutton">
  31. <button class="cancel">取消订单</button>
  32. <button class="pay">立刻付款</button>
  33. </div>
  34. </div> -->
  35. </div>
  36. </template>
  37. <!-- <div class="order">
  38. <div class="top">
  39. <div class="code">订单号 836847623234289</div>
  40. <div class="status">待付款</div>
  41. </div>
  42. <div class="middle">
  43. <div class="imgcon">
  44. <img :src="listsrc" alt="" srcset="" />
  45. </div>
  46. <div class="content">
  47. <div class="title">水光气垫</div>
  48. <div class="desc">15g SPF 50+ PA +++ 自然白</div>
  49. <div class="amount">
  50. <div>
  51. <span class="text">共1件商品 合计 </span><span class="icon"></span
  52. ><span>300</span>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="footer">
  58. <span class="paytime">付款倒计时:23:59:59</span>
  59. <div class="paybutton">
  60. <button class="cancel">取消订单</button>
  61. <button class="pay">立刻付款</button>
  62. </div>
  63. </div>
  64. </div>
  65. -->
  66. </div>
  67. </template>
  68. <script>
  69. import ProductList from "../../components/ProductList";
  70. export default {
  71. head() {
  72. return {
  73. title: "积分订单",
  74. };
  75. },
  76. data() {
  77. return {
  78. orderList: [],
  79. };
  80. },
  81. components: {
  82. ProductList,
  83. },
  84. mounted() {
  85. this.initOrderList();
  86. },
  87. methods: {
  88. initOrderList() {
  89. this.$axios
  90. .$get("/getUserIntegralOrderList", {
  91. params: {
  92. unionId: this.unionId,
  93. stationId: this.stationId,
  94. },
  95. })
  96. .then((res) => {
  97. if (res.retCode === 0) {
  98. this.orderList = res.data;
  99. }
  100. });
  101. },
  102. },
  103. };
  104. </script>
  105. <style>
  106. .point-list {
  107. width: 100%;
  108. background: #f8f8f8;
  109. width: 7rem;
  110. margin: 0 auto;
  111. }
  112. .point-list .no-img {
  113. width: 100%;
  114. height: 60vh;
  115. position: relative;
  116. display: flex;
  117. flex-direction: column;
  118. justify-content: center;
  119. align-items: center;
  120. }
  121. .point-list .no-img div {
  122. width: 2.29rem;
  123. height: 1.87rem;
  124. background: url("../../static/common/wu@2x.png") no-repeat 0 0;
  125. background-size: 100% 100%;
  126. }
  127. .point-list .no-img span {
  128. width: 2.29rem;
  129. height: 0.4rem;
  130. font-size: 0.28rem;
  131. font-weight: 500;
  132. color: #aaaaaa;
  133. line-height: 0.4rem;
  134. text-align: center;
  135. }
  136. .point-list .order {
  137. width: 100%;
  138. background: #ffffff;
  139. margin-top: 0.2rem;
  140. }
  141. .point-list .order .top {
  142. width: 100%rem;
  143. height: 1rem;
  144. position: relative;
  145. border-bottom: 0.01rem solid #e0e0e0;
  146. }
  147. .point-list .order .top .code {
  148. height: 0.4rem;
  149. font-size: 0.28rem;
  150. font-family: PingFangSC-Regular, PingFang SC;
  151. font-weight: 400;
  152. color: #666666;
  153. line-height: 0.4rem;
  154. position: absolute;
  155. top: 0.3rem;
  156. left: 0.3rem;
  157. }
  158. .point-list .order .top .status {
  159. height: 0.4rem;
  160. font-size: 0.28rem;
  161. font-family: PingFangSC-Regular, PingFang SC;
  162. font-weight: 400;
  163. color: #666666;
  164. line-height: 0.4rem;
  165. position: absolute;
  166. top: 0.3rem;
  167. right: 0.3rem;
  168. }
  169. .point-list .order .middle {
  170. width: 100%;
  171. height: 4rem;
  172. display: flex;
  173. justify-content: center;
  174. align-items: center;
  175. }
  176. .point-list .order .middle .imgcon {
  177. width: 2.4rem;
  178. height: 2.4rem;
  179. background: #ffffff;
  180. border-radius: 0.1rem;
  181. border: 0.02rem solid #eeeeee;
  182. box-sizing: border-box;
  183. padding: 0.3rem;
  184. margin-bottom: 1rem;
  185. }
  186. .point-list .order .middle .imgcon img {
  187. width: 100%;
  188. height: 100%;
  189. }
  190. .point-list .order .middle .content {
  191. width: 4.48rem;
  192. height: 3.4rem;
  193. padding: 0.3rem 0.1rem;
  194. }
  195. .point-list .order .middle .content .title {
  196. width: 3.56rem;
  197. height: 0.45rem;
  198. font-size: 0.32rem;
  199. font-family: PingFangSC-Medium, PingFang SC;
  200. font-weight: 500;
  201. color: #111111;
  202. line-height: 0.45rem;
  203. }
  204. .point-list .order .middle .content .desc {
  205. width: 4.2rem;
  206. height: 1.95rem;
  207. font-size: 0.28rem;
  208. font-family: PingFangSC-Regular, PingFang SC;
  209. font-weight: 400;
  210. color: #666666;
  211. line-height: 0.4rem;
  212. }
  213. .point-list .order .middle .content .amount {
  214. width: 4.2rem;
  215. height: 1rem;
  216. font-size: 0.32rem;
  217. font-family: PingFangSC-Medium, PingFang SC;
  218. font-weight: 500;
  219. color: #fe9700;
  220. line-height: 0.45rem;
  221. position: relative;
  222. }
  223. .point-list .order .middle .content .amount div {
  224. display: inline-block;
  225. position: absolute;
  226. right: 0;
  227. top: 0.2rem;
  228. }
  229. .point-list .order .middle .content .amount .text {
  230. width: 1.7rem;
  231. height: 0.33rem;
  232. font-size: 0.24rem;
  233. font-family: PingFangSC-Regular, PingFang SC;
  234. font-weight: 400;
  235. color: #666666;
  236. line-height: 0.33rem;
  237. }
  238. .point-list .order .middle .content .amount .icon {
  239. display: inline-block;
  240. width: 0.25rem;
  241. height: 0.25rem;
  242. background: url("../../static/common/a01_jifen@2x.png") no-repeat 0 0;
  243. background-size: 100% 100%;
  244. }
  245. .point-list .order .footer {
  246. width: 100%;
  247. height: 1rem;
  248. position: relative;
  249. display: flex;
  250. justify-content: space-between;
  251. align-items: baseline;
  252. }
  253. .point-list .order .footer .paytime {
  254. display: inline-block;
  255. width: 2.84rem;
  256. height: 0.4rem;
  257. font-size: 0.28rem;
  258. font-family: PingFangSC-Regular, PingFang SC;
  259. font-weight: 400;
  260. color: #aaaaaa;
  261. line-height: 0.4rem;
  262. }
  263. .point-list .order .footer .paybutton {
  264. display: flex;
  265. justify-content: space-between;
  266. width: 3.4rem;
  267. }
  268. .point-list .order .footer .paybutton .cancel {
  269. border: none;
  270. background-color: transparent;
  271. outline: none;
  272. display: block;
  273. width: 1.6rem;
  274. height: 0.6rem;
  275. border-radius: 0.3rem;
  276. border: 0.02rem solid #aaaaaa;
  277. font-size: 0.28rem;
  278. font-family: PingFangSC-Regular, PingFang SC;
  279. font-weight: 400;
  280. color: #aaaaaa;
  281. line-height: 0.4rem;
  282. }
  283. .point-list .order .footer .paybutton .pay {
  284. border: none;
  285. background-color: transparent;
  286. outline: none;
  287. display: block;
  288. width: 1.6rem;
  289. height: 0.6rem;
  290. background: #fe9700;
  291. border-radius: 0.3rem;
  292. font-size: 0.28rem;
  293. font-family: PingFangSC-Regular, PingFang SC;
  294. font-weight: 400;
  295. color: #ffffff;
  296. line-height: 0.4rem;
  297. }
  298. </style>