优化楼层装修中商品分类代码可能会出现的bug . 如果更新此版本建议同步更新uni版本更新
parent
fd1d32d431
commit
3cb0e52ca0
|
@ -459,22 +459,32 @@ export const modelData = [
|
|||
options: {
|
||||
list: [
|
||||
{
|
||||
/**
|
||||
* 2021/12/9
|
||||
* 新增索引(‘index’)判断商品归属分类
|
||||
* 之前代码没有配置index也不会收到印象
|
||||
* 新建的楼层将采用索引判断分类
|
||||
*/
|
||||
titleWay: [
|
||||
{
|
||||
title: "精选",
|
||||
desc: "电子推荐"
|
||||
desc: "电子推荐",
|
||||
___index:0,
|
||||
},
|
||||
{
|
||||
title: "实惠",
|
||||
desc: "便宜好货"
|
||||
desc: "便宜好货",
|
||||
___index:1,
|
||||
},
|
||||
{
|
||||
title: "进口",
|
||||
desc: "国际自营"
|
||||
desc: "国际自营",
|
||||
___index:2,
|
||||
},
|
||||
{
|
||||
title: "推荐",
|
||||
desc: "喂奶推荐"
|
||||
desc: "喂奶推荐",
|
||||
___index:3,
|
||||
}
|
||||
],
|
||||
listWay: [
|
||||
|
@ -483,50 +493,18 @@ export const modelData = [
|
|||
price: "120",
|
||||
title:
|
||||
" 微软 (Microsoft) Xbox 无线控制器/手柄 湛蓝色 | 3.5mm耳机接口蓝牙连接 Xbox主机电脑平板通用",
|
||||
type: "精选"
|
||||
type: "精选",
|
||||
___index:0
|
||||
},
|
||||
{
|
||||
img: "https://i.loli.net/2020/12/05/c9mptI5Pg8qJ6ny.png",
|
||||
title:
|
||||
"宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米",
|
||||
price: "190",
|
||||
type: "精选"
|
||||
type: "精选",
|
||||
___index:0
|
||||
},
|
||||
{
|
||||
img: "https://i.loli.net/2020/12/05/QsSYIPF743Hgf8q.png",
|
||||
title:
|
||||
"宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米",
|
||||
price: "10",
|
||||
type: "精选"
|
||||
},
|
||||
{
|
||||
img: "https://i.loli.net/2020/12/05/VTwDYcLWnukGxat.png",
|
||||
title:
|
||||
"宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米",
|
||||
price: "190",
|
||||
type: "精选"
|
||||
},
|
||||
{
|
||||
img: "https://i.loli.net/2020/12/05/SIFwaVpE4YJAuQf.png",
|
||||
title:
|
||||
"宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米",
|
||||
price: "10",
|
||||
type: "精选"
|
||||
},
|
||||
{
|
||||
img: "https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png",
|
||||
title:
|
||||
"宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米",
|
||||
price: "190",
|
||||
type: "精选"
|
||||
},
|
||||
{
|
||||
img: "https://i.loli.net/2021/05/14/xA5FW2ubiShBdPE.jpg",
|
||||
title:
|
||||
"宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米",
|
||||
price: "10",
|
||||
type: "精选"
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<div class="decorate-view-link" v-if="res.options.list[0].listWay.length != 0">
|
||||
|
||||
<!-- 绑定商品选择器回调已选择的商品 -->
|
||||
<div v-if="title_item.title == bindGoods.type" v-for="(bindGoods,bindGoodsIndex) in res.options.list[0].listWay" :key="bindGoodsIndex">
|
||||
<div v-if="title_item.___index == bindGoods.___index || title_item.title == bindGoods.type" v-for="(bindGoods,bindGoodsIndex) in res.options.list[0].listWay" :key="bindGoodsIndex">
|
||||
{{bindGoods.title}},
|
||||
</div>
|
||||
|
||||
|
@ -183,10 +183,13 @@ export default {
|
|||
if (!val) return false;
|
||||
let data = val.map((item) => {
|
||||
delete item.selected;
|
||||
delete item.intro
|
||||
delete item.mobileIntro
|
||||
return {
|
||||
img: item.thumbnail,
|
||||
title: item.goodsName,
|
||||
type: this.selectedGoods.title,
|
||||
___index:this.selectedGoods.___index,
|
||||
...item
|
||||
};
|
||||
});
|
||||
|
|
|
@ -108,6 +108,12 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
|
||||
enableBindGoodsShow(){
|
||||
|
||||
},
|
||||
|
||||
|
||||
// 初始化数据
|
||||
init() {
|
||||
if (!this.$route.query.id) return false;
|
||||
|
@ -156,6 +162,7 @@ export default {
|
|||
},
|
||||
// 右侧栏回调
|
||||
handleDrawer(val) {
|
||||
|
||||
let newIndex = this.selected;
|
||||
|
||||
this.decorateData = "";
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="goods-list">
|
||||
<div v-if="selected.val == item.type" class="goods-item" v-for="(item, item_index) in res.list[0].listWay" :key="item_index">
|
||||
<div v-if="selected.index == item.___index || selected.val == item.type" class="goods-item" v-for="(item, item_index) in res.list[0].listWay" :key="item_index">
|
||||
<div class="goods-img">
|
||||
<Icon size="20" color="#e1251b" @click="closeGoods(item, item_index)" class="goods-icon" type="ios-close-circle" />
|
||||
<img :src="item.img" alt />
|
||||
|
@ -31,7 +31,6 @@ export default {
|
|||
selected: {
|
||||
// 已选数据
|
||||
index: 0,
|
||||
val: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue