|
@@ -315,7 +315,7 @@
|
|
totalPrice: 0,
|
|
totalPrice: 0,
|
|
|
|
|
|
pConfig: -1,
|
|
pConfig: -1,
|
|
- cutdownType: 1
|
|
|
|
|
|
+ cutdownRatio: 1
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async onLoad(o) {
|
|
async onLoad(o) {
|
|
@@ -373,14 +373,8 @@
|
|
|
|
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- if (uni.getStorageSync('switchs')[0]) {
|
|
|
|
- this.cutdownType = 1
|
|
|
|
- } else if (uni.getStorageSync('switchs')[1]) {
|
|
|
|
- this.cutdownType = uni.getStorageSync('priceConfig').member_price
|
|
|
|
- } else if (uni.getStorageSync('switchs')[2]) {
|
|
|
|
- this.cutdownType = uni.getStorageSync('priceConfig').vip_price
|
|
|
|
- }
|
|
|
|
- console.log('那种价格', this.cutdownType);
|
|
|
|
|
|
+ this.cutdownRatio = this.$getCutDown()
|
|
|
|
+ console.log('哪种折扣价格', this.cutdownRatio);
|
|
console.log('确定选择的那一项', getApp().chooseItem_kt);
|
|
console.log('确定选择的那一项', getApp().chooseItem_kt);
|
|
if (getApp().chooseItem_kt) {
|
|
if (getApp().chooseItem_kt) {
|
|
let index = getApp().index_kt
|
|
let index = getApp().index_kt
|
|
@@ -401,15 +395,6 @@
|
|
getApp().chooseType = null
|
|
getApp().chooseType = null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // computed: {
|
|
|
|
- // cutdownType() {
|
|
|
|
- // uni.getStorageSync('switchs').forEach((item, index) => {
|
|
|
|
- // if (item) {
|
|
|
|
- // return index
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
methods: {
|
|
methods: {
|
|
async getPrice(type = 2, house_type, series, drawing_lamp, canteen_lamp, bedroom_lamp, balcony_lamp) {
|
|
async getPrice(type = 2, house_type, series, drawing_lamp, canteen_lamp, bedroom_lamp, balcony_lamp) {
|
|
let res = await getDataMoneyReq({
|
|
let res = await getDataMoneyReq({
|
|
@@ -423,7 +408,7 @@
|
|
})
|
|
})
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
console.log('配置价格-主灯: ', res)
|
|
console.log('配置价格-主灯: ', res)
|
|
- this.totalPrice = res.data.money
|
|
|
|
|
|
+ this.totalPrice = res.data.money * this.cutdownRatio
|
|
this.pConfig = res.data.id
|
|
this.pConfig = res.data.id
|
|
|
|
|
|
} else {
|
|
} else {
|