| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- <template>
- <div class="container">
- <div class="box">
- <div class="box1" @click="navigateTo('/pages/orderdetails')">
- <div class="tit">
- <img
- src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-03-15-53-18gjxoMYNY.png"
- alt=""
- />
- <div class="tit1">益禾堂(一食堂)</div>
- </div>
- <div class="address">
- <img
- class="avatar"
- src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-10-17-31-24egsujwUw.jpg"
- />
- <div>
- <div class="text1">订单将在 <span>4:22</span> 后自动取消</div>
- <div class="text1 text2">请尽快完成支付</div>
- </div>
- <img
- class="inter2"
- src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-15-14-15-50oEVgXoZN.png"
- alt=""
- />
- </div>
- <div class="btn">
- <div class="order">取消订单</div>
- <div class="pay">立即支付</div>
- </div>
- <div class="border"></div>
- <div class="ImgBox">
- <div v-for="(item, index) in takeoutList" :key="index">
- <div>
- <img :src="item.imges" alt="" />
- <p>{{ item.name }}</p>
- </div>
- </div>
- <div class="list">
- <p>共{{ list.lists.length }}件</p>
- <img
- class="img"
- src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-03-15-55-47ydOMSMGa.png"
- alt=""
- />
- </div>
- </div>
- <div class="time">
- <p>下单时间: {{ list.createdAt }}</p>
- <div class="text">
- <div class="text1">合计:</div>
- <div class="text2">¥{{ list.total }}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- list: {
- transactionId: '2019052035464',
- createdAt: '2021-05-20 07:52:36',
- remark: '加急',
- packPrice: '2',
- distributionPrice: '2',
- total: '37',
- lists: [
- {
- price: '11',
- name: '寿司',
- num: '1',
- imges:
- 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-54-36URxMKUXs.jpg'
- },
- {
- price: '22',
- name: '寿司,八宝粥',
- num: '2',
- imges:
- 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-15-54-36URxMKUXs.jpg'
- }
- ]
- }
- };
- },
- computed: {
- takeoutList() {
- return [...this.takeout].filter((item, index) => {
- return index < 3;
- });
- }
- },
- created() {
- this.takeout = this.list.lists;
- }
- };
- </script>
- <style lang="less" scoped>
- .container {
- padding: 0 12px;
- .box {
- width: 351px;
- background: #ffffff;
- border-radius: 12px;
- padding: 16px 0;
- .box1 {
- margin: 0 12px;
- .tit {
- .flex();
- img {
- width: 18px;
- height: 18px;
- }
- .tit1 {
- font-size: 14px;
- font-weight: 400;
- color: #000000;
- margin-left: 5px;
- line-height: 24px;
- }
- }
- .address {
- .flex();
- justify-content: space-between;
- margin: 14px 0 17px;
- .avatar {
- width: 48px;
- height: 48px;
- border-radius: 8px !important;
- }
- .text1 {
- font-size: 14px;
- font-weight: bold;
- color: #000;
- line-height: 20px;
- margin-left: -72px;
- &.text2 {
- color: #c8c9cc;
- font-weight: 400;
- }
- span {
- color: @prim;
- }
- }
- .inter {
- width: 28px;
- height: 28px;
- margin-right: -10px;
- }
- .inter2 {
- width: 12px;
- height: 24px;
- }
- }
- .btn {
- display: flex;
- margin-left: 152px;
- .order {
- width: 80px;
- height: 34px;
- border-radius: 8px;
- color: @prim;
- margin-right: 12px;
- line-height: 34px;
- font-size: 14px;
- text-align: center;
- border: 1px solid @prim;
- }
- .pay {
- width: 80px;
- height: 36px;
- line-height: 36px;
- font-size: 14px;
- text-align: center;
- color: #ffffff;
- background: @prim;
- border-radius: 8px;
- }
- }
- .border {
- height: 1px;
- background: @bg;
- margin: 20px 0 16px;
- }
- .ImgBox {
- .flex();
- margin-bottom: 18px;
- img {
- width: 80px;
- height: 80px;
- border-radius: 8px;
- margin-right: 12px;
- }
- p {
- font-size: 14px;
- font-weight: bold;
- color: #1c1c1c;
- line-height: 24px;
- width: 80px;
- .ellipsis();
- }
- .list {
- .flex();
- p {
- width: 43px;
- font-size: 14px;
- font-weight: 400;
- color: #c8c9cc;
- line-height: 24px;
- }
- .img {
- width: 28px;
- height: 28px;
- margin-left: -10px;
- }
- }
- }
- .time {
- .flex();
- justify-content: space-between;
- p {
- font-size: 14px;
- font-weight: 400;
- color: #c8c9cc;
- line-height: 24px;
- }
- .text {
- .flex();
- font-weight: bold;
- .text1 {
- font-size: 14px;
- color: #c8c9cc;
- line-height: 24px;
- }
- .text2 {
- font-size: 16px;
- color: #1c1c1c;
- line-height: 26px;
- }
- }
- }
- }
- }
- }
- </style>
|