Browse Source

新能源优化2.0

master
jiazhipeng 1 year ago
parent
commit
3b1ab0582f
  1. 2
      app.js
  2. 7
      pages/index/index.wxml
  3. 50
      pages/order/pay/index.js
  4. 25
      pages/order/pay/index.wxml
  5. 2
      pages/order/pay/index.wxss
  6. 2
      pages/pbService/web/index.js
  7. 2
      project.private.config.json

2
app.js

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

7
pages/index/index.wxml

@ -65,7 +65,12 @@
<image src="{{imageSourceList.mainFunImgs[5]}}" mode="widthFix"></image> <image src="{{imageSourceList.mainFunImgs[5]}}" mode="widthFix"></image>
<view class="top-icon-text">景点门票</view> <view class="top-icon-text">景点门票</view>
</view> </view>
<view bindtap="gotoPath" data-event="hotel_click" data-title="酒店住宿" data-path="/pages/list/hotel/index" class="top-icon-item"> <!-- <view bindtap="gotoPath" data-event="hotel_click" data-title="酒店住宿" data-path="/pages/list/hotel/index" class="top-icon-item">
<image src="{{imageSourceList.mainFunImgs[6]}}" mode="widthFix"></image>
<view class="top-icon-text">酒店住宿</view>
</view> -->
<!-- 临时跳转专题页 -->
<view bindtap="gotoUrl" data-event="hotel_click" data-title="酒店住宿" data-url="https://m.cloud.sz-trip.com/carPurchase" class="top-icon-item">
<image src="{{imageSourceList.mainFunImgs[6]}}" mode="widthFix"></image> <image src="{{imageSourceList.mainFunImgs[6]}}" mode="widthFix"></image>
<view class="top-icon-text">酒店住宿</view> <view class="top-icon-text">酒店住宿</view>
</view> </view>

50
pages/order/pay/index.js

@ -23,6 +23,8 @@ Page({
status:false, status:false,
// 是否新能源汽车专题产品 // 是否新能源汽车专题产品
carCouponTip: 0, carCouponTip: 0,
showTipMask:false,
showTipMaskSecond: 3,
}, },
/** /**
@ -32,6 +34,7 @@ Page({
this.setData({ this.setData({
id:options.id id:options.id
}) })
this.initTipMask()
}, },
daojishi:function(time){ daojishi:function(time){
let now = new Date().getTime(); let now = new Date().getTime();
@ -93,12 +96,7 @@ Page({
commonApi.user_post("order/query",{ commonApi.user_post("order/query",{
order_id:this.data.id order_id:this.data.id
}).then(res=>{ }).then(res=>{
//判断是否存在新能源汽车专题产品
let carCouponTip = (res.data.order_product_list || []).some(v=>(v.tag_ids||[]).includes(390) || (v.tag_ids||[]).includes(391))
this.setData({
carCouponTip:carCouponTip,
})
// 书券产品 // 书券产品
@ -129,7 +127,16 @@ Page({
info:res.data, info:res.data,
}) })
} }
//判断是否存在新能源汽车专题产品
let carCouponTip = (res.data.order_product_list || []).some(v=>(v.tag_ids||[]).includes(390) || (v.tag_ids||[]).includes(391))
res.data.order_product_list.forEach(v=>{
v.needTip = (v.tag_ids||[]).includes(390) || (v.tag_ids||[]).includes(391)
})
this.setData({
carCouponTip:carCouponTip,
info: res.data
})
console.log(this.data.ERMB); console.log(this.data.ERMB);
@ -268,6 +275,35 @@ Page({
}) })
}, },
// 临时支付弹窗
initTipMask () {
if (new Date().getTime()>=new Date('2025-02-01 00:00:00')) {
return
}
this.setData({
showTipMask:true,
showTipMaskSecond: 3,
})
let second = this.data.showTipMaskSecond
let timer = setInterval(()=>{
if(second<0) {
clearInterval(timer)
}
second--
this.setData({showTipMaskSecond: second})
},1000)
},
closeTipMask () {
if (this.data.showTipMaskSecond<=0) {
this.setData({
showTipMask:false,
})
}
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */

25
pages/order/pay/index.wxml

@ -63,4 +63,29 @@
</view> </view>
<view class="btn" bindtap="walletPay" style="margin:25rpx">立即付款</view> <view class="btn" bindtap="walletPay" style="margin:25rpx">立即付款</view>
</view> </view>
</view>
<view class="mask" wx:if="{{showTipMask&&carCouponTip}}">
<view class="mask-bg"></view>
<view class="mask-content" style="text-align:center;width:90%;border-radius:10rpx">
<view class="num-pay-top">
<view style="margin-bottom:40rpx;font-size: 36rpx;font-weight: bold;">重要提示</view>
<view style="font-size: 28rpx;font-weight: normal;text-align: left;padding:0 40rpx 20rpx 40rpx;">您购买的以下产品一经下单,不退不改</view>
<view style="max-height: 500rpx;overflow-y: auto;color: #666;">
<view wx:for="{{info.order_product_list}}">
<view style="text-align: left;padding: 0 40rpx 20rpx;" wx:if="{{item.needTip}}">
<view>{{item.sku_name}}</view>
<view>可用时间:{{item.sku_model.expired_range_start}}至{{item.sku_model.expired_range_end}}</view>
</view>
</view>
</view>
</view>
<view style="padding:20rpx 0 60rpx;">
<view class="btn" style="margin:0 100rpx" bindtap="closeTipMask">确认{{showTipMaskSecond<=0?'':'('+showTipMaskSecond+'s)'}}</view>
</view>
</view>
</view> </view>

2
pages/order/pay/index.wxss

@ -78,10 +78,8 @@ page {
} }
.num-pay-top { .num-pay-top {
text-align: center; text-align: center;
font-weight: bold;
padding:50rpx 0; padding:50rpx 0;
color: #000; color: #000;
font-size: 36rpx;
} }
.carPayTip{ .carPayTip{
font-family: PingFang SC; font-family: PingFang SC;

2
pages/pbService/web/index.js

@ -19,7 +19,7 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
let weburl = decodeURIComponent(options.weburl) let weburl = decodeURIComponent(options.weburl)
// weburl = 'https://test.m.cloud.sz-trip.com/petYou2024?cnylCode=oK7OHccT' // weburl = 'https://test.m.cloud.sz-trip.com/petYou2024'
console.log('weburl',weburl) console.log('weburl',weburl)
// 获取路径参数 // 获取路径参数
let webParam = {} let webParam = {}

2
project.private.config.json

@ -9,7 +9,7 @@
{ {
"name": "pages/pbService/web/index", "name": "pages/pbService/web/index",
"pathName": "pages/pbService/web/index", "pathName": "pages/pbService/web/index",
"query": "weburl=https%3A%2F%2Fm.cloud.sz-trip.com%2FcouponAndKs%3FksCode%3D7975f8d216d7f5b2b588863f86d5739f", "query": "weburl=https%3A%2F%2Fm.cloud.sz-trip.com%2FcouponAndKs%3FksCode%3D3995803e3e3ef3154554f14c2fc8511b",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },

Loading…
Cancel
Save