Commit cdf6d6b5 authored by youjie's avatar youjie

余位

parent e310b675
...@@ -48,11 +48,11 @@ ...@@ -48,11 +48,11 @@
? 'not-festival' ? 'not-festival'
: '', : '',
(priceStauts.length > 0 && (priceStauts.length > 0 &&
priceStauts[line][index] < 0 && priceStauts[line][index].price < 0 &&
start.length > 0 && start.length > 0 &&
end.length > 0) || end.length > 0) ||
(priceStauts.length > 0 && (priceStauts.length > 0 &&
priceStauts[line][index] < 0 && priceStauts[line][index].price < 0 &&
start.length == 0 && start.length == 0 &&
end.length == 0) end.length == 0)
? 'not-sub' ? 'not-sub'
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
priceStauts.length > 0 && priceStauts.length > 0 &&
end.length == 0 && end.length == 0 &&
start.length > 0 && start.length > 0 &&
priceStauts[line][index] < 0 && priceStauts[line][index].price < 0 &&
line + index * 2 != lastNot[0] + lastNot[1] * 2 line + index * 2 != lastNot[0] + lastNot[1] * 2
? 'not-sub' ? 'not-sub'
: '', : '',
...@@ -72,16 +72,22 @@ ...@@ -72,16 +72,22 @@
line == end[0] && index == end[1] ? '#111' : '', line == end[0] && index == end[1] ? '#111' : '',
color: line == end[0] && index == end[1] ? '#FFFFFF' : '', color: line == end[0] && index == end[1] ? '#FFFFFF' : '',
}"> }">
<view style="padding-top: 2px; padding-bottom: 2px">{{ <view style="padding-top: 2px; padding-bottom: 2px;color:#FF3166"
item :style="{'opacity':priceStauts.length>0&&priceStauts[line][index].price>0?'1':'0'}">
}}</view> <!-- {{item}} -->
{{ priceStauts.length>0&&priceStauts[line][index].price>0?'¥'+priceStauts[line][index].price:'-' }}
</view>
<!-- <view class="select-style" v-if="line == start[0] && index == start[1]">最早</view> <!-- <view class="select-style" v-if="line == start[0] && index == start[1]">最早</view>
<view class="select-style" v-if="line == end[0] && index == end[1]">最晚</view> --> <view class="select-style" v-if="line == end[0] && index == end[1]">最晚</view> -->
<view style="font-size: 12px; padding-bottom: 3px" v-if="priceStauts.length > 0"> <view style="font-size: 12px; padding-bottom: 3px">
<view v-if="priceStauts[line][index] > 0" style="color:#FF3166"> <view style="">
{{ priceStauts[line][index] }}</view> <view>
<view v-if="priceStauts[line][index] == -1">售罄</view> {{item}}
<view v-if="priceStauts[line][index] == -2">候补</view> </view>
<view style="color:#FF3166" :style="{'opacity':priceStauts[line][index].remainNum>0?'1':'0'}">余:{{ priceStauts[line][index].remainNum }}</view>
</view>
<view v-if="priceStauts[line][index].price == -1">售罄</view>
<view v-if="priceStauts[line][index].price == -2">候补</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -254,7 +260,7 @@ ...@@ -254,7 +260,7 @@
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
query.selectAll('.select-style').boundingClientRect((rects) => { query.selectAll('.select-style').boundingClientRect((rects) => {
const top = rects[0].top-(that.scrollHeight) - 20 const top = rects[0].top-(that.scrollHeight) - 100
that.scrollTop = top>0?top:0 that.scrollTop = top>0?top:0
}).exec(); }).exec();
}, },
...@@ -277,18 +283,33 @@ ...@@ -277,18 +283,33 @@
isexsit = true isexsit = true
if (price.remainNum > 0){ if (price.remainNum > 0){
// #ifdef MP-DI // #ifdef MP-DI
days.push(price.b2CPrice) days.push({
price: price.b2CPrice,
remainNum: price.remainNum?price.remainNum:0,
})
// #endif // #endif
// #ifdef MP-AG // #ifdef MP-AG
days.push(price.b2BPrice) days.push({
price: price.b2BPrice,
remainNum: price.remainNum?price.remainNum:0,
})
// #endif // #endif
} }
else if (price.isSubstitution == 1) else if (price.isSubstitution == 1)
days.push(-2) days.push({
price: -2,
remainNum: 0,
})
else else
days.push(-1) days.push({
price: -1,
remainNum: 0,
})
} else { } else {
days.push(0); days.push({
price: 0,
remainNum: 0,
});
} }
} }
...@@ -386,12 +407,12 @@ ...@@ -386,12 +407,12 @@
//选择入住离开 //选择入住离开
selectDay(line, index) { selectDay(line, index) {
if (this.priceStauts[line][index] == 0) { if (this.priceStauts[line][index].price == 0) {
uni.showToast({ uni.showToast({
title: "抱歉,此日期没有行程哦", title: "抱歉,此日期没有行程哦",
icon: "none", icon: "none",
}); });
} else if (this.priceStauts[line][index] == -1) { } else if (this.priceStauts[line][index].price == -1) {
uni.showToast({ uni.showToast({
title: "改团期已售罄", title: "改团期已售罄",
icon: "none", icon: "none",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment