Commit f0db232b authored by 潘永坪's avatar 潘永坪

洞舰首页和湖广会馆首页增加,支付成功逻辑修改

parent 44987af4
This diff is collapsed.
<template>
<view class="wrap">
<view>
<view>
<text class="button" @click="goKnow()">购票须知</text>
</view>
<view style="margin-top: 100rpx;">
<text class="button" @click="goBuy()">立即购票</text>
</view>
</view>
<!-- 购票须知 -->
<view class="buy-know" v-if="showKnow" @click="showKnow=false">
<view class="box">
<view class="title">
告游客书
</view>
<view>
尊敬的游客、广大市民:
</view>
<view>
<text>
开放时间:
</text>
09:00 - 18:00,闭馆前1小时(17:00)停止售票
</view>
<view style="color: #D9A874;">
每周一“湖广镇四川”移民博物馆、临展馆闭馆维护。
</view>
<view>
<text>
博物馆开放日多功能设备运行时间:
</text>
09:30 - 12:30;14:30 - 17:30,(根据景区当天实际情况为准)
</view>
<view>
<text>
免费人群:
</text>
需出示身份证及有效证件原件前往检票处登记入园。
</view>
<view>
<text>
退票须知:
</text>
游客所购门票在选定游玩日期当天19:00前如未使用,可在电子门票‘我的订单’中申请退票,逾期不可退。
</view>
<view style="margin-top: 48rpx;display: flex;justify-content: center;">
<text class="button" @click.stop="goBuy()">立即购票</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
urlQuery:'',
showKnow:false
}
},
onLoad(option) {
let channelId=option.channelId||''
let companyId=option.companyId||''
let merchantId=option.merchantId||''
let groupId=option.groupId||''
let groupChannelId=option.groupChannelId||''
this.urlQuery=channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId
},
methods: {
//---购票
goBuy(){
uni.navigateTo({
url:"/pages/combination/distributionCombiChoose/distributionCombiChoose?channelId="+this.urlQuery
})
},
//---购票须知
goKnow(){
this.showKnow=true
}
}
}
</script>
<style scoped>
.wrap{
height: 100%;
background:#fffae8;
font-size: 40rpx;
display: flex;
align-items: center;
justify-content:center;
}
.button{
width: 520rpx;
height: 112rpx;
display:flex;
align-items: center;
justify-content: center;
background: url('../../../static/img/hghg/bigBtn.png') no-repeat;
background-size: 100% 100%;
}
.buy-know{
padding: 0 48rpx;
display: flex;
align-items: center;
justify-content: center;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.3);
}
.box{
padding: 60rpx 40rpx;
background: url('../../../static/img/hghg/dialog.png') no-repeat;
background-size: 100% 100%;
color: #000000;
font-size: 28rpx;
}
.box>view{
margin-top: 10rpx;
}
.box view text{
font-weight: bold;
}
.title{
font-weight: bold;
font-size: 40rpx;
text-align: center;
}
.button{
display: flex;
width: 244rpx;
height: 96rpx;
background: url('../../../static/img/hghg/smallBtn.png') no-repeat;
background-size: 100% 100%;
align-items: center;
justify-content: center;
font-size: 32rpx;
}
</style>
<template>
<view>
<web-view :src="outUrl"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
outUrl:'',//跳出地址
Brightness:'',//屏幕亮度
}
},
onShow() {
let _this=this
uni.getScreenBrightness({
success: function(res){
// 这里是把获取到的手机屏幕亮度,存储到data里面,方便给到页面生命周期隐藏和卸载方法里面用
_this.Brightness = res.value
if(res.value != 1){
uni.setScreenBrightness({
value: 1
})
}
}
})
},
onHide: function () {
uni.setScreenBrightness({// 恢复之前屏幕亮度
value: this.Brightness
})
},
onLoad(option) {
let pdOpenid=uni.getStorageSync('openid')//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync('token')
let pdCreateUserId=uni.getStorageSync('createUserId')
let pdUserId=uni.getStorageSync('userId')
let ifyukuaiCode=option.ifyukuaiCode||''//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
this.outUrl='https://wx.pangdly.com/#/unusedDetail?id='+option.orderId+'&pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId+'&ifyukuaiCode='+ifyukuaiCode
},
methods: {
}
}
</script>
<style>
</style>
......@@ -194,9 +194,9 @@ export default {
//支付参数结束
this.pdOrderMoney = res.data.pdOrderMoney
if (this.pdOrderMoney == 0 && res.data.subOrderType == -1) {
//0元购直接跳电子门票页面
this.afterBuyUrl='/pages/my/order/electronicTicket/electronicTicket'
uni.navigateTo({
url: '/pages/my/order/electronicTicket/electronicTicket?orderId=' + this.orderId + '&ifyukuaiCode=' + this.ifyukuaiCode
url: '/pages/payment/paySuccess/paySuccess?orderId=' + _this.orderId+'&afterBuyUrl=' + _this.afterBuyUrl + '&ifyukuaiCode=' + _this.ifyukuaiCode
})
}
this.errorMessage = res.data.errorMessage
......@@ -245,7 +245,7 @@ export default {
paySign: this.paySign,
success: function(res) {
uni.navigateTo({
url: _this.afterBuyUrl + '?orderId=' + _this.orderId + '&ifyukuaiCode=' + _this.ifyukuaiCode
url: '/pages/payment/paySuccess/paySuccess?orderId=' + _this.orderId+'&afterBuyUrl=' + _this.afterBuyUrl + '&ifyukuaiCode=' + _this.ifyukuaiCode
})
},
fail: function(err) {
......@@ -263,7 +263,7 @@ export default {
orderInfo: this.orderInfo, // 支付宝订单号
success: function(res) {
uni.navigateTo({
url: _this.afterBuyUrl + '?orderId=' + _this.orderId + '&ifyukuaiCode=' + _this.ifyukuaiCode
url: '/pages/payment/paySuccess/paySuccess?orderId=' + _this.orderId+'&afterBuyUrl=' + _this.afterBuyUrl + '&ifyukuaiCode=' + _this.ifyukuaiCode
})
},
fail: function(err) {
......
<template>
<view>
<web-view :src="outUrl"></web-view>
</view>
<view class="wrap">
<text style="margin-right: 20rpx;">
{{title}}
</text>
<image src="../../../static/img/common/loading.gif" v-if="loadImg" style="width: 32rpx;height: 32rpx;">
</image>
</view>
</template>
<script>
export default {
data() {
return {
outUrl:"",//跳出页面路径
title: "正在出票中", //标题
orderId: "", //订单Id
status: "", //出票状态
timer: "", //计时器
loadImg: true, //控制加载图片显示隐藏
afterBuyUrl:'',//页面跳转地址
ifyukuaiCode: '' //是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
}
},
onLoad(option) {
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token")
let pdCreateUserId=uni.getStorageSync("createUserId")
let pdUserId=uni.getStorageSync("userId")
this.outUrl="https://wx.pangdly.com/#/paySuccess?orderId="+option.orderId+"&pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId
this.orderId = option.orderId||''
this.afterBuyUrl = option.afterBuyUrl||''
this.ifyukuaiCode=option.ifyukuaiCode||''
let sum = 0
let intFun=()=>{ //页面初始化
this.timer = setTimeout(()=>{
sum += 300
if (sum > 300) {
sum += 700
}
if (this.status == "2" || this.status == "4" || this.status == "5") {
uni.redirectTo({
url:this.afterBuyUrl+'?orderId=' + this.orderId+'&ifyukuaiCode='+this.ifyukuaiCode
})
return
}
if (this.status == "3") {
this.title = "出票失败..."
this.loadImg = false
return
}
if (sum > 10000) {
this.title = "出票失败..."
this.loadImg = false
return
}
this.ticketStatus()
intFun()
}, sum)
}
intFun()
},
beforeDestroy() {
if (this.timer) {
//清除定时器
clearInterval(this.timer)
}
},
methods: {
//---出票状态
ticketStatus() {
let data = {
orderId: this.orderId
}
this.$request("order/order/getStatusById", data).then((res) => {
if (res.code == "00") {
this.status = res.data
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
}
})
}
}
}
</script>
<style>
<style scoped="scoped">
.wrap {
padding-top: 150rpx;
text-align: center;
font-size: 36rpx;
color: #ffbc00;
display: flex;
align-items: center;
justify-content: center;
}
</style>
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