Commit efa32335 authored by 罗超's avatar 罗超

调整线路订单

parent 2b5140c1
......@@ -33,7 +33,7 @@
font-size: 32rpx;
font-weight: bold;
width: 70%;
height: 25px;
height: 24px;
overflow: hidden;
}
......@@ -93,7 +93,7 @@
<template v-else>
<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%' }">
<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_Oleft" :class="{'isShowAll':!item.isShowHalf}">
{{item.title}}
......@@ -176,6 +176,11 @@
},
methods: {
goOrderDetail(item){
uni.redirectTo({
url: "/pages/jiuzhai/jz_SureOrder?orderData="+encodeURIComponent(JSON.stringify(item))
});
},
change(i) {
this.current = i;
this.msg.orderState = this.list[i].Id;
......
......@@ -379,7 +379,10 @@
<text style="color:#6E6E6E;font-size:24rpx;">共计{{total}}</text>
</view>
<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>
......@@ -393,6 +396,7 @@
},
data() {
return {
submit:false,
pageTitle: '订单填写',
orderMsg: {
ManNum: 0, //成人
......@@ -412,7 +416,9 @@
ltName:'',
tips:"",
contactMobile:"",
contactName:""
contactName:"",
orderInfo:{},
orderData:""
};
},
created() {
......@@ -507,6 +513,7 @@
icon: 'none'
});
}else{
this.submit=true
this.userInfo = uni.getStorageSync('mall_UserInfo');
this.basedataObj = uni.getStorageSync('basedata').mall;
var CustomerId = 0;
......@@ -577,16 +584,70 @@
let data = res.data;
data.CoverImg = this.currentPriceInfo.CoverImg;
let myData = JSON.stringify(data);
uni.navigateTo({
url: "/pages/jiuzhai/jz_SureOrder?orderData="+encodeURIComponent(myData)
});
this.orderData=encodeURIComponent(myData)
this.queren(data.OrderId)
} 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 @@
console.log(this.orderData,'this.orderData');
},
methods: {
//支付
goZhifu(){
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