Browse Source

修改景点价格和隐藏电影板块

master
shaojing 2 years ago
parent
commit
06468f03a0
  1. 8
      pages/index/index.wxml
  2. 4
      pages/list/activitynew/index.wxml
  3. 4
      pages/order/components/date/index.js
  4. 47
      pages/order/scene/index.js
  5. 4
      pages/order/scene/index.wxml

8
pages/index/index.wxml

@ -291,13 +291,13 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb10.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb10.png" mode="widthFix"></image>
<view>廉洁地图</view> <view>廉洁地图</view>
</view> --> </view> -->
<view bindtap="gotoPath" data-event="book_click" data-title="苏影通" data-path="/pages/list/movieticket/index" <!-- <view bindtap="gotoPath" data-event="book_click" data-title="苏影通" data-path="/pages/list/movieticket/index"
class="pbservice-item"> class="pbservice-item"> -->
<!-- <image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/syt.png" mode="widthFix"></image> <!-- <image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/syt.png" mode="widthFix"></image>
<view>苏影通</view> --> <view>苏影通</view> -->
<!-- 元旦修改 --> <!-- 元旦修改 -->
<image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/yuandan2024/syt.png" mode="widthFix"></image> <!-- <image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/yuandan2024/syt.png" mode="widthFix"></image>
</view> </view> -->
<!-- <view bindtap="gotoPath" data-event="book_click" data-title="文化配送" data-path="/pages/culture/index" <!-- <view bindtap="gotoPath" data-event="book_click" data-title="文化配送" data-path="/pages/culture/index"
class="pbservice-item"> class="pbservice-item">

4
pages/list/activitynew/index.wxml

@ -31,10 +31,10 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon2{{type==2?'_active':''}}.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon2{{type==2?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==2?'color:#C155E9':''}}">展览</view> <view style="{{type==2?'color:#C155E9':''}}">展览</view>
</view> </view>
<view class="type-item" bindtap="changeType" data-type="4"> <!-- <view class="type-item" bindtap="changeType" data-type="4">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon4{{type==4?'_active':''}}.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon4{{type==4?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==4?'color:#63B71F':''}}">电影</view> <view style="{{type==4?'color:#63B71F':''}}">电影</view>
</view> </view> -->
<view class="type-item" bindtap="changeType" data-type="7"> <view class="type-item" bindtap="changeType" data-type="7">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon8{{type==7?'_active':''}}.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon8{{type==7?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==7?'color:#F75D2A':''}}">文化惠民</view> <view style="{{type==7?'color:#F75D2A':''}}">文化惠民</view>

4
pages/order/components/date/index.js

@ -168,6 +168,7 @@ Component({
showMoreDateFlag: false, showMoreDateFlag: false,
moreFlag: flag moreFlag: flag
}) })
app.globalData.product.price = this.data.activeDate.price
this.triggerEvent("onChangeDate", this.data.activeDate) this.triggerEvent("onChangeDate", this.data.activeDate)
this.getTimeStock() this.getTimeStock()
}, },
@ -199,6 +200,9 @@ Component({
}) })
this.triggerEvent("onChangeTime", this.data.timelist[this.data.timeIndex]) this.triggerEvent("onChangeTime", this.data.timelist[this.data.timeIndex])
}) })
app.globalData.product.price = this.data.activeDate.price
console.log('price',this.data.activeDate.price);
console.log(app.globalData.product);
}, },
selectTime: function (e) { selectTime: function (e) {
if (this.data.timelist[e.currentTarget.dataset.index].stock_number >0) { if (this.data.timelist[e.currentTarget.dataset.index].stock_number >0) {

47
pages/order/scene/index.js

@ -30,7 +30,8 @@ Page({
flag:null, flag:null,
ticket_type:1, ticket_type:1,
isCar:'single', isCar:'single',
showMask: false showMask: false,
price:0,
}, },
/** /**
@ -68,7 +69,8 @@ Page({
product: app.globalData.product, product: app.globalData.product,
singlePrice: this.data.gp_id ? app.globalData.product.sku.event_price : app.globalData.product.sku.price singlePrice: this.data.gp_id ? app.globalData.product.sku.event_price : app.globalData.product.sku.price
}) })
console.log(this.data.product); this.showAllPrice()
// console.log('********',this.data.product);
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && this.data.type!='museum') { if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && this.data.type!='museum') {
this.couponCom = this.selectAllComponents("#coupon")[0]; this.couponCom = this.selectAllComponents("#coupon")[0];
} }
@ -78,6 +80,37 @@ Page({
// showMask:true // showMask:true
// }) // })
// }, // },
showAllPrice:function () {
// console.log('detail',app.globalData.product);
// console.log('singlePrice',this.data.singlePrice);
// console.log('productNum',this.data.productNum);
if (app.globalData.product.price) {
this.setData({
singlePrice:app.globalData.product.price
})
let price = this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0)
if (price >0) {
this.setData({
price:price/100
})
}else {
this.setData({
price:0
})
}
// console.log(this.data.singlePrice);
}
let price = this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0)
if (price >0) {
this.setData({
price:price/100
})
}else {
this.setData({
price:0
})
}
},
cancel: function () { cancel: function () {
this.setData({ this.setData({
showMask:false showMask:false
@ -133,6 +166,7 @@ Page({
}) })
this.data.product.num = this.data.productNum this.data.product.num = this.data.productNum
this.changePrice() this.changePrice()
this.showAllPrice()
}, },
minus: function () { minus: function () {
if (this.data.productNum==undefined) { if (this.data.productNum==undefined) {
@ -160,15 +194,19 @@ Page({
}) })
this.data.product.num = this.data.productNum this.data.product.num = this.data.productNum
this.changePrice() this.changePrice()
this.showAllPrice()
}, },
changeDate: function (e) { changeDate: function (e) {
// console.log('打印',e);
this.showAllPrice()
if (e.detail.price != this.data.singlePrice && this.data.coupon) { if (e.detail.price != this.data.singlePrice && this.data.coupon) {
wx.showToast({ wx.showToast({
title: '订单价格发生变化,请重新选择优惠券', title: '订单价格发生变化,请重新选择优惠券',
icon: 'none' icon: 'none'
}) })
this.setData({ this.setData({
coupon: null coupon: null,
singlePrice:e.detail.price
}) })
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && this.data.type!='museum') { if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && this.data.type!='museum') {
this.couponCom.setNullCoupon() this.couponCom.setNullCoupon()
@ -541,6 +579,9 @@ Page({
// } // }
// }) // })
// } // }
// console.log('-----',app.globalData.product.sku.price);
// app.globalData.product = delete(app.globalData.product.detail)
// this.showAllPrice()
}, },
/** /**

4
pages/order/scene/index.wxml

@ -49,8 +49,8 @@
<view class="fixed-bottom" wx:if="{{type!='museum' && type!='activity'}}"> <view class="fixed-bottom" wx:if="{{type!='museum' && type!='activity'}}">
<view class="fixed-price-box" wx:if="{{kjId || prizeId}}"><text>合计:</text><text class="price">¥0</text></view> <view class="fixed-price-box" wx:if="{{kjId || prizeId}}"><text>合计:</text><text class="price">¥0</text></view>
<!-- <view class="fixed-price-box" wx:elif="{{prizeId}}"><text>合计:</text><text class="price">¥0</text></view> --> <!-- <view class="fixed-price-box" wx:elif="{{prizeId}}"><text>合计:</text><text class="price">¥0</text></view> -->
<view class="fixed-price-box" wx:else><text>合计:</text><text <view class="fixed-price-box" wx:else><text>合计:</text>
class="price">¥{{((singlePrice * productNum - (coupon?coupon.activity.money:0))>0?(singlePrice * productNum - (coupon?coupon.activity.money:0)):0)/ 100}}</text> <text class="price">¥{{price}}</text>
</view> </view>
<view class="fixed-btn" bindtap="next">下一步</view> <view class="fixed-btn" bindtap="next">下一步</view>
</view> </view>

Loading…
Cancel
Save