AllorderInfo.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <div class="container">
  3. <div class="box">
  4. <div class="box1" @click="navigateTo('/pages/orderdetails')">
  5. <div class="tit">
  6. <img
  7. src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-03-15-53-18gjxoMYNY.png"
  8. alt=""
  9. />
  10. <div class="tit1">益禾堂(一食堂)</div>
  11. </div>
  12. <div class="address">
  13. <img
  14. class="avatar"
  15. src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-10-17-31-24egsujwUw.jpg"
  16. />
  17. <div>
  18. <div class="text1">订单将在 <span>4:22</span> 后自动取消</div>
  19. <div class="text1 text2">请尽快完成支付</div>
  20. </div>
  21. <img
  22. class="inter2"
  23. src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-15-14-15-50oEVgXoZN.png"
  24. alt=""
  25. />
  26. </div>
  27. <div class="btn">
  28. <div class="order">取消订单</div>
  29. <div class="pay">立即支付</div>
  30. </div>
  31. <div class="border"></div>
  32. <div class="ImgBox">
  33. <div v-for="(item, index) in takeoutList" :key="index">
  34. <div>
  35. <img :src="item.imges" alt="" />
  36. <p>{{ item.name }}</p>
  37. </div>
  38. </div>
  39. <div class="list">
  40. <p>共{{ list.lists.length }}件</p>
  41. <img
  42. class="img"
  43. src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-03-15-55-47ydOMSMGa.png"
  44. alt=""
  45. />
  46. </div>
  47. </div>
  48. <div class="time">
  49. <p>下单时间: {{ list.createdAt }}</p>
  50. <div class="text">
  51. <div class="text1">合计:</div>
  52. <div class="text2">¥{{ list.total }}</div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </template>
  59. <script>
  60. export default {
  61. data() {
  62. return {
  63. list: {
  64. transactionId: '2019052035464',
  65. createdAt: '2021-05-20 07:52:36',
  66. remark: '加急',
  67. packPrice: '2',
  68. distributionPrice: '2',
  69. total: '37',
  70. lists: [
  71. {
  72. price: '11',
  73. name: '寿司',
  74. num: '1',
  75. imges:
  76. 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-54-36URxMKUXs.jpg'
  77. },
  78. {
  79. price: '22',
  80. name: '寿司,八宝粥',
  81. num: '2',
  82. imges:
  83. 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-54-36URxMKUXs.jpg'
  84. }
  85. ]
  86. }
  87. };
  88. },
  89. computed: {
  90. takeoutList() {
  91. return [...this.takeout].filter((item, index) => {
  92. return index < 3;
  93. });
  94. }
  95. },
  96. created() {
  97. this.takeout = this.list.lists;
  98. }
  99. };
  100. </script>
  101. <style lang="less" scoped>
  102. .container {
  103. padding: 0 12px;
  104. .box {
  105. width: 351px;
  106. background: #ffffff;
  107. border-radius: 12px;
  108. padding: 16px 0;
  109. .box1 {
  110. margin: 0 12px;
  111. .tit {
  112. .flex();
  113. img {
  114. width: 18px;
  115. height: 18px;
  116. }
  117. .tit1 {
  118. font-size: 14px;
  119. font-weight: 400;
  120. color: #000000;
  121. margin-left: 5px;
  122. line-height: 24px;
  123. }
  124. }
  125. .address {
  126. .flex();
  127. justify-content: space-between;
  128. margin: 14px 0 17px;
  129. .avatar {
  130. width: 48px;
  131. height: 48px;
  132. border-radius: 8px !important;
  133. }
  134. .text1 {
  135. font-size: 14px;
  136. font-weight: bold;
  137. color: #000;
  138. line-height: 20px;
  139. margin-left: -72px;
  140. &.text2 {
  141. color: #c8c9cc;
  142. font-weight: 400;
  143. }
  144. span {
  145. color: @prim;
  146. }
  147. }
  148. .inter {
  149. width: 28px;
  150. height: 28px;
  151. margin-right: -10px;
  152. }
  153. .inter2 {
  154. width: 12px;
  155. height: 24px;
  156. }
  157. }
  158. .btn {
  159. display: flex;
  160. margin-left: 152px;
  161. .order {
  162. width: 80px;
  163. height: 34px;
  164. border-radius: 8px;
  165. color: @prim;
  166. margin-right: 12px;
  167. line-height: 34px;
  168. font-size: 14px;
  169. text-align: center;
  170. border: 1px solid @prim;
  171. }
  172. .pay {
  173. width: 80px;
  174. height: 36px;
  175. line-height: 36px;
  176. font-size: 14px;
  177. text-align: center;
  178. color: #ffffff;
  179. background: @prim;
  180. border-radius: 8px;
  181. }
  182. }
  183. .border {
  184. height: 1px;
  185. background: @bg;
  186. margin: 20px 0 16px;
  187. }
  188. .ImgBox {
  189. .flex();
  190. margin-bottom: 18px;
  191. img {
  192. width: 80px;
  193. height: 80px;
  194. border-radius: 8px;
  195. margin-right: 12px;
  196. }
  197. p {
  198. font-size: 14px;
  199. font-weight: bold;
  200. color: #1c1c1c;
  201. line-height: 24px;
  202. width: 80px;
  203. .ellipsis();
  204. }
  205. .list {
  206. .flex();
  207. p {
  208. width: 43px;
  209. font-size: 14px;
  210. font-weight: 400;
  211. color: #c8c9cc;
  212. line-height: 24px;
  213. }
  214. .img {
  215. width: 28px;
  216. height: 28px;
  217. margin-left: -10px;
  218. }
  219. }
  220. }
  221. .time {
  222. .flex();
  223. justify-content: space-between;
  224. p {
  225. font-size: 14px;
  226. font-weight: 400;
  227. color: #c8c9cc;
  228. line-height: 24px;
  229. }
  230. .text {
  231. .flex();
  232. font-weight: bold;
  233. .text1 {
  234. font-size: 14px;
  235. color: #c8c9cc;
  236. line-height: 24px;
  237. }
  238. .text2 {
  239. font-size: 16px;
  240. color: #1c1c1c;
  241. line-height: 26px;
  242. }
  243. }
  244. }
  245. }
  246. }
  247. }
  248. </style>