|
@@ -33,9 +33,9 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="parms">
|
|
<view class="parms">
|
|
- <view v-if="show1" @click="handleSelHuxing(index)" class="item "
|
|
|
|
|
|
+ <view v-if="show1" @click="handleSel1('hx',item,index)" class="item "
|
|
:class="[currHouseIndex==index?'act':'']" v-for="(item,index) in houseTypeList">
|
|
:class="[currHouseIndex==index?'act':'']" v-for="(item,index) in houseTypeList">
|
|
- {{item}}
|
|
|
|
|
|
+ {{item.value}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -49,13 +49,13 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="parms">
|
|
<view class="parms">
|
|
- <view v-if="show2" @click="currHouseIndex5=index" class="item "
|
|
|
|
|
|
+ <view v-if="show2" @click="handleSel1('xl',item,index)" class="item "
|
|
:class="[currHouseIndex5==index?'act':'']" v-for="(item,index) in serTypeList">
|
|
:class="[currHouseIndex5==index?'act':'']" v-for="(item,index) in serTypeList">
|
|
- {{item}}
|
|
|
|
|
|
+ {{item.value}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view class="label" style="margin-bottom:32rpx;" @click="toSel">
|
|
|
|
|
|
+ <view class="label" style="margin-bottom:32rpx;" @click="toSel('挑选客厅灯',1)">
|
|
<view class="txt">
|
|
<view class="txt">
|
|
挑选客厅灯
|
|
挑选客厅灯
|
|
</view>
|
|
</view>
|
|
@@ -64,13 +64,13 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="parms3">
|
|
<view class="parms3">
|
|
- <image @click="handleSelKeting(item,i)" class="item3 " :src="picUrl+'/static/other/main_img1.png'"
|
|
|
|
- :class="[currHouseIndex3==i?'act3':'']" v-for="i in 5">
|
|
|
|
|
|
+ <image @click="handleSel('kt',item,index)" class="item3 " :src="picBase+item.cover"
|
|
|
|
+ :class="[selKt.includes(item)?'act3':'']" v-for="(item,index) in brandTypeList">
|
|
|
|
|
|
</image>
|
|
</image>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view class="label" style="margin-bottom:32rpx;">
|
|
|
|
|
|
+ <view class="label" style="margin-bottom:32rpx;" @click="toSel('挑选餐厅灯',2)">
|
|
<view class="txt">
|
|
<view class="txt">
|
|
挑选餐厅灯
|
|
挑选餐厅灯
|
|
</view>
|
|
</view>
|
|
@@ -79,13 +79,13 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="parms3">
|
|
<view class="parms3">
|
|
- <image @click="currHouseIndex2=i" class="item3 " :src="picUrl+'/static/other/main_img1.png'"
|
|
|
|
- :class="[currHouseIndex2==i?'act3':'']" v-for="i in 5">
|
|
|
|
|
|
+ <image @click="handleSel('ct',item,index)" class="item3 " :src="picBase+item.cover"
|
|
|
|
+ :class="[selCt.includes(item)?'act3':'']" v-for="(item,index) in lockTypeList">
|
|
|
|
|
|
</image>
|
|
</image>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view class="label" style="margin-bottom:32rpx;">
|
|
|
|
|
|
+ <view class="label" style="margin-bottom:32rpx;" @click="toSel('挑选卧室灯',3)">
|
|
<view class="txt">
|
|
<view class="txt">
|
|
挑选卧室灯
|
|
挑选卧室灯
|
|
</view>
|
|
</view>
|
|
@@ -94,13 +94,13 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="parms3">
|
|
<view class="parms3">
|
|
- <image @click="currHouseIndex4=i" class="item3 " :src="picUrl+'/static/other/main_img1.png'"
|
|
|
|
- :class="[currHouseIndex4==i?'act3':'']" v-for="i in 5">
|
|
|
|
|
|
+ <image @click="handleSel('ws',item,index)" class="item3 " :src="picBase+item.cover"
|
|
|
|
+ :class="[selWs.includes(item)?'act3':'']" v-for="(item,index) in chuanglianTypeList">
|
|
|
|
|
|
</image>
|
|
</image>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view class="label" style="margin-bottom:32rpx;">
|
|
|
|
|
|
+ <view class="label" style="margin-bottom:32rpx;" @click="toSel('挑选阳台灯',4)">
|
|
<view class="txt">
|
|
<view class="txt">
|
|
挑选阳台灯
|
|
挑选阳台灯
|
|
</view>
|
|
</view>
|
|
@@ -109,8 +109,8 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="parms3">
|
|
<view class="parms3">
|
|
- <image @click="currHouseIndex6=i" class="item3 " :src="picUrl+'/static/other/main_img1.png'"
|
|
|
|
- :class="[currHouseIndex6==i?'act3':'']" v-for="i in 5">
|
|
|
|
|
|
+ <image @click="handleSel('yt',item,index)" class="item3 " :src="picBase+item.cover"
|
|
|
|
+ :class="[selYt.includes(item)?'act3':'']" v-for="(item,index) in pannelTypeList">
|
|
|
|
|
|
</image>
|
|
</image>
|
|
</view>
|
|
</view>
|
|
@@ -128,7 +128,7 @@
|
|
<view class="bot">
|
|
<view class="bot">
|
|
<view class="left" @click="showConfig=true">
|
|
<view class="left" @click="showConfig=true">
|
|
<view class="price">
|
|
<view class="price">
|
|
- ¥2099,9900
|
|
|
|
|
|
+ ¥{{totalPrice.toFixed(2)}}
|
|
</view>
|
|
</view>
|
|
<!-- <image src="/static/index/arrDown.png" mode=""></image> -->
|
|
<!-- <image src="/static/index/arrDown.png" mode=""></image> -->
|
|
<image v-if="!showConfig" src="/static/index/arrDown.png" mode="" @click="showConfig=true"></image>
|
|
<image v-if="!showConfig" src="/static/index/arrDown.png" mode="" @click="showConfig=true"></image>
|
|
@@ -157,7 +157,7 @@
|
|
户型
|
|
户型
|
|
</view>
|
|
</view>
|
|
<view class="info">
|
|
<view class="info">
|
|
- 一室两厅
|
|
|
|
|
|
+ {{selHx.value}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -167,7 +167,7 @@
|
|
系列
|
|
系列
|
|
</view>
|
|
</view>
|
|
<view class="info">
|
|
<view class="info">
|
|
- 3系
|
|
|
|
|
|
+ {{selXl.value}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -177,7 +177,7 @@
|
|
客厅灯
|
|
客厅灯
|
|
</view>
|
|
</view>
|
|
<view class="info">
|
|
<view class="info">
|
|
- 1
|
|
|
|
|
|
+ {{selKt?1:0}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -187,7 +187,7 @@
|
|
餐厅灯
|
|
餐厅灯
|
|
</view>
|
|
</view>
|
|
<view class="info">
|
|
<view class="info">
|
|
- 1
|
|
|
|
|
|
+ {{selCt?1:0}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -197,7 +197,7 @@
|
|
卧室灯
|
|
卧室灯
|
|
</view>
|
|
</view>
|
|
<view class="info">
|
|
<view class="info">
|
|
- 2
|
|
|
|
|
|
+ {{selWs.length}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -207,7 +207,7 @@
|
|
阳台灯
|
|
阳台灯
|
|
</view>
|
|
</view>
|
|
<view class="info">
|
|
<view class="info">
|
|
- 1
|
|
|
|
|
|
+ {{selYt?1:0}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -219,10 +219,10 @@
|
|
<view class="card">
|
|
<view class="card">
|
|
<view class="item">
|
|
<view class="item">
|
|
<view class="left">
|
|
<view class="left">
|
|
- 主灯全套定制
|
|
|
|
|
|
+ {{selHx.extend.title}}
|
|
</view>
|
|
</view>
|
|
<view class="right">
|
|
<view class="right">
|
|
- ¥2781.28
|
|
|
|
|
|
+ ¥{{selHx.extend.money}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -231,14 +231,14 @@
|
|
灯具
|
|
灯具
|
|
</view>
|
|
</view>
|
|
<view class="right">
|
|
<view class="right">
|
|
- 3
|
|
|
|
|
|
+ {{selHx.extend.lampCount}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="tip">
|
|
<view class="tip">
|
|
<image src="/static/index/more.png" mode=""></image>
|
|
<image src="/static/index/more.png" mode=""></image>
|
|
- 这个套餐为一室两厅,包含3盏灯
|
|
|
|
|
|
+ {{selHx.extend.remark}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</u-modal>
|
|
</u-modal>
|
|
@@ -254,7 +254,11 @@
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
getIndexConfigReq,
|
|
getIndexConfigReq,
|
|
|
|
+
|
|
} from '@/api/test/index.js'
|
|
} from '@/api/test/index.js'
|
|
|
|
+ import {
|
|
|
|
+ getDataMoneyReq
|
|
|
|
+ } from '@/api/index/index.js'
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
|
|
|
|
@@ -262,6 +266,7 @@
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
picUrl: this.$picUrl,
|
|
picUrl: this.$picUrl,
|
|
|
|
+ picBase: this.$picBase,
|
|
|
|
|
|
addOrLessIcon1: '/static/index/add.png',
|
|
addOrLessIcon1: '/static/index/add.png',
|
|
addOrLessIcon2: '/static/index/add.png',
|
|
addOrLessIcon2: '/static/index/add.png',
|
|
@@ -291,38 +296,25 @@
|
|
currHouseIndex4: 0,
|
|
currHouseIndex4: 0,
|
|
currHouseIndex5: 0,
|
|
currHouseIndex5: 0,
|
|
currHouseIndex6: 0,
|
|
currHouseIndex6: 0,
|
|
- houseTypeList: [
|
|
|
|
- '一室两厅',
|
|
|
|
- '两室两厅',
|
|
|
|
- '三室两厅'
|
|
|
|
- ],
|
|
|
|
- brandTypeList: [
|
|
|
|
- '品牌1',
|
|
|
|
- '品牌2',
|
|
|
|
- ],
|
|
|
|
- lockTypeList: [
|
|
|
|
- '全屋',
|
|
|
|
- '客餐厅',
|
|
|
|
- '主卧室',
|
|
|
|
- ],
|
|
|
|
- pannelTypeList: [
|
|
|
|
- '3系',
|
|
|
|
- '5系',
|
|
|
|
- ],
|
|
|
|
- chuanglianTypeList: [
|
|
|
|
- '标准版',
|
|
|
|
- '智能版',
|
|
|
|
- ],
|
|
|
|
- ktTypeList: [
|
|
|
|
- '筒灯',
|
|
|
|
- '射灯',
|
|
|
|
- '线性灯',
|
|
|
|
- '磁吸轨道灯',
|
|
|
|
- ],
|
|
|
|
|
|
+ houseTypeList: [],
|
|
|
|
+ brandTypeList: [],
|
|
|
|
+ lockTypeList: [],
|
|
|
|
+ pannelTypeList: [],
|
|
|
|
+ chuanglianTypeList: [],
|
|
serTypeList: [
|
|
serTypeList: [
|
|
- '3系',
|
|
|
|
- '5系',
|
|
|
|
|
|
+
|
|
],
|
|
],
|
|
|
|
+ rule: null,
|
|
|
|
+
|
|
|
|
+ selHx: null,
|
|
|
|
+ selXl: null,
|
|
|
|
+ selKt: [],
|
|
|
|
+ selCt: [],
|
|
|
|
+ selWs: [],
|
|
|
|
+ selYt: [],
|
|
|
|
+ totalPrice: 0,
|
|
|
|
+
|
|
|
|
+ pConfig: -1
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async onLoad(o) {
|
|
async onLoad(o) {
|
|
@@ -331,20 +323,45 @@
|
|
})
|
|
})
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
console.log('获取首页配置返回值-主灯: ', res);
|
|
console.log('获取首页配置返回值-主灯: ', res);
|
|
- // this.houseTypeList = res.data.house_type
|
|
|
|
- // this.brandTypeList = res.data.brand
|
|
|
|
- // this.lockTypeList = res.data.space
|
|
|
|
- // this.serTypeList = res.data.series
|
|
|
|
- // this.chuanglianTypeList = res.data.version
|
|
|
|
-
|
|
|
|
- // this.selHx = res.data.house_type[0]
|
|
|
|
- // this.selKj = res.data.space[0]
|
|
|
|
- // this.selPp = res.data.brand[0]
|
|
|
|
- // this.selXl = res.data.series[0]
|
|
|
|
- // this.selBb = res.data.version[0]
|
|
|
|
|
|
+ this.houseTypeList = res.data.house_type
|
|
|
|
+ this.brandTypeList = res.data.living_room
|
|
|
|
+ this.lockTypeList = res.data.dining_room_light
|
|
|
|
+ this.serTypeList = res.data.series
|
|
|
|
+ this.chuanglianTypeList = res.data.bedroom_lamp
|
|
|
|
+ this.pannelTypeList = res.data.balcony_light
|
|
|
|
+
|
|
// this.rule = res.data.rule.content
|
|
// this.rule = res.data.rule.content
|
|
|
|
|
|
- // this.getPrice(1, this.selHx.id, this.selKj.id, this.selPp.id, this.selXl.id, this.selBb.id)
|
|
|
|
|
|
+ this.selHx = res.data.house_type[0]
|
|
|
|
+ this.selXl = res.data.series[0]
|
|
|
|
+ this.selKt = [res.data.living_room[0]]
|
|
|
|
+ this.selCt = [res.data.dining_room_light[0]]
|
|
|
|
+ this.selWs = [res.data.bedroom_lamp[0]]
|
|
|
|
+ this.selYt = [res.data.balcony_light[0]]
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ let wsIds1 = []
|
|
|
|
+ this.selKt.forEach((item, index) => {
|
|
|
|
+ wsIds1.push(item.id)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ let wsIds2 = []
|
|
|
|
+ this.selCt.forEach((item, index) => {
|
|
|
|
+ wsIds2.push(item.id)
|
|
|
|
+ })
|
|
|
|
+ let wsIds3 = []
|
|
|
|
+ this.selWs.forEach((item, index) => {
|
|
|
|
+ wsIds3.push(item.id)
|
|
|
|
+ })
|
|
|
|
+ let wsIds4 = []
|
|
|
|
+ this.selYt.forEach((item, index) => {
|
|
|
|
+ wsIds4.push(item.id)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ this.getPrice(2, this.selHx.id, this.selXl.id, wsIds1.sort().join(','), wsIds2.sort().join(','), wsIds3
|
|
|
|
+ .sort().join(','),
|
|
|
|
+ wsIds4.sort().join(','))
|
|
|
|
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -354,15 +371,69 @@
|
|
}
|
|
}
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+ onShow() {
|
|
|
|
+ console.log('确定选择的那一项', getApp().chooseItem_kt);
|
|
|
|
+ if (getApp().chooseItem_kt) {
|
|
|
|
+ let index = getApp().index_kt
|
|
|
|
+ let item = getApp().chooseItem_kt
|
|
|
|
+ let type = ''
|
|
|
|
+ if (getApp().chooseType == '挑选客厅灯') {
|
|
|
|
+ type = 'kt'
|
|
|
|
+ } else if (getApp().chooseType == '挑选餐厅灯') {
|
|
|
|
+ type = 'ct'
|
|
|
|
+ } else if (getApp().chooseType == '挑选卧室灯') {
|
|
|
|
+ type = 'ws'
|
|
|
|
+ } else {
|
|
|
|
+ type = 'yt'
|
|
|
|
+ }
|
|
|
|
+ this.handleSel(type, item, index, 2)
|
|
|
|
+ getApp().chooseItem_kt = null
|
|
|
|
+ getApp().index_kt = null
|
|
|
|
+ getApp().chooseType = null
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
|
|
+ async getPrice(type = 2, house_type, series, drawing_lamp, canteen_lamp, bedroom_lamp, balcony_lamp) {
|
|
|
|
+ let res = await getDataMoneyReq({
|
|
|
|
+ type,
|
|
|
|
+ house_type,
|
|
|
|
+ series,
|
|
|
|
+ drawing_lamp,
|
|
|
|
+ canteen_lamp,
|
|
|
|
+ bedroom_lamp,
|
|
|
|
+ balcony_lamp
|
|
|
|
+ })
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+ console.log('配置价格-主灯: ', res)
|
|
|
|
+ this.totalPrice = res.data.money
|
|
|
|
+ this.pConfig = res.data.id
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res.message,
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
goRule() {
|
|
goRule() {
|
|
|
|
+ getApp().content = this.rule
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: '/pages/index/rule/index?type=main'
|
|
url: '/pages/index/rule/index?type=main'
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- toSel() {
|
|
|
|
|
|
+ toSel(name, type) {
|
|
|
|
+ if (type == 1) {
|
|
|
|
+ getApp().typeList = this.brandTypeList
|
|
|
|
+ } else if (type == 2) {
|
|
|
|
+ getApp().typeList = this.lockTypeList
|
|
|
|
+ } else if (type == 3) {
|
|
|
|
+ getApp().typeList = this.chuanglianTypeList
|
|
|
|
+ } else {
|
|
|
|
+ getApp().typeList = this.pannelTypeList
|
|
|
|
+ }
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: '/pages/index/mainList/index'
|
|
|
|
|
|
+ url: '/pages/index/mainList/index?name=' + name
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handleOpenOrClose(i) {
|
|
handleOpenOrClose(i) {
|
|
@@ -374,24 +445,137 @@
|
|
this['show' + i] = true
|
|
this['show' + i] = true
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- handleSelHuxing(index) {
|
|
|
|
- this.currHouseIndex = index
|
|
|
|
- this.showHuxing = true
|
|
|
|
|
|
+ handleSel1(type, item, index) {
|
|
|
|
+ if (type == 'hx') {
|
|
|
|
+ this.currHouseIndex = index
|
|
|
|
+ this.selHx = item
|
|
|
|
+ } else {
|
|
|
|
+ this.currHouseIndex5 = index
|
|
|
|
+ this.selXl = item
|
|
|
|
+ }
|
|
|
|
+ let wsIds1 = []
|
|
|
|
+ this.selKt.forEach((item, index) => {
|
|
|
|
+ wsIds1.push(item.id)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ let wsIds2 = []
|
|
|
|
+ this.selCt.forEach((item, index) => {
|
|
|
|
+ wsIds2.push(item.id)
|
|
|
|
+ })
|
|
|
|
+ let wsIds3 = []
|
|
|
|
+ this.selWs.forEach((item, index) => {
|
|
|
|
+ wsIds3.push(item.id)
|
|
|
|
+ })
|
|
|
|
+ let wsIds4 = []
|
|
|
|
+ this.selYt.forEach((item, index) => {
|
|
|
|
+ wsIds4.push(item.id)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ this.getPrice(2, this.selHx.id, this.selXl.id, wsIds1.sort().join(','), wsIds2.sort().join(','), wsIds3
|
|
|
|
+ .sort().join(','),
|
|
|
|
+ wsIds4.sort().join(','))
|
|
},
|
|
},
|
|
- handleSelKeting(item, index) {
|
|
|
|
- item = '1'
|
|
|
|
- this.currHouseIndex3 = index
|
|
|
|
- this.seledKetingItem = item
|
|
|
|
|
|
+ handleSel(type, item, index, mode = 1) {
|
|
|
|
+ if (type == 'kt') {
|
|
|
|
+ this.currHouseIndex3 = index
|
|
|
|
+ if (!this.selKt.includes(item)) {
|
|
|
|
+ this.selKt.push(item)
|
|
|
|
+ } else {
|
|
|
|
+ if (mode == 1) {
|
|
|
|
+ let i = this.selKt.findIndex((item1, index1) => {
|
|
|
|
+ return item1 == item
|
|
|
|
+ })
|
|
|
|
+ this.selKt.splice(i, 1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else if (type == 'ct') {
|
|
|
|
+ this.currHouseIndex2 = index
|
|
|
|
+ if (!this.selCt.includes(item)) {
|
|
|
|
+ this.selCt.push(item)
|
|
|
|
+ } else {
|
|
|
|
+ if (mode == 1) {
|
|
|
|
+ let i = this.selCt.findIndex((item1, index1) => {
|
|
|
|
+ return item1 == item
|
|
|
|
+ })
|
|
|
|
+ this.selCt.splice(i, 1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else if (type == 'ws') {
|
|
|
|
+ this.currHouseIndex4 = index
|
|
|
|
+ if (!this.selWs.includes(item)) {
|
|
|
|
+ this.selWs.push(item)
|
|
|
|
+ } else {
|
|
|
|
+ if (mode == 1) {
|
|
|
|
+ let i = this.selWs.findIndex((item1, index1) => {
|
|
|
|
+ return item1 == item
|
|
|
|
+ })
|
|
|
|
+ this.selWs.splice(i, 1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else if (type == 'yt') {
|
|
|
|
+ this.currHouseIndex6 = index
|
|
|
|
+ if (!this.selYt.includes(item)) {
|
|
|
|
+ this.selYt.push(item)
|
|
|
|
+ } else {
|
|
|
|
+ if (mode == 1) {
|
|
|
|
+ let i = this.selYt.findIndex((item1, index1) => {
|
|
|
|
+ return item1 == item
|
|
|
|
+ })
|
|
|
|
+ this.selYt.splice(i, 1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ let wsIds1 = []
|
|
|
|
+ this.selKt.forEach((item, index) => {
|
|
|
|
+ wsIds1.push(item.id)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ let wsIds2 = []
|
|
|
|
+ this.selCt.forEach((item, index) => {
|
|
|
|
+ wsIds2.push(item.id)
|
|
|
|
+ })
|
|
|
|
+ let wsIds3 = []
|
|
|
|
+ this.selWs.forEach((item, index) => {
|
|
|
|
+ wsIds3.push(item.id)
|
|
|
|
+ })
|
|
|
|
+ let wsIds4 = []
|
|
|
|
+ this.selYt.forEach((item, index) => {
|
|
|
|
+ wsIds4.push(item.id)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ this.getPrice(2, this.selHx.id, this.selXl.id, wsIds1.sort().join(','), wsIds2.sort().join(','), wsIds3
|
|
|
|
+ .sort().join(','),
|
|
|
|
+ wsIds4.sort().join(','))
|
|
},
|
|
},
|
|
previewConfig() {
|
|
previewConfig() {
|
|
- if (!this.seledKetingItem) {
|
|
|
|
|
|
+ if (!this.selKt) {
|
|
this.showMissItem = true
|
|
this.showMissItem = true
|
|
return
|
|
return
|
|
- } else {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/index/customMian/index'
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
|
|
+ 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
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ getApp().mainPreviewInfo = {
|
|
|
|
+ hx: this.selHx,
|
|
|
|
+ xl: this.selXl,
|
|
|
|
+ kt: this.selKt,
|
|
|
|
+ ct: this.selCt,
|
|
|
|
+ ws: this.selWs,
|
|
|
|
+ yt: this.selYt,
|
|
|
|
+ price: this.totalPrice
|
|
|
|
+ }
|
|
|
|
+ getApp().pConfig = this.pConfig
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/index/customMian/index'
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|