list.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  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. width: 0.84rem;
  160. height: 0.4rem;
  161. font-size: 0.28rem;
  162. font-family: PingFangSC-Regular, PingFang SC;
  163. font-weight: 400;
  164. color: #666666;
  165. line-height: 0.4rem;
  166. position: absolute;
  167. top: 0.3rem;
  168. right: 0.3rem;
  169. }
  170. .point-list .order .middle {
  171. width: 100%;
  172. height: 4rem;
  173. display: flex;
  174. justify-content: center;
  175. align-items: center;
  176. }
  177. .point-list .order .middle .imgcon {
  178. width: 2.4rem;
  179. height: 2.4rem;
  180. background: #ffffff;
  181. border-radius: 0.1rem;
  182. border: 0.02rem solid #eeeeee;
  183. box-sizing: border-box;
  184. padding: 0.3rem;
  185. margin-bottom: 1rem;
  186. }
  187. .point-list .order .middle .imgcon img {
  188. width: 100%;
  189. height: 100%;
  190. }
  191. .point-list .order .middle .content {
  192. width: 4.48rem;
  193. height: 3.4rem;
  194. padding: 0.3rem 0.1rem;
  195. }
  196. .point-list .order .middle .content .title {
  197. width: 3.56rem;
  198. height: 0.45rem;
  199. font-size: 0.32rem;
  200. font-family: PingFangSC-Medium, PingFang SC;
  201. font-weight: 500;
  202. color: #111111;
  203. line-height: 0.45rem;
  204. }
  205. .point-list .order .middle .content .desc {
  206. width: 4.2rem;
  207. height: 1.95rem;
  208. font-size: 0.28rem;
  209. font-family: PingFangSC-Regular, PingFang SC;
  210. font-weight: 400;
  211. color: #666666;
  212. line-height: 0.4rem;
  213. }
  214. .point-list .order .middle .content .amount {
  215. width: 4.2rem;
  216. height: 1rem;
  217. font-size: 0.32rem;
  218. font-family: PingFangSC-Medium, PingFang SC;
  219. font-weight: 500;
  220. color: #fe9700;
  221. line-height: 0.45rem;
  222. position: relative;
  223. }
  224. .point-list .order .middle .content .amount div {
  225. display: inline-block;
  226. position: absolute;
  227. right: 0;
  228. top: 0.2rem;
  229. }
  230. .point-list .order .middle .content .amount .text {
  231. width: 1.7rem;
  232. height: 0.33rem;
  233. font-size: 0.24rem;
  234. font-family: PingFangSC-Regular, PingFang SC;
  235. font-weight: 400;
  236. color: #666666;
  237. line-height: 0.33rem;
  238. }
  239. .point-list .order .middle .content .amount .icon {
  240. display: inline-block;
  241. width: 0.25rem;
  242. height: 0.25rem;
  243. background: url("../../static/common/a01_jifen@2x.png") no-repeat 0 0;
  244. background-size: cover;
  245. }
  246. .point-list .order .footer {
  247. width: 100%;
  248. height: 1rem;
  249. position: relative;
  250. display: flex;
  251. justify-content: space-between;
  252. align-items: baseline;
  253. }
  254. .point-list .order .footer .paytime {
  255. display: inline-block;
  256. width: 2.84rem;
  257. height: 0.4rem;
  258. font-size: 0.28rem;
  259. font-family: PingFangSC-Regular, PingFang SC;
  260. font-weight: 400;
  261. color: #aaaaaa;
  262. line-height: 0.4rem;
  263. }
  264. .point-list .order .footer .paybutton {
  265. display: flex;
  266. justify-content: space-between;
  267. width: 3.4rem;
  268. }
  269. .point-list .order .footer .paybutton .cancel {
  270. border: none;
  271. background-color: transparent;
  272. outline: none;
  273. display: block;
  274. width: 1.6rem;
  275. height: 0.6rem;
  276. border-radius: 0.3rem;
  277. border: 0.02rem solid #aaaaaa;
  278. font-size: 0.28rem;
  279. font-family: PingFangSC-Regular, PingFang SC;
  280. font-weight: 400;
  281. color: #aaaaaa;
  282. line-height: 0.4rem;
  283. }
  284. .point-list .order .footer .paybutton .pay {
  285. border: none;
  286. background-color: transparent;
  287. outline: none;
  288. display: block;
  289. width: 1.6rem;
  290. height: 0.6rem;
  291. background: #fe9700;
  292. border-radius: 0.3rem;
  293. font-size: 0.28rem;
  294. font-family: PingFangSC-Regular, PingFang SC;
  295. font-weight: 400;
  296. color: #ffffff;
  297. line-height: 0.4rem;
  298. }
  299. </style>