|
|
@@ -48,7 +48,7 @@
|
|
|
</view>
|
|
|
<view class="list_bar">
|
|
|
<div class="tit">猜你喜欢</div>
|
|
|
- <goodslist :long="1" type="3" />
|
|
|
+ <goodslist :long="1" type="3" ref="goodslist"/>
|
|
|
</view>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -76,7 +76,10 @@ export default {
|
|
|
onLoad(option) {},
|
|
|
onLaunch() {},
|
|
|
onShow() {
|
|
|
- // this.getBanner(); //获取轮播图
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.$refs.goodslist.loadData();
|
|
|
+ })
|
|
|
+ this.getBanner(); //获取轮播图
|
|
|
// this.getAnnounce(); //获取公告列表
|
|
|
// this.getImageTwo(); //金刚区
|
|
|
// this.getImage(); //获取活动列表
|
|
|
@@ -85,9 +88,12 @@ export default {
|
|
|
methods: {
|
|
|
// 获取轮播图
|
|
|
getBanner() {
|
|
|
- post("ShuZiTeaYW/shop/play").then((res) => {
|
|
|
- if (res.status == 200) {
|
|
|
- this.BannerImg = res.list;
|
|
|
+ post("banner").then((res) => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ res.data.data.forEach(e => {
|
|
|
+ if(e.image) this.BannerImg.push(e.image)
|
|
|
+ });
|
|
|
+ // this.BannerImg = res.list;
|
|
|
}
|
|
|
});
|
|
|
},
|