Browse Source

邮寄算运费请求最大优惠券接口

master
jiazhipeng 1 year ago
parent
commit
87d436f41a
  1. 2
      app.js
  2. 13
      pages/index/index.wxml
  3. 12
      pages/order/orderList/index.js
  4. 3
      pages/order/pay/index.wxml
  5. 2
      pages/order/postOrder/index.wxml
  6. 4
      pages/order/scene/index.js
  7. 2
      pages/order/scene/index.wxml

2
app.js

@ -21,7 +21,7 @@ App({
unique_key: "wechatxcx"
}).then(res => {
let data = JSON.parse(res.data);
data.isTest = data.isTest156? true : false;
data.isTest = data.isTest? true : false;
this.globalData.configJson = data
}).then(() => {
// 获取ui配置文件

13
pages/index/index.wxml

@ -19,7 +19,7 @@
</navigator>
</view>
<view style="position:relative;z-index: 1;" >
<swiper class="swiper" autoplay="{{true}}" interval="{{5000}}" duration="{{300}}" bindchange="changeBannerIndex" circular>
<swiper class="swiper" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}" bindchange="changeBannerIndex" circular>
<block wx:for="{{banner}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}">
<image src="{{item.head_img}}" mode="scaleToFill"></image>
@ -107,6 +107,11 @@
<image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/jcyc.png" mode="widthFix"></image>
<view class="text">剧场演出</view>
</view>
<view bindtap="gotoPath" data-event="hotel_click" data-title="酒店住宿" data-path="/pages/list/hotel/index" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/uploads/20250122/abd1f734fa04b783d8083ea1139b91fd.png" mode="widthFix"></image>
<view class="text">酒店住宿</view>
</view>
<view bindtap="gotoUrl" data-event="card" data-title="一卡游苏州" data-url="https://m.cloud.sz-trip.com/OneDayTravelNew" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/yry.png" mode="widthFix"></image>
<view class="text">一日游</view>
@ -124,6 +129,12 @@
<image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/fyzm.png" mode="widthFix"></image>
<view class="text">非遗专卖</view>
</view>
<view bindtap="gotoUrl" data-event="movie" data-title="研学游" data-url="https://m.cloud.sz-trip.com/LearningTravel" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/uploads/20250122/0022aa79a96e8c6e23aa914c74cfb136.png" mode="widthFix"></image>
<view class="text">研学游</view>
</view>
</view>
</scroll-view>
<view class="scroll-line">

12
pages/order/orderList/index.js

@ -25,7 +25,7 @@ Page({
linkmanList:[],
finalPrice: 0,
showCoupon: false,
showCoupon: true,
},
/**
@ -38,16 +38,22 @@ Page({
kjId: app.globalData.kjId,
gp_id: app.globalData.gp_id || app.globalData.team_id,
flag:options.flag,
showCoupon: (app.globalData.list || []).length<=0,
// showCoupon: (app.globalData.list || []).length<=0,
// linkmanList: app.globalData.linkmanList
})
console.log('-------------',this.data.ticketList);
// debugger
let price = 0, sku_id = [] ,postFee= 0;
app.globalData.postProduct.map(item => {
try {
item.postFee = parseFloat(item.postFee)
} catch(e){
item.postFee = 0
}
if (!app.globalData.kjId && !this.data.gp_id) {
price = price + item.sku.price * item.productNum;
postFee +=item.postFee
postFee += item.postFee
}
else if (this.data.gp_id) {
price = price + item.sku.event_price * item.productNum;

3
pages/order/pay/index.wxml

@ -82,8 +82,9 @@
</view>
</view>
</view>
<view style="padding:20rpx 0 60rpx;">
<view style="padding:20rpx 0 30rpx;">
<view class="btn" style="margin:0 100rpx" bindtap="closeTipMask">确认{{showTipMaskSecond<=0?'':'('+showTipMaskSecond+'s)'}}</view>
<view style="padding:30rpx 60rpx 0rpx;color: #d62828;font-size: 22rpx;font-weight: bold;">数币红包可使用1000元旅游红包,1000元购物红包无法在本平台使用</view>
</view>

2
pages/order/postOrder/index.wxml

@ -34,7 +34,7 @@
<input type="text" bindinput="inputRemark" data-index="{{index}}" placeholder="选填"></input>
</view>
<view class="all-money-box" wx:if="{{from=='cart'}}">
小计:<text class="unit">¥</text><text class="s-price">{{item.sku.price * item.productNum /100}}</text>
小计:<text class="unit">¥</text><text class="s-price">{{(item.sku.price * item.productNum + item.postFee || 0) /100}}</text>
</view>
<!-- 补贴 -->
<view class="box-title allowance" wx:if="{{allowance_price}}">

4
pages/order/scene/index.js

@ -310,6 +310,10 @@ Page({
this.totalPrice(this.data.singlePrice)
},
totalPrice(price) {
this.setData({
singlePrice:price
})
let allPrice
if (this.data.coupon) {
if (this.data.coupon.activity.discount_type == 'pricebreak') {

2
pages/order/scene/index.wxml

@ -34,7 +34,7 @@
</view>
<view class="box">
<view class="box-title">
<view style="flex:1">{{product && product.isGroup!=1?product.sku.sku_name:'预约人数'}}</view>
<view class="textOver2" style="flex:1">{{product && product.isGroup!=1?product.sku.sku_name:'预约人数'}}</view>
<!-- <view style="flex:1">{{product && product.isGroup!=1?'购票数量':'预约人数'}}</view> -->
<!-- <view class="iconfont icon-sami-select" wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="minus"></view> -->
<view class="s-price">

Loading…
Cancel
Save