| xqd
@@ -58,7 +58,6 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="label" style="margin-bottom:32rpx;" @click="toSel('挑选客厅灯',1)">
|
|
|
- <!-- <view class="label" style="margin-bottom:32rpx;" @click="toKtDetail('挑选客厅灯',1)"> -->
|
|
|
<view class="txt">
|
|
|
挑选客厅灯
|
|
|
</view>
|
| xqd
@@ -67,12 +66,12 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="parms3">
|
|
|
- <!-- <image @click="handleSel('kt',item,index)" class="item3 " :src="picBase+item.cover"
|
|
|
- :class="[selKt.includes(item)?'act3':'']" v-for="(item,index) in brandTypeList"> -->
|
|
|
-
|
|
|
- <image @click="goDetail(item,index,'挑选客厅灯')" class="item3 " :src="picBase+item.cover"
|
|
|
+ <!-- <image @click="goDetail(item,index,'挑选客厅灯')" class="item3 " :src="picBase+item.cover"
|
|
|
:class="[selKt.includes(item)?'act3':'']" v-for="(item,index) in brandTypeList.slice(0,4)">
|
|
|
+ </image> -->
|
|
|
|
|
|
+ <image @click="goDetail(item,index,'挑选客厅灯')" class="item3 " :src="picBase+item.cover"
|
|
|
+ :class="[selKtIndex==index?'act3':'']" v-for="(item,index) in brandTypeList.slice(0,4)">
|
|
|
</image>
|
|
|
</view>
|
|
|
|
| xqd
@@ -85,11 +84,12 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="parms3">
|
|
|
- <!-- <image @click="handleSel('ct',item,index)" class="item3 " :src="picBase+item.cover"
|
|
|
- :class="[selCt.includes(item)?'act3':'']" v-for="(item,index) in lockTypeList">
|
|
|
+ <!-- <image @click="goDetail(item,index,'挑选餐厅灯')" class="item3 " :src="picBase+item.cover"
|
|
|
+ :class="[selCt.includes(item)?'act3':'']" v-for="(item,index) in lockTypeList.slice(0,4)">
|
|
|
</image> -->
|
|
|
+
|
|
|
<image @click="goDetail(item,index,'挑选餐厅灯')" class="item3 " :src="picBase+item.cover"
|
|
|
- :class="[selCt.includes(item)?'act3':'']" v-for="(item,index) in lockTypeList.slice(0,4)">
|
|
|
+ :class="[selCtIndex==index?'act3':'']" v-for="(item,index) in lockTypeList.slice(0,4)">
|
|
|
</image>
|
|
|
</view>
|
|
|
|
| xqd
@@ -102,11 +102,13 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="parms3">
|
|
|
- <!-- <image @click="handleSel('ws',item,index)" class="item3 " :src="picBase+item.cover"
|
|
|
- :class="[selWs.includes(item)?'act3':'']" v-for="(item,index) in chuanglianTypeList">
|
|
|
+ <!-- <image @click="goDetail(item,index,'挑选卧室灯')" class="item3 " :src="picBase+item.cover"
|
|
|
+ :class="[selWs.includes(item)?'act3':'']" v-for="(item,index) in chuanglianTypeList.slice(0,4)">
|
|
|
</image> -->
|
|
|
+
|
|
|
<image @click="goDetail(item,index,'挑选卧室灯')" class="item3 " :src="picBase+item.cover"
|
|
|
- :class="[selWs.includes(item)?'act3':'']" v-for="(item,index) in chuanglianTypeList.slice(0,4)">
|
|
|
+ v-for="(item,index) in chuanglianTypeList.slice(0,4)"
|
|
|
+ :class="[selWsIndex.indexOf(index)!=-1?'act3':'']">
|
|
|
</image>
|
|
|
</view>
|
|
|
|
| xqd
@@ -119,12 +121,12 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="parms3">
|
|
|
- <!-- <image @click="handleSel('yt',item,index)" class="item3 " :src="picBase+item.cover"
|
|
|
- :class="[selYt.includes(item)?'act3':'']" v-for="(item,index) in pannelTypeList">
|
|
|
+ <!-- <image @click="goDetail(item,index,'挑选阳台灯')" class="item3 " :src="picBase+item.cover"
|
|
|
+ :class="[selYt.includes(item)?'act3':'']" v-for="(item,index) in pannelTypeList.slice(0,4)">
|
|
|
</image> -->
|
|
|
|
|
|
<image @click="goDetail(item,index,'挑选阳台灯')" class="item3 " :src="picBase+item.cover"
|
|
|
- :class="[selYt.includes(item)?'act3':'']" v-for="(item,index) in pannelTypeList.slice(0,4)">
|
|
|
+ :class="[selYtIndex==index?'act3':'']" v-for="(item,index) in pannelTypeList.slice(0,4)">
|
|
|
</image>
|
|
|
</view>
|
|
|
|
| xqd
@@ -313,6 +315,13 @@
|
|
|
selCt: [],
|
|
|
selWs: [],
|
|
|
selYt: [],
|
|
|
+
|
|
|
+ selKtIndex: -1,
|
|
|
+ selCtIndex: -1,
|
|
|
+ selWsIndex: [],
|
|
|
+ selYtIndex: -1,
|
|
|
+
|
|
|
+
|
|
|
totalPrice: 0,
|
|
|
|
|
|
pConfig: -1,
|
| xqd
@@ -371,8 +380,10 @@
|
|
|
onShow() {
|
|
|
this.cutdownRatio = this.$getCutDown()
|
|
|
console.log('哪种折扣价格', this.cutdownRatio);
|
|
|
- console.log('确定选择的那一项', getApp().chooseItem_kt);
|
|
|
+ console.log('确定选择的那一项', getApp().chooseItem_kt, getApp().index_kt, getApp().chooseType);
|
|
|
if (getApp().chooseItem_kt) {
|
|
|
+
|
|
|
+ console.log('121112122-------------');
|
|
|
let index = getApp().index_kt
|
|
|
let item = getApp().chooseItem_kt
|
|
|
let type = ''
|
| xqd
@@ -385,10 +396,12 @@
|
|
|
} else {
|
|
|
type = 'yt'
|
|
|
}
|
|
|
+
|
|
|
+ this.handleSel(type, item, index, 2)
|
|
|
+
|
|
|
getApp().chooseItem_kt = null
|
|
|
getApp().index_kt = null
|
|
|
getApp().chooseType = null
|
|
|
- this.handleSel(type, item, index, 2)
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
| xqd
@@ -407,14 +420,32 @@
|
|
|
}
|
|
|
|
|
|
if (name == '挑选卧室灯') {
|
|
|
- if (this.selHx.value == '一室两厅' && this.selWs.length == 1) {
|
|
|
- this.showHuxing = true
|
|
|
+ // if (this.selHx.value == '一室一厅' && this.selWs.length == 1) {
|
|
|
+ // this.showHuxing = true
|
|
|
+ // return
|
|
|
+ // } else if (this.selHx.value == '两室两厅' && this.selWs.length == 2) {
|
|
|
+ // this.showHuxing = true
|
|
|
+ // return
|
|
|
+ // } else if (this.selHx.value == '三室两厅' && this.selWs.length == 3) {
|
|
|
+ // this.showHuxing = true
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+
|
|
|
+ if (this.selHx.value == '一室一厅' && this.selWs.length == 1) {
|
|
|
+ // this.showHuxing = true
|
|
|
+
|
|
|
+ this.showMissItem = true
|
|
|
+ this.tipTxt = '一室一厅户型应该选择1盏卧室灯!'
|
|
|
return
|
|
|
} else if (this.selHx.value == '两室两厅' && this.selWs.length == 2) {
|
|
|
- this.showHuxing = true
|
|
|
+ // this.showHuxing = true
|
|
|
+ this.showMissItem = true
|
|
|
+ this.tipTxt = '两室两厅户型应该选择2盏卧室灯!'
|
|
|
return
|
|
|
} else if (this.selHx.value == '三室两厅' && this.selWs.length == 3) {
|
|
|
- this.showHuxing = true
|
|
|
+ // this.showHuxing = true
|
|
|
+ this.showMissItem = true
|
|
|
+ this.tipTxt = '三室两厅户型应该选择3盏卧室灯!'
|
|
|
return
|
|
|
}
|
|
|
}
|
| xqd
@@ -464,14 +495,31 @@
|
|
|
return this.$toast('请选择系列')
|
|
|
}
|
|
|
if (type == 3) {
|
|
|
- if (this.selHx.value == '一室两厅' && this.selWs.length == 1) {
|
|
|
- this.showHuxing = true
|
|
|
+ // if (this.selHx.value == '一室两厅' && this.selWs.length == 1) {
|
|
|
+ // this.showHuxing = true
|
|
|
+ // return
|
|
|
+ // } else if (this.selHx.value == '两室两厅' && this.selWs.length == 2) {
|
|
|
+ // this.showHuxing = true
|
|
|
+ // return
|
|
|
+ // } else if (this.selHx.value == '三室两厅' && this.selWs.length == 3) {
|
|
|
+ // this.showHuxing = true
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ if (this.selHx.value == '一室一厅' && this.selWs.length == 1) {
|
|
|
+ // this.showHuxing = true
|
|
|
+
|
|
|
+ this.showMissItem = true
|
|
|
+ this.tipTxt = '一室一厅户型应该选择1盏卧室灯!'
|
|
|
return
|
|
|
} else if (this.selHx.value == '两室两厅' && this.selWs.length == 2) {
|
|
|
- this.showHuxing = true
|
|
|
+ // this.showHuxing = true
|
|
|
+ this.showMissItem = true
|
|
|
+ this.tipTxt = '两室两厅户型应该选择2盏卧室灯!'
|
|
|
return
|
|
|
} else if (this.selHx.value == '三室两厅' && this.selWs.length == 3) {
|
|
|
- this.showHuxing = true
|
|
|
+ // this.showHuxing = true
|
|
|
+ this.showMissItem = true
|
|
|
+ this.tipTxt = '三室两厅户型应该选择3盏卧室灯!'
|
|
|
return
|
|
|
}
|
|
|
}
|
| xqd
@@ -509,6 +557,8 @@
|
|
|
this.currHouseIndex1 = index
|
|
|
this.selHx = item
|
|
|
|
|
|
+ console.log('selHx---------------', this.selHx);
|
|
|
+
|
|
|
let p = {
|
|
|
type: this.type ? this.type : 2,
|
|
|
house_type: this.selHx.id
|
| xqd
@@ -519,6 +569,16 @@
|
|
|
if (res.code == 0) {
|
|
|
console.log('新户型返回值', res);
|
|
|
this.serTypeList = res.data.series
|
|
|
+
|
|
|
+ this.selKt = []
|
|
|
+ this.selCt = []
|
|
|
+ this.selWs = []
|
|
|
+ this.selYt = []
|
|
|
+
|
|
|
+ this.selKtIndex = -1
|
|
|
+ this.selCtIndex = -1
|
|
|
+ this.selWsIndex = []
|
|
|
+ this.selYtIndex = -1
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.message,
|
| xqd
@@ -576,6 +636,8 @@
|
|
|
if (type == 'kt') {
|
|
|
// 只能单选
|
|
|
this.selKt = [item]
|
|
|
+ this.selKtIndex = index
|
|
|
+
|
|
|
|
|
|
// 支持对选与取消当前选择
|
|
|
// if (!this.selKt.includes(item)) {
|
| xqd
@@ -591,6 +653,7 @@
|
|
|
|
|
|
} else if (type == 'ct') {
|
|
|
this.selCt = [item]
|
|
|
+ this.selCtIndex = index
|
|
|
|
|
|
// if (!this.selCt.includes(item)) {
|
|
|
// this.selCt.push(item)
|
| xqd
@@ -605,19 +668,21 @@
|
|
|
} else if (type == 'ws') {
|
|
|
// this.selWs = [item]
|
|
|
|
|
|
- if (!this.selWs.includes(item)) {
|
|
|
+ if (!this.selWsIndex.includes(index)) {
|
|
|
this.selWs.push(item)
|
|
|
+ this.selWsIndex.push(index)
|
|
|
} else {
|
|
|
if (mode == 1) {
|
|
|
let i = this.selWs.findIndex((item1, index1) => {
|
|
|
return item1 == item
|
|
|
})
|
|
|
this.selWs.splice(i, 1)
|
|
|
+ this.selWsIndex.splice(i, 1)
|
|
|
}
|
|
|
}
|
|
|
} else if (type == 'yt') {
|
|
|
this.selYt = [item]
|
|
|
-
|
|
|
+ this.selYtIndex = index
|
|
|
// if (!this.selYt.includes(item)) {
|
|
|
// this.selYt.push(item)
|
|
|
// } else {
|
| xqd
@@ -629,6 +694,11 @@
|
|
|
// }
|
|
|
// }
|
|
|
}
|
|
|
+
|
|
|
+ console.log('kt-----', this.selKt);
|
|
|
+ console.log('ct-----', this.selCt);
|
|
|
+ console.log('ws-----', this.selWs);
|
|
|
+ console.log('yt-----', this.selYt);
|
|
|
let wsIds1 = []
|
|
|
this.selKt.forEach((item, index) => {
|
|
|
wsIds1.push(item.id)
|
| xqd
@@ -685,14 +755,23 @@
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if (this.selHx.value == '一室两厅' && this.selWs.length != 1) {
|
|
|
- this.showHuxing = true
|
|
|
+ console.log('fffffffffffffffffffff', this.selHx.value, this.selWs.length);
|
|
|
+
|
|
|
+ if (this.selHx.value == '一室一厅' && this.selWs.length != 1) {
|
|
|
+ // this.showHuxing = true
|
|
|
+
|
|
|
+ this.showMissItem = true
|
|
|
+ this.tipTxt = '一室一厅户型应该选择1盏卧室灯!'
|
|
|
return
|
|
|
} else if (this.selHx.value == '两室两厅' && this.selWs.length != 2) {
|
|
|
- this.showHuxing = true
|
|
|
+ // this.showHuxing = true
|
|
|
+ this.showMissItem = true
|
|
|
+ this.tipTxt = '两室两厅户型应该选择2盏卧室灯!'
|
|
|
return
|
|
|
} else if (this.selHx.value == '三室两厅' && this.selWs.length != 3) {
|
|
|
- this.showHuxing = true
|
|
|
+ // this.showHuxing = true
|
|
|
+ this.showMissItem = true
|
|
|
+ this.tipTxt = '三室两厅户型应该选择3盏卧室灯!'
|
|
|
return
|
|
|
}
|
|
|
if (this.selYt.length == 0) {
|