storeDetail.vue 5.45 KB
<!-- 查看门店弹窗 -->
<template>
  <div class="storeDetail flex">
    <div>门店列表</div>
    <div class="detail-rows">
      <el-scrollbar>
        <div
          v-for="(item, index) in detailArr"
          :key="index"
          class="flex"
        >
          <img
            class="img"
            :src="item.img"
          />
          <block>
            <p><span class="txt-order">{{index + 1}}</span>{{item.merchantName}}</p>
            <p>
              <span class="txt-num">编号{{item.num}}</span>
              <span>{{item.phone}}</span>
            </p>
            <p>{{item.address}}</p>
          </block>
        </div>
      </el-scrollbar>
    </div>
  </div>
</template>

<script>
import { getMerchantList } from '@api/commodity'
export default {
  name: 'storeDetail',
  data() {
    return {
      detailArr: [
        //   {
        //   name: '滴滴虎智慧门店',
        //   img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
        //   num: 'GLS001',
        //   phone: '0775-12345678',
        //   addr: '广东省深圳市南山区广东省深圳'
        // }, {
        //   name: '滴滴虎智慧门店',
        //   img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
        //   num: 'GLS001',
        //   phone: '0775-12345678',
        //   addr: '广东省深圳市南山区广东省深圳'
        // }, {
        //   name: '滴滴虎智慧门店',
        //   img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
        //   num: 'GLS001',
        //   phone: '0775-12345678',
        //   addr: '广东省深圳市南山区广东省深圳'
        // }, {
        //   name: '滴滴虎智慧门店',
        //   img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
        //   num: 'GLS001',
        //   phone: '0775-12345678',
        //   addr: '广东省深圳市南山区广东省深圳'
        // }, {
        //   name: '滴滴虎智慧门店',
        //   img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
        //   num: 'GLS001',
        //   phone: '0775-12345678',
        //   addr: '广东省深圳市南山区广东省深圳'
        // }, {
        //   name: '滴滴虎智慧门店',
        //   img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
        //   num: 'GLS001',
        //   phone: '0775-12345678',
        //   addr: '广东省深圳市南山区广东省深圳'
        // }, {
        //   name: '滴滴虎智慧门店',
        //   img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
        //   num: 'GLS001',
        //   phone: '0775-12345678',
        //   addr: '广东省深圳市南山区广东省深圳'
        // }, {
        //   name: '滴滴虎智慧门店',
        //   img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
        //   num: 'GLS001',
        //   phone: '0775-12345678',
        //   addr: '广东省深圳市南山区广东省深圳'
        // }, {
        //   name: '滴滴虎智慧门店',
        //   img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
        //   num: 'GLS001',
        //   phone: '0775-12345678',
        //   addr: '广东省深圳市南山区广东省深圳'
        // }, {
        //   name: '滴滴虎智慧门店',
        //   img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
        //   num: 'GLS001',
        //   phone: '0775-12345678',
        //   addr: '广东省深圳市南山区广东省深圳'
        // }, {
        //   name: '滴滴虎智慧门店',
        //   img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
        //   num: 'GLS001',
        //   phone: '0775-12345678',
        //   addr: '广东省深圳市南山区广东省深圳'
        // }, {
        //   name: '滴滴虎智慧门店',
        //   img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
        //   num: 'GLS001',
        //   phone: '0775-12345678',
        //   addr: '广东省深圳市南山区广东省深圳'
        // }
      ]
    }
  },

  props: {
    detailData: {
      type: Object,
      default: () => { }
    }
  },

  mounted() {
    // console.log(this.detailData)
    this.getMerchantList()
  },

  methods: {
    getMerchantList() {
      this.detailArr = []
      getMerchantList({
        baseGoodsId: this.detailData.id
      }).then(res => {
        // console.log(res)
        res.forEach(item => {
          this.detailArr.push(item.merchantInfo)
        })
      })
    }
  }
}

</script>
<style>
.flex {
  display: flex;
  align-items: center;
}
.storeDetail .detail-rows {
  width: 86%;
  height: 540px;
}
.storeDetail .txt-order {
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 18px;
  border: 1px solid #999999;
  border-radius: 50%;
  text-align: center;
  margin-right: 8px;
}
.el-scrollbar {
  height: 100%;
}
.el-scrollbar__wrap {
  overflow-y: scroll;
  overflow-x: hidden;
  margin-bottom: 0 !important;
}
.storeDetail .img {
  width: 100px;
  height: 100px;
  margin: 0 20px;
}
.storeDetail .txt-num {
  padding-right: 20px;
}
</style>