|
@@ -17,7 +17,8 @@ import "./style.less";
|
17
|
17
|
|
18
|
18
|
export default withLayout((props) => {
|
19
|
19
|
const { router, person } = props;
|
20
|
|
- const { packageId, orderId } = props.router.params;
|
|
20
|
+ console.log("🚀 ~ file: index.jsx ~ line 20 ~ withLayout ~ props", props)
|
|
21
|
+ const { packageId, orderId, scene, subOrderId, id } = props.router.params;
|
21
|
22
|
const [payInfo, setPayInfo] = useState();
|
22
|
23
|
// 是否已阅读协议
|
23
|
24
|
const [agreement, setAgreement] = useState(false);
|
|
@@ -64,14 +65,35 @@ export default withLayout((props) => {
|
64
|
65
|
package: params.packageValue,
|
65
|
66
|
success: () => {
|
66
|
67
|
setPayInfo();
|
67
|
|
- Taro.redirectTo({
|
68
|
|
- url: "/pages/MineUserAll/AllOrder/index",
|
69
|
|
- });
|
|
68
|
+
|
70
|
69
|
Taro.showToast({
|
71
|
70
|
title: "支付成功",
|
72
|
71
|
icon: "none",
|
73
|
|
- duration: 2000,
|
|
72
|
+ duration: 1000,
|
74
|
73
|
});
|
|
74
|
+ if (!scene) {
|
|
75
|
+ Taro.redirectTo({
|
|
76
|
+ url: "/pages/MineUserAll/AllOrder/index",
|
|
77
|
+ });
|
|
78
|
+ } else {
|
|
79
|
+ Taro.showModal({
|
|
80
|
+ title: '是否核销',
|
|
81
|
+ success: function (res) {
|
|
82
|
+ if (res.confirm) {
|
|
83
|
+ Taro.navigateTo({
|
|
84
|
+ url: `/pages/TobeShop/index?id=${id}&subOrderId=${subOrderId}`,
|
|
85
|
+ });
|
|
86
|
+
|
|
87
|
+ } else if (res.cancel) {
|
|
88
|
+ Taro.redirectTo({
|
|
89
|
+ url: "/pages/MineUserAll/AllOrder/index",
|
|
90
|
+ });
|
|
91
|
+ }
|
|
92
|
+ }
|
|
93
|
+ })
|
|
94
|
+ }
|
|
95
|
+
|
|
96
|
+
|
75
|
97
|
},
|
76
|
98
|
fail: (e) => {
|
77
|
99
|
Taro.showToast({
|