|
@@ -2,10 +2,12 @@
|
|
|
<mobile-frame>
|
|
|
<view class="main">
|
|
|
<view class="onemain">
|
|
|
- <scroll-view scroll-y="true" class="scroll-view" scroll-with-animation :scroll-into-view="topItem" @scroll="handleScroll">
|
|
|
+ <scroll-view scroll-y="true" class="scroll-view" scroll-with-animation :scroll-into-view="topItem"
|
|
|
+ @scroll="handleScroll">
|
|
|
<view class="list-scroll-view" id="top">
|
|
|
<view class="one">
|
|
|
- <swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff" indicator-active-color="#FB1438" :autoplay="true" :interval="3000" :duration="1000">
|
|
|
+ <swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff"
|
|
|
+ indicator-active-color="#FB1438" :autoplay="true" :interval="3000" :duration="1000">
|
|
|
<swiper-item class="list" v-for="(item,index) in bannerList" :key="index">
|
|
|
<image class="image" :src="item.url" mode=""></image>
|
|
|
</swiper-item>
|
|
@@ -67,7 +69,8 @@
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
<view class="foot">
|
|
|
- <uni-goods-nav :options="options" :button-group="buttonGroup" @click="onClick" @buttonClick="buttonClick" />
|
|
|
+ <uni-goods-nav :options="options" :button-group="buttonGroup" @click="onClick"
|
|
|
+ @buttonClick="buttonClick" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="collect">
|
|
@@ -175,6 +178,7 @@
|
|
|
type: '1'
|
|
|
}
|
|
|
],
|
|
|
+ id: '',
|
|
|
bannerList: [ // 轮播图
|
|
|
{
|
|
|
url: require('@/static/test.png')
|
|
@@ -226,8 +230,10 @@
|
|
|
type: '0'
|
|
|
};
|
|
|
},
|
|
|
- onLoad: function(e) {
|
|
|
- console.log(e);
|
|
|
+ onLoad: async function(e) {
|
|
|
+ const that = this;
|
|
|
+ that.$set(that, `id`, e.id || '');
|
|
|
+ that.search();
|
|
|
},
|
|
|
onShow: function() {},
|
|
|
methods: {
|
|
@@ -319,7 +325,15 @@
|
|
|
backTop() {
|
|
|
const that = this;
|
|
|
that.topItem = 'top'
|
|
|
- }
|
|
|
+ },
|
|
|
+ async search() {
|
|
|
+ const that = this;
|
|
|
+ // let res = await that.$api(`/goods/${that.id}`, `GET`, {});
|
|
|
+ // if (res.errcode == '0') {
|
|
|
+ // that.$set(that, `info`, res.data)
|
|
|
+ // console.log(res.data);
|
|
|
+ // }
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|