商城快讯添加多图
This commit is contained in:
parent
03c561d840
commit
4a333f3a95
@ -64,6 +64,7 @@
|
||||
},
|
||||
onLoad() {
|
||||
this.id = this.$Route.query.id;
|
||||
this.mall_type = this.$Route.query.mall_type;
|
||||
this.getDetail()
|
||||
},
|
||||
methods: {
|
||||
@ -74,7 +75,7 @@
|
||||
},
|
||||
|
||||
async getDetail() {
|
||||
const {code, data, msg} = await getMallNewsDetail({id: this.id});
|
||||
const {code, data, msg} = await getMallNewsDetail({id: this.id, mall_type: this.mall_type});
|
||||
if (code == 1) {
|
||||
this.item = data
|
||||
}
|
||||
|
||||
@ -10,7 +10,21 @@
|
||||
<view class="goods-name bold">{{item.title}}</view>
|
||||
<view class="goods-name m-t-10">{{item.desc}}</view>
|
||||
</router-link>
|
||||
<view v-if="item.files != ''">
|
||||
<view v-if="item.mall_type == 1">
|
||||
<view v-if="item.shop != ''">
|
||||
<scroll-view :scroll-x="true">
|
||||
<view class="flex" >
|
||||
<view v-for="(v, i) in item.shop" :key="i" style="width: 240rpx;height: 240rpx;margin-right: 20rpx;margin-top: 20rpx;">
|
||||
<router-link :to="{path: '/bundle_b/pages/mall_news/detail', query: {id: v[0].mall_news_shop_id, mall_type: 1}}">
|
||||
<u-image class="thumb" width="240rpx" height="240rpx" :border-radius="10" :src="v[0].image"></u-image>
|
||||
</router-link>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="item.files != '' && item.mall_type == 0">
|
||||
<view v-if="item.type == 0">
|
||||
<scroll-view style="white-space: nowrap;" :scroll-x="true">
|
||||
<view class="flex">
|
||||
@ -22,7 +36,7 @@
|
||||
<video :src="item.files[0].src" class="thumb-video"></video>
|
||||
</view>
|
||||
</view>
|
||||
<view class="shop m-t-20" v-if="item.shop">
|
||||
<view class="shop m-t-20" v-if="item.shop && item.mall_type == 0">
|
||||
<view class="bold">推荐商品</view>
|
||||
<router-link :to="{path: '/pages/goods_details/goods_details', query: {id: item.shop_id}}" class="flex">
|
||||
<view class="flex">
|
||||
@ -59,7 +73,7 @@
|
||||
<video :src="item.files[0].src" class="thumb-video"></video>
|
||||
</view>
|
||||
</view>
|
||||
<view class="shop m-t-20" v-if="item.shop">
|
||||
<view class="shop m-t-20" v-if="item.shop && item.mall_type == 0">
|
||||
<view class="bold">推荐商品</view>
|
||||
<router-link :to="{path: '/pages/goods_details/goods_details', query: {id: item.shop_id}}" class="flex">
|
||||
<view class="flex">
|
||||
@ -95,8 +109,6 @@
|
||||
},
|
||||
methods: {
|
||||
preview(current, files) {
|
||||
console.log(current)
|
||||
console.log(files)
|
||||
let f = files.map((item) => {
|
||||
return item.src
|
||||
})
|
||||
|
||||
@ -6,14 +6,13 @@
|
||||
<view v-if="list" class="goods-seckill">
|
||||
<view class="item bg-white flex" v-for="(item, index) in list" :key="index">
|
||||
<view class="goods-info m-l-20 flex-1">
|
||||
<router-link :to="{path: '/bundle_b/pages/mall_news/detail', query: {id: item.id}}">
|
||||
<router-link :to="{path: '/bundle_b/pages/mall_news/detail', query: {id: item.id}}" v-if="item.mall_type == 0">
|
||||
<view class="goods-name line-2 bold">{{item.title}}</view>
|
||||
<view class="goods-name line-2 m-t-10">{{item.desc}}</view>
|
||||
<view v-if="item.files != ''" style="width: 80%;">
|
||||
<view v-if="item.type == 0">
|
||||
<scroll-view style="white-space: nowrap;" :scroll-x="true">
|
||||
<view class="flex">
|
||||
<!-- <u-image @click="preview(v.src, item.files)" class="thumb" v-for="(v, i) in item.files" :key="i" width="240rpx" height="240rpx" :border-radius="10" :src="v.src"></u-image> -->
|
||||
<u-image class="thumb" v-for="(v, i) in item.files" :key="i" width="240rpx" height="240rpx" :border-radius="10" :src="v.src"></u-image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@ -23,6 +22,22 @@
|
||||
</view>
|
||||
</view>
|
||||
</router-link>
|
||||
|
||||
<view v-if="item.mall_type == 1">
|
||||
<view class="goods-name line-2 bold">{{item.title}}</view>
|
||||
<view class="goods-name line-2 m-t-10">{{item.desc}}</view>
|
||||
<view v-if="item.shop != ''" style="width: 60%;">
|
||||
<scroll-view :scroll-x="true">
|
||||
<view class="flex" >
|
||||
<view v-for="(v, i) in item.shop" :key="i" style="width: 240rpx;height: 240rpx;margin-right: 20rpx;margin-top: 20rpx;">
|
||||
<router-link :to="{path: '/bundle_b/pages/mall_news/detail', query: {id: v[0].mall_news_shop_id, mall_type: 1}}">
|
||||
<u-image class="thumb" width="240rpx" height="240rpx" :border-radius="10" :src="v[0].image"></u-image>
|
||||
</router-link>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user