chore:进入商品列表,默认视图要图片中的竖版视图
This commit is contained in:
@@ -244,7 +244,7 @@ const localDevConfig = ({
|
|||||||
// })['2811']; // 本地
|
// })['2811']; // 本地
|
||||||
// })['5g-317']; // 电磁兼容
|
// })['5g-317']; // 电磁兼容
|
||||||
// })['5g-351']; //
|
// })['5g-351']; //
|
||||||
})['1']; // 本地
|
})['5g-351']; // 本地
|
||||||
// })['local-2']; // 本地
|
// })['local-2']; // 本地
|
||||||
// })['local-11']; // 本地
|
// })['local-11']; // 本地
|
||||||
// })['1-test']; // test
|
// })['1-test']; // test
|
||||||
|
|||||||
@@ -187,8 +187,9 @@
|
|||||||
<!-- 三级分类(及更深层级): 一级分类标题 + 二级分类网格(图3) -->
|
<!-- 三级分类(及更深层级): 一级分类标题 + 二级分类网格(图3) -->
|
||||||
<view :class="['category-title', '']">{{ category.category_name }}</view>
|
<view :class="['category-title', '']">{{ category.category_name }}</view>
|
||||||
<view class="category-list">
|
<view class="category-list">
|
||||||
|
<!-- 点二级分类进入商品列表: 带 list_style=grid, 让列表页默认用竖版(双列宫格)视图 -->
|
||||||
<view class="category-item" v-for="(one, oneIndex) in category.child_list" :key="oneIndex"
|
<view class="category-item" v-for="(one, oneIndex) in category.child_list" :key="oneIndex"
|
||||||
@tap.stop="$util.redirectTo('/pages_goods/list', { category_id: one.category_id })">
|
@tap.stop="$util.redirectTo('/pages_goods/list', { category_id: one.category_id, list_style: 'grid' })">
|
||||||
<view class="img-box">
|
<view class="img-box">
|
||||||
<image :src="categoryImg(one.image)" mode="aspectFit" @error="categoryImgError(2, oneIndex, -1)" show-menu-by-longpress />
|
<image :src="categoryImg(one.image)" mode="aspectFit" @error="categoryImgError(2, oneIndex, -1)" show-menu-by-longpress />
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -82,6 +82,11 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.categoryId = options.category_id || 0;
|
this.categoryId = options.category_id || 0;
|
||||||
|
// 商品分类(模板5)点二级分类进入时带 list_style=grid, 默认展示竖版(双列宫格)视图;
|
||||||
|
// 其它入口(搜索/优惠券/品牌等)保持原有的单列列表视图
|
||||||
|
if (options.list_style === 'grid') {
|
||||||
|
this.isList = false;
|
||||||
|
}
|
||||||
this.keyword = options.keyword || '';
|
this.keyword = options.keyword || '';
|
||||||
this.coupon = options.coupon || 0;
|
this.coupon = options.coupon || 0;
|
||||||
this.goods_id_arr = options.goods_id_arr || 0;
|
this.goods_id_arr = options.goods_id_arr || 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user