Browse Source

修改adv数据

zyh
anhaogxs 4 years ago
parent
commit
41a2882fd3
  1. 46
      components/Adv.vue
  2. 2
      pages/home/index.vue

46
components/Adv.vue

@ -2,55 +2,55 @@
<view class="adv-box mx20 mb10"> <view class="adv-box mx20 mb10">
<!-- 模板1--> <!-- 模板1-->
<view class="x-f" v-if="detail.style == 1"> <view class="x-f" v-if="detail.style == 1">
<image style="width:710rpx;height: 220rpx;" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image> <image style="width:710rpx;height: 220rpx;" @tap="jump(detail.list[0].uniapp_url)" :src="detail.list[0].image" mode="aspectFill"></image>
</view> </view>
<!-- 模板2--> <!-- 模板2-->
<view class="type1 x-f" v-if="detail.style == 2"> <view class="type1 x-f" v-if="detail.style == 2">
<image class="type1-img" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image> <image class="type1-img" @tap="jump(detail.list[0].uniapp_url)" :src="detail.list[0].image" mode="aspectFill"></image>
<image class="type1-img" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image> <image class="type1-img" @tap="jump(detail.list[1].uniapp_url)" :src="detail.list[1].image" mode="aspectFill"></image>
</view> </view>
<!-- 模板3--> <!-- 模板3-->
<view class="type2 x-bc" v-if="detail.style == 3"> <view class="type2 x-bc" v-if="detail.style == 3">
<image class="type2-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image> <image class="type2-img1" @tap="jump(detail.list[0].uniapp_url)" :src="detail.list[0].image" mode="aspectFill"></image>
<view class="y-f type2-box"> <view class="y-f type2-box">
<image class="type2-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill" style="border-bottom:1rpx solid #f6f6f6"></image> <image class="type2-img2" @tap="jump(detail.list[1].uniapp_url)" :src="detail.list[1].image" mode="aspectFill" style="border-bottom:1rpx solid #f6f6f6"></image>
<image class="type2-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image> <image class="type2-img2" @tap="jump(detail.list[2].uniapp_url)" :src="detail.list[2].image" mode="aspectFill"></image>
</view> </view>
</view> </view>
<!-- 模板4--> <!-- 模板4-->
<view class="type3 x-bc" v-if="detail.style == 4"> <view class="type3 x-bc" v-if="detail.style == 4">
<view class="type3-box y-f"> <view class="type3-box y-f">
<image class="type3-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image> <image class="type3-img1" @tap="jump(detail.list[0].uniapp_url)" :src="detail.list[0].image" mode="aspectFill"></image>
<image class="type3-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image> <image class="type3-img1" @tap="jump(detail.list[1].uniapp_url)" :src="detail.list[1].image" mode="aspectFill"></image>
</view> </view>
<image class="type3-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image> <image class="type3-img2" @tap="jump(detail.list[2].uniapp_url)" :src="detail.list[2].image" mode="aspectFill"></image>
</view> </view>
<!-- 模板5--> <!-- 模板5-->
<view class="type4 y-f" v-if="detail.style == 5"> <view class="type4 y-f" v-if="detail.style == 5">
<view class="type4-box x-f"> <view class="type4-box x-f">
<image class="type4-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image> <image class="type4-img1" @tap="jump(detail.list[0].uniapp_url)" :src="detail.list[0].image" mode="aspectFill"></image>
<image class="type4-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image> <image class="type4-img1" @tap="jump(detail.list[1].uniapp_url)" :src="detail.list[1].image" mode="aspectFill"></image>
</view> </view>
<image class="type4-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image> <image class="type4-img2" @tap="jump(detail.list[2].uniapp_url)" :src="detail.list[2].image" mode="aspectFill"></image>
</view> </view>
<!-- 模板6--> <!-- 模板6-->
<view class="type5 y-f" v-if="detail.style == 6"> <view class="type5 y-f" v-if="detail.style == 6">
<image class="type5-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image> <image class="type5-img1" @tap="jump(detail.list[0].uniapp_url)" :src="detail.list[0].image" mode="aspectFill"></image>
<view class="type5-box x-bc"> <view class="type5-box x-bc">
<image class="type5-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill" style="border-bottom:1rpx solid #f6f6f6"></image> <image class="type5-img2" @tap="jump(detail.list[1].uniapp_url)" :src="detail.list[1].image" mode="aspectFill" style="border-bottom:1rpx solid #f6f6f6"></image>
<image class="type5-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image> <image class="type5-img2" @tap="jump(detail.list[2].uniapp_url)" :src="detail.list[2].image" mode="aspectFill"></image>
</view> </view>
</view> </view>
<!-- 模板7--> <!-- 模板7-->
<view class="type6 y-f" v-if="detail.style == 7"> <view class="type6 y-f" v-if="detail.style == 7">
<view class="x-f type6-box1"> <view class="x-f type6-box1">
<image class="type6-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image> <image class="type6-img1" @tap="jump(detail.list[0].uniapp_url)" :src="detail.list[0].image" mode="aspectFill"></image>
<image class="type6-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image> <image class="type6-img1" @tap="jump(detail.list[1].uniapp_url)" :src="detail.list[1].image" mode="aspectFill"></image>
</view> </view>
<view class="x-f type6-box2"> <view class="x-f type6-box2">
<image class="type6-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image> <image class="type6-img2" @tap="jump(detail.list[2].uniapp_url)" :src="detail.list[2].image" mode="aspectFill"></image>
<image class="type6-img2" @tap="jump(detail.list[3].path)" :src="detail.list[3].image" mode="aspectFill"></image> <image class="type6-img2" @tap="jump(detail.list[3].uniapp_url)" :src="detail.list[3].image" mode="aspectFill"></image>
<image class="type6-img2" @tap="jump(detail.list[4].path)" :src="detail.list[4].image" mode="aspectFill"></image> <image class="type6-img2" @tap="jump(detail.list[4].uniapp_url)" :src="detail.list[4].image" mode="aspectFill"></image>
</view> </view>
</view> </view>
</view> </view>
@ -63,14 +63,16 @@ export default {
return {}; return {};
}, },
props: { props: {
detail: {} detail: Object
}, },
computed: {}, computed: {},
created() {}, created() {},
methods: { methods: {
// //
jump(path) { jump(path) {
this.$tools.routerTo(path); if (item.uniapp_url) {
this.$yrouter.push(path)
}
} }
} }
}; };

2
pages/home/index.vue

@ -25,7 +25,7 @@
<Menu :list="item.componentContent.menus" v-if="item.type=='menu'"></Menu> <Menu :list="item.componentContent.menus" v-if="item.type=='menu'"></Menu>
<!-- 滚动新闻 --> <!-- 滚动新闻 -->
<!-- 广告 --> <!-- 广告 -->
<Adv v-if="item.type=='adv'" /> <Adv v-if="item.type=='adv'" :detail="item.componentContent.detail" />
<!-- 热门榜单 --> <!-- 热门榜单 -->
<HotCommodity v-if="item.type=='hotCommodity'" :detail="likeInfo"></HotCommodity> <HotCommodity v-if="item.type=='hotCommodity'" :detail="likeInfo"></HotCommodity>
<!-- 超值拼团 --> <!-- 超值拼团 -->

Loading…
Cancel
Save