Commit 9c854fd2 authored by 罗超's avatar 罗超

1

parent 991c41e9
...@@ -688,14 +688,7 @@ export default { ...@@ -688,14 +688,7 @@ export default {
data.CoverImg = this.currentPriceInfo.CoverImg; data.CoverImg = this.currentPriceInfo.CoverImg;
let myData = JSON.stringify(data); let myData = JSON.stringify(data);
this.orderData = encodeURIComponent(myData); this.orderData = encodeURIComponent(myData);
// this.queren(data.OrderId); this.queren(data.OrderId);
let obj = {
TradeNo: "2021101322001457051451455636",
OrderNo: data.OrderNo,
OrderId: data.OrderId,
preferPrice: data.PreferPrice,
};
this.payAliCallback(obj);
} else { } else {
} }
this.submit = false; this.submit = false;
...@@ -743,7 +736,10 @@ export default { ...@@ -743,7 +736,10 @@ export default {
}); });
setTimeout(() => { setTimeout(() => {
uni.redirectTo({ uni.redirectTo({
url: "/pages/jiuzhai/paysuccess?PreferPrice=" + this.price, url:
"/pages/jiuzhai/paysuccess?PreferPrice=" +
this.price +
"&isFrom=1",
}); });
}, 100); }, 100);
}, },
...@@ -875,7 +871,6 @@ export default { ...@@ -875,7 +871,6 @@ export default {
(res) => { (res) => {
this.orderInfo = JSON.parse(res.data); this.orderInfo = JSON.parse(res.data);
if (res.data) { if (res.data) {
// that.PayAli(res.data, data);
let cbObj = { let cbObj = {
TradeNo: res.data, TradeNo: res.data,
OrderNo: data.OrderNo, OrderNo: data.OrderNo,
...@@ -915,7 +910,6 @@ export default { ...@@ -915,7 +910,6 @@ export default {
}, },
}); });
}, },
// #endif
payAliCallback(obj) { payAliCallback(obj) {
this.request2( this.request2(
{ {
...@@ -933,7 +927,10 @@ export default { ...@@ -933,7 +927,10 @@ export default {
console.log("cb", res); console.log("cb", res);
this.submit = false; this.submit = false;
uni.redirectTo({ uni.redirectTo({
url: "/pages/jiuzhai/paysuccess?PreferPrice=" + obj.preferPrice, url:
"/pages/jiuzhai/paysuccess?PreferPrice=" +
obj.preferPrice +
"&isFrom=1",
}); });
}, },
(err) => { (err) => {
...@@ -951,6 +948,7 @@ export default { ...@@ -951,6 +948,7 @@ export default {
} }
); );
}, },
// #endif
}, },
}; };
</script> </script>
...@@ -596,7 +596,7 @@ ...@@ -596,7 +596,7 @@
@click="goback" @click="goback"
style="background: #fff; color: #111; border: 1px solid #111" style="background: #fff; color: #111; border: 1px solid #111"
v-if="!showPayBtn" v-if="!showPayBtn"
>取消 >关闭
</view> </view>
</view> </view>
<view style="display: flex; margin-left: 30rpx"> <view style="display: flex; margin-left: 30rpx">
...@@ -881,7 +881,6 @@ export default { ...@@ -881,7 +881,6 @@ export default {
}); });
}, },
payAliCallback(obj) { payAliCallback(obj) {
console.log(893), Obj;
let that = this; let that = this;
this.request2( this.request2(
{ {
...@@ -896,18 +895,11 @@ export default { ...@@ -896,18 +895,11 @@ export default {
}, },
}, },
(res) => { (res) => {
console.log("cb", res);
// uni.redirectTo({
// url:
// "/pages/jiuzhai/paysuccess?PreferPrice=" +
// obj.PreferPrice +
// "&isFrom=1",
// });
that.submit = false; that.submit = false;
that.initOrderInfo(that.orderData.model.OrderId); that.initOrderInfo(that.orderData.model.OrderId);
}, },
(err) => { (err) => {
console.log("cb2", err); console.log("err", err);
uni.showToast({ uni.showToast({
title: "支付失败", title: "支付失败",
icon: "none", icon: "none",
......
<template> <template>
<view class="paySuccess"> <view class="paySuccess">
<view style="background: #fff;"> <view style="background: #fff">
<view class="img-box"> <view class="img-box">
<img src="/static/images/icon/pay-success.png" class="img" /> <img src="/static/images/icon/pay-success.png" class="img" />
</view> </view>
<view class="title">订单支付成功</view> <view class="title">订单支付成功</view>
<view class="price">实付 ¥{{PreferPrice}}</view> <view class="price">实付 ¥{{ PreferPrice }}</view>
<view class="btn-box"> <view class="btn-box">
<u-button style="display: inline-block;" shape="circle" :custom-style="customStyle" @click="goHome">返回首页</u-button> <u-button shape="circle" :custom-style="customStyle" @click="goHome"
<u-button shape="circle" style="margin-left: 60rpx; display: inline-block;" :custom-style="themCustomStyle" >返回首页</u-button
@click.stop="redictToOrders">查看订单</u-button> >
<u-button
shape="circle"
:custom-style="themCustomStyle"
@click="redictToOrders"
>查看订单</u-button
>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default {
export default { components: {},
components: {
},
data() { data() {
return { return {
customStyle: { customStyle: {
marginLeft: "20px", width: "150rpx",
padding: "0 30rpx", padding: "0 30rpx",
}, },
themCustomStyle: { themCustomStyle: {
marginLeft: "20px", width: "150rpx",
marginLeft: "60rpx",
padding: "0 30rpx", padding: "0 30rpx",
}, },
mainColor: "", mainColor: "",
recommend: [], recommend: [],
payInfo: {}, payInfo: {},
showCoupons: false, showCoupons: false,
couponMessage: '', couponMessage: "",
PreferPrice:'', PreferPrice: "",
isLineOrder:0, isLineOrder: 0,
}; };
}, },
onLoad(option) { onLoad(option) {
if (option.PreferPrice) { if (option.PreferPrice) {
this.PreferPrice = option.PreferPrice this.PreferPrice = option.PreferPrice;
} }
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "支付成功", title: "支付成功",
...@@ -51,25 +54,24 @@ ...@@ -51,25 +54,24 @@
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.themCustomStyle.color = this.mainColor; this.themCustomStyle.color = this.mainColor;
this.themCustomStyle.borderColor = this.mainColor; this.themCustomStyle.borderColor = this.mainColor;
if(option.isFrom){ if (option.isFrom) {
this.isLineOrder=option.isFrom this.isLineOrder = option.isFrom;
} }
}, },
methods: { methods: {
redictToOrders() { redictToOrders() {
if(this.isLineOrder==0){ if (this.isLineOrder == 0) {
uni.redirectTo({ uni.redirectTo({
url: '/pages/jiuzhai/allorderList' url: "/pages/jiuzhai/allorderList",
}); });
}else if(this.isLineOrder==1){ } else if (this.isLineOrder == 1) {
uni.redirectTo({ uni.redirectTo({
url: '/pages/jiuzhai/jz_MyOrder' url: "/pages/jiuzhai/jz_MyOrder",
}); });
} else if (this.isLineOrder == 2) {
}else if(this.isLineOrder==2){//司导订单 //司导订单
uni.redirectTo({ uni.redirectTo({
url: '/pages/guidecar/orderList' url: "/pages/guidecar/orderList",
}); });
} }
}, },
...@@ -78,47 +80,48 @@ ...@@ -78,47 +80,48 @@
url: "/pages/index/index", url: "/pages/index/index",
}); });
}, },
}, },
}; };
</script> </script>
<style> <style>
.paySuccess { .paySuccess {
min-height: 100vh; min-height: 100vh;
padding-bottom: 40rpx; padding-bottom: 40rpx;
background: #f5f5f5; background: #f5f5f5;
} }
.paySuccess .img-box { .paySuccess .img-box {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.paySuccess .img-box .img { .paySuccess .img-box .img {
width: 256rpx; width: 256rpx;
height: 256rpx; height: 256rpx;
padding: 60rpx 0 0 0; padding: 60rpx 0 0 0;
} }
.paySuccess .title { .paySuccess .title {
padding: 40rpx 0 20rpx 0; padding: 40rpx 0 20rpx 0;
font-size: 32rpx; font-size: 32rpx;
color: #000; color: #000;
font-weight: 600; font-weight: 600;
text-align: center; text-align: center;
} }
.paySuccess .price { .paySuccess .price {
font-size: 30rpx; font-size: 30rpx;
color: gray; color: gray;
padding-bottom: 60rpx; padding-bottom: 60rpx;
text-align: center; text-align: center;
} }
.paySuccess .btn-box { .paySuccess .btn-box {
padding-bottom: 60rpx; padding-bottom: 60rpx;
text-align: center; text-align: center;
} display: flex;
justify-content: center;
}
</style> </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