Commit efa32335 authored by 罗超's avatar 罗超

调整线路订单

parent 2b5140c1
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
width: 70%; width: 70%;
height: 25px; height: 24px;
overflow: hidden; overflow: hidden;
} }
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<template v-else> <template v-else>
<view class="jz_MyOrderMain" style="height: calc(100vh - 44px);overflow: hidden;"> <view class="jz_MyOrderMain" style="height: calc(100vh - 44px);overflow: hidden;">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }"> <scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }">
<view class="jz_OrderList" v-for="(item,index) in dataList" :key="index"> <view class="jz_OrderList" v-for="(item,index) in dataList" :key="index" @click="goOrderDetail(item)">
<view class="jz_OrderTop"> <view class="jz_OrderTop">
<view class="jz_Oleft" :class="{'isShowAll':!item.isShowHalf}"> <view class="jz_Oleft" :class="{'isShowAll':!item.isShowHalf}">
{{item.title}} {{item.title}}
...@@ -176,6 +176,11 @@ ...@@ -176,6 +176,11 @@
}, },
methods: { methods: {
goOrderDetail(item){
uni.redirectTo({
url: "/pages/jiuzhai/jz_SureOrder?orderData="+encodeURIComponent(JSON.stringify(item))
});
},
change(i) { change(i) {
this.current = i; this.current = i;
this.msg.orderState = this.list[i].Id; this.msg.orderState = this.list[i].Id;
......
...@@ -379,7 +379,10 @@ ...@@ -379,7 +379,10 @@
<text style="color:#6E6E6E;font-size:24rpx;">共计{{total}}</text> <text style="color:#6E6E6E;font-size:24rpx;">共计{{total}}</text>
</view> </view>
<view style="display:flex;margin-top:-2px;"> <view style="display:flex;margin-top:-2px;">
<view class="jz_OrderReNow" @click="goPay()">立即支付</view> <view class="jz_OrderReNow" @click="goPay()">
<text v-if="!submit">立即支付</text>
<u-loading v-if="submit" size="32" color="#f5f5f5"></u-loading>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -393,6 +396,7 @@ ...@@ -393,6 +396,7 @@
}, },
data() { data() {
return { return {
submit:false,
pageTitle: '订单填写', pageTitle: '订单填写',
orderMsg: { orderMsg: {
ManNum: 0, //成人 ManNum: 0, //成人
...@@ -412,7 +416,9 @@ ...@@ -412,7 +416,9 @@
ltName:'', ltName:'',
tips:"", tips:"",
contactMobile:"", contactMobile:"",
contactName:"" contactName:"",
orderInfo:{},
orderData:""
}; };
}, },
created() { created() {
...@@ -507,6 +513,7 @@ ...@@ -507,6 +513,7 @@
icon: 'none' icon: 'none'
}); });
}else{ }else{
this.submit=true
this.userInfo = uni.getStorageSync('mall_UserInfo'); this.userInfo = uni.getStorageSync('mall_UserInfo');
this.basedataObj = uni.getStorageSync('basedata').mall; this.basedataObj = uni.getStorageSync('basedata').mall;
var CustomerId = 0; var CustomerId = 0;
...@@ -577,16 +584,70 @@ ...@@ -577,16 +584,70 @@
let data = res.data; let data = res.data;
data.CoverImg = this.currentPriceInfo.CoverImg; data.CoverImg = this.currentPriceInfo.CoverImg;
let myData = JSON.stringify(data); let myData = JSON.stringify(data);
uni.navigateTo({ this.orderData=encodeURIComponent(myData)
url: "/pages/jiuzhai/jz_SureOrder?orderData="+encodeURIComponent(myData) this.queren(data.OrderId)
});
} else { } else {
} }
this.submit=false
}, },
null e=>{
this.submit=false
}
); );
} }
},
queren(OrderId){
let url='/api/WeChatPay/GetTravlePayInfo'
let GoodsName = this.currentPriceInfo.title;
GoodsName = GoodsName.slice(0, 10)
this.request2({
url: url,
data: {
OrderId:OrderId,
GoodsName:GoodsName,
OrderPayType:1,
OpenId:uni.getStorageSync('mall_UserInfo').OpenId,
}
},
res => {
this.orderInfo = JSON.parse(res.data);
this.Pay()
}
);
},
Pay(){
let that=this;
uni.requestPayment({
provider: 'wxpay',
timeStamp: this.orderInfo.timeStamp,
nonceStr: this.orderInfo.nonceStr,
package: this.orderInfo.package,
signType: this.orderInfo.signType,
paySign: this.orderInfo.sign,
success: function(res) {
console.log('success', res);
uni.showToast({
title: "支付成功"
})
setTimeout(()=>{
uni.redirectTo({
url: '/pages/jiuzhai/paysuccess?PreferPrice='+price
});
}, 100 )
},
fail: function(err) {
console.log('fail:', err);
uni.showToast({
title: "支付失败"
})
setTimeout(()=>{
uni.redirectTo({
url: "/pages/jiuzhai/jz_SureOrder?orderData="+this.orderData
});
}, 100 )
}
});
} }
} }
......
...@@ -163,6 +163,7 @@ ...@@ -163,6 +163,7 @@
console.log(this.orderData,'this.orderData'); console.log(this.orderData,'this.orderData');
}, },
methods: { methods: {
//支付 //支付
goZhifu(){ goZhifu(){
let url='/api/WeChatPay/GetTravlePayInfo' let url='/api/WeChatPay/GetTravlePayInfo'
......
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