myReservation.vue 1.41 KB
<template>
  <div>
    <el-card :body-style="{'padding':'0'}">
      <div class="indexTitle"><h3 class="leftboderTT">{{ language==0?'我的预订':'My reservation' }}</h3></div>
      <el-empty :image="`/img/order_no.png`" :image-size="228"  v-if="list?.length == 0"/>
      <div v-for="b in list">
        <h3>{{b.name}}</h3>

        <div v-if="b.orderType == 0">
          <div><label class="blueTag"> 酒店订单</label>
            订单编号:
            {{ b.id }}</div>
          <div>
            {{b.messageObj?.roomStayDate}}
          </div>
          <div>
            {{b.messageObj?.roomName}}
          </div>
          <div>
            {{b.messageObj?.roomInfo}}
          </div>
        </div>
        {{b}}
      </div>
      <div class="pd20"></div>
    </el-card>
  </div>
</template>

<script setup>
import {onMounted} from "@vue/runtime-core";
import {useStorage} from "@vueuse/core/index";
import {newbilllist} from "@/apiPc/common";
const language= useStorage('language',0)
const list = ref([])

onMounted(()=>{
  getList()
})
function getList() {
  newbilllist().then(res=>{
    list.value = res.rows
    for (var b of list.value) {
      b.messageObj = JSON.parse(b.message)
    }
  })
}
</script>

<style scoped lang="scss">
.indexTitle {
  margin: 20px 0 12px;
  padding: 0 20px 15px;
  border-bottom: 1px solid #e5e5e5;

  h3 {
    font-size: 16px;
    color: var(--el-color-primary);
  }
}


</style>