counterHomePage.vue 2.91 KB
Newer Older
xd's avatar
xd committed
1 2 3 4
<template>
  <div class="container">
    <div class="flex-start">
      <div class="img">
xd's avatar
xd committed
5 6 7
        <van-swipe :autoplay="3000" >
          <van-swipe-item v-for="(item,index) in  carousel" :key="index">
            <img :src="item"  />
xd's avatar
xd committed
8 9 10
          </van-swipe-item>
        </van-swipe>
      </div>
xd's avatar
xd committed
11 12 13 14 15 16 17 18
      <div class="list">
        <div class="left">
          <img :src="storeInfo.logo" alt="" />
        </div>
        <div class="right">
          <h3>{{storeInfo.name}}</h3>
          <p>{{storeInfo.summaryTitle}}</p>
        </div>
xd's avatar
xd committed
19
      </div>
xd's avatar
xd committed
20 21 22 23 24
      <!-- <div class="ql-container ql-snow">
        <div class="ql-editor fwb" v-html="storeInfo.summary">
        </div>
      </div> -->
      <div v-html="storeInfo.summary" class="fwb ql-editor"></div>
xd's avatar
xd committed
25
    </div>
xd's avatar
xd committed
26
    
xd's avatar
xd committed
27 28 29 30
  </div>
</template>

<script>
xd's avatar
xd committed
31 32
  import axios from "axios"
  import { getStoreDetail } from "@/api/sidebar/voucher";
xd's avatar
xd committed
33 34 35
export default {
  data() {
    return {
xd's avatar
xd committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
      oyStallCode: '',
      storeInfo: {
        logo: './img/counter.png',
        name: 'only专柜',
        summaryTitle: 'ONLY是丹麦著名的国际时装公司BESTSELLER拥有的众多著名品牌之一', 
        summary: '<p>ONLY在1996年来到中国,1996年9月28日,品牌诞生之初便富有远见地来到中国</p>'
      },
      carousel:['./img/cswiper.png','./img/cswiper.png','./img/cswiper.png','./img/cswiper.png']
    }
  },
  mounted() {
    this.oyStallCode = sessionStorage.getItem('oyStallCode')
    this.getStore()
  },
  methods: {
    // 获取店铺信息
    getStore() {
      let params = {
xd's avatar
xd committed
54
        oyStallCode: this.oyStallCode
xd's avatar
xd committed
55 56 57 58 59 60 61 62
      }
      getStoreDetail(params).then(res => {
        if(res.data.stallInfo != null) {
          console.log(res,'res');
          this.carousel = res.data.carousel
          this.storeInfo = res.data.stallInfo
        }
      })
xd's avatar
xd committed
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
    }
  }
}
</script>

<style scoped>
 .container {
  background: #f8f8f8;
  height: auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: column;
  min-height: 100%;
}
.img {
  width: 100%;
  height: 200px;
xd's avatar
xd committed
81
  background-color: #fff;
xd's avatar
xd committed
82 83 84
}
.img img {
  width: 100%;
xd's avatar
xd committed
85 86 87 88
  height: 200px;
}
.img >>> .van-swipe {
  height: 200px;
xd's avatar
xd committed
89 90
}
.list {
xd's avatar
xd committed
91
  height: 80px;
xd's avatar
xd committed
92 93 94
  width: 100%;
  background-color: #fff;
  display: flex;
xd's avatar
xd committed
95
  justify-content: space-between;
xd's avatar
xd committed
96 97 98 99 100
  border-bottom: 1px solid rgba(238, 238, 238, 1);
  box-shadow: 0px 2px 4px 0px rgba(221, 221, 221, 1);
  border-radius: 2px;
  z-index: 100;
}
xd's avatar
xd committed
101 102 103 104 105 106 107 108
.list3 {
  border-bottom: none;
  margin-bottom: 0;
}
.left,
.right {
  height: 80px;
}
xd's avatar
xd committed
109 110
.left {
  width: 30%;
xd's avatar
xd committed
111 112
  display: flex;
  justify-content: center;
xd's avatar
xd committed
113 114
}
.left img {
xd's avatar
xd committed
115
  height: 80px;
xd's avatar
xd committed
116 117
}
.right {
xd's avatar
xd committed
118 119
  width: 70%;
  padding: 16px 0 0 10px;
xd's avatar
xd committed
120 121 122 123 124 125 126
  background-color: #fff;
}
h3 {
  font-size: 14px;
  font-weight: bold;
  color: rgba(45, 71, 106, 1);
}
xd's avatar
xd committed
127
p {
xd's avatar
xd committed
128 129 130 131
  margin-top: 10px;
  font-size: 12px;
  color: rgba(45, 71, 106, 0.8);
}
xd's avatar
xd committed
132 133 134 135 136 137 138 139 140
.fwb {
  padding:30px;
}
.fwb >>> p {
  font-size: 14px;
}
.fwb >>> img {
  width: 100%;
}
xd's avatar
xd committed
141
</style>