<style lang="scss" scoped>

</style>
<template>
<div>
        <div
          class="text-h5 text-weight-bold text-left q-mt-xl"
          ref="assemblypoint"
          :class="{
            'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
          }"
        >
          景區地址
        </div>
        <div
          class="q-mt-lg trip-text rounded-borders q-mb-xl"
          style="border: 1px dashed var(--q-color-warning)"
          :class="{
            'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
          }">
          <div class="q-pa-md" style="border-bottom: 1px dashed var(--q-color-warning)">
            <div class="text-weight-bold text-h6">地點名稱：{{dataList.Name}}</div>
            <div class="text-grey-9">地址：{{`${dataList.Address}`}}</div>
          </div>
          <div class="q-pa-md" :class="{
            'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
          }">
            <componentsMap v-if="AddressObj.Lng&&AddressObj.Lat" :AddressObj="AddressObj"/>
            <div v-else class="card text-center">经纬度未知</div>
          </div>
        </div></div>
</template>
<script>
import componentsMap from "src/components/car/Map.vue";
export default {
  components: {componentsMap},
    props: {
        orderInfo: {
            type: Object,
            default: () => ({})
        }
    },
    data() {
      return {
        dataList: {},
        AddressObj: {},
        details: null,
      sumPrice: 0,//总金额
      DiscountsMoney: 0,//优惠金额
      Money: 0, // 支付金額
      MailingMoney: 0, // 邮寄费
      MailingState: '',//邮寄状态 1自取 2邮寄
      }
    },
    mounted() {
        this.getData()
        // this.getOrder()
    },
    methods: {
    //  获取商品详情
    getData() {
      this.$q.loading.show();
      this.apipost(
        "b2c_get_GetTicketCouponsDetail",
        { CouponsId: this.orderInfo.GoodsId },
        (r) => {
          if (r.data.resultCode == 1) {
            let addList = function (arr) {
                arr.forEach(item => {
                  item.checked = false
                  item.Count = 1
                });
            };
            addList(r.data.data.TicketList);
            this.dataList = r.data.data;
            this.selectedId = this.dataList.TicketList.find(x=>x.Id)
            this.dataList.imgCover = this.dataList.PicPathList;
            this.AddressObj = this.dataList
            this.AddressObj.Address = `${this.dataList.CountryName}-${this.dataList.CityName}-${this.dataList.ProvinceName}-${this.dataList.Address}`
            this.isShow = true;
            if (this.dataList.videoStr && this.dataList.videoStr != "") {
              this.options.loop = false;
              this.options.currentPage = 1;
              this.$nextTick(() => {
                setTimeout(() => {
                  let t = document.querySelectorAll(".slider-wrapper");
                  if (t.length > 0) {
                    let d = t[0].getBoundingClientRect();
                    this.videoPosition = d.top + d.height;
                  }
                }, 1000);
              });
            }
            
          } else {
            this.$q.notify({
              type: "negative",
              message: r.data.message,
              position: "top",
            });
          }
          this.$q.loading.hide();
        },
        null
      );
    },
    }
}
</script>