Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengke
jz_Travel
Commits
fd5dce1f
Commit
fd5dce1f
authored
Oct 13, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
59232b8f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
105 additions
and
44 deletions
+105
-44
jz_MyOrder.vue
pages/jiuzhai/jz_MyOrder.vue
+41
-17
jz_Reserve.vue
pages/jiuzhai/jz_Reserve.vue
+14
-19
jz_SureOrder.vue
pages/jiuzhai/jz_SureOrder.vue
+50
-8
No files found.
pages/jiuzhai/jz_MyOrder.vue
View file @
fd5dce1f
...
...
@@ -461,31 +461,23 @@ export default {
},
},
(
res
)
=>
{
this
.
goPayAli
(
res
.
data
);
this
.
goPayAli
(
res
.
data
,
item
);
}
);
},
goPayAli
(
tradeNO
)
{
goPayAli
(
tradeNO
,
item
)
{
let
that
=
this
;
my
.
tradePay
({
tradeNO
:
tradeNO
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
if
(
res
.
resultCode
==
"9000"
)
{
uni
.
showToast
({
title
:
"支付成功"
,
});
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
that
.
price
+
"&isFrom=1"
,
});
}
else
if
(
res
.
resultCode
==
"6001"
)
{
uni
.
showToast
({
title
:
"支付取消"
,
});
}
let
obj
=
{
TradeNo
:
tradeNO
,
OrderNo
:
item
.
orderNo
,
OrderId
:
item
.
orderId
,
preferPrice
:
item
.
preferPrice
,
};
that
.
payAliCallback
(
obj
);
},
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
...
...
@@ -496,6 +488,38 @@ export default {
},
});
},
payAliCallback
(
obj
)
{
console
.
log
(
893
),
Obj
;
this
.
request2
(
{
url
:
"/api/AliPay/ALiPayCallBackDmcNotify"
,
data
:
{
OrderNo
:
obj
.
OrderNo
,
OrderId
:
obj
.
OrderId
,
UserId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
,
TradeNo
:
obj
.
TradeNo
,
ProjectType
:
2
,
PreferPrice
:
obj
.
preferPrice
,
},
},
(
res
)
=>
{
console
.
log
(
"cb"
,
res
);
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
obj
.
PreferPrice
+
"&isFrom=1"
,
});
},
(
err
)
=>
{
console
.
log
(
"cb2"
,
err
);
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
});
}
);
},
// #endif
},
};
...
...
pages/jiuzhai/jz_Reserve.vue
View file @
fd5dce1f
...
...
@@ -874,9 +874,7 @@ export default {
OrderId
:
data
.
OrderId
,
preferPrice
:
data
.
PreferPrice
,
};
console
.
log
(
883
,
cbObj
);
this
.
payAliCallback
(
cbObj
);
console
.
log
(
884
);
}
else
{
uni
.
showToast
({
title
:
"获取交易号失败"
,
...
...
@@ -892,19 +890,13 @@ export default {
tradeNO
:
tradeNO
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
if
(
res
.
resultCode
==
"9000"
)
{
let
cbObj
=
{
TradeNo
:
tradeNO
,
OrderNo
:
data
.
OrderNo
,
OrderId
:
data
.
OrderId
,
preferPrice
:
data
.
PreferPrice
,
};
that
.
payAliCallback
(
cbObj
);
}
else
if
(
res
.
resultCode
==
"6001"
)
{
uni
.
showToast
({
title
:
"支付取消"
,
});
}
let
cbObj
=
{
TradeNo
:
tradeNO
,
OrderNo
:
data
.
OrderNo
,
OrderId
:
data
.
OrderId
,
preferPrice
:
data
.
PreferPrice
,
};
that
.
payAliCallback
(
cbObj
);
},
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
...
...
@@ -916,7 +908,6 @@ export default {
});
},
payAliCallback
(
obj
)
{
console
.
log
(
893
,
obj
);
this
.
request2
(
{
url
:
"/api/AliPay/ALiPayCallBackDmcNotify"
,
...
...
@@ -931,19 +922,23 @@ export default {
},
(
res
)
=>
{
console
.
log
(
"cb"
,
res
);
this
.
submit
=
false
;
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
obj
.
PreferPrice
,
});
},
(
err
)
=>
{
this
.
submit
=
false
;
console
.
log
(
"cb2"
,
err
);
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
});
// uni.redirectTo({
// url: "/pages/jiuzhai/paysuccess?PreferPrice=" + obj.PreferPrice,
// });
setTimeout
(()
=>
{
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/jz_MyOrder"
,
});
},
1000
);
}
);
},
...
...
pages/jiuzhai/jz_SureOrder.vue
View file @
fd5dce1f
...
...
@@ -726,15 +726,23 @@ export default {
if
(
loss
==
1
||
status
==
4
)
{
this
.
orderStatus
.
code
=
-
1
;
this
.
orderStatus
.
text
=
"已取消"
;
this
.
submit
=
false
;
this
.
submitCancel
=
false
;
}
else
if
(
status
==
2
&&
isCancel
!=
1
)
{
this
.
orderStatus
.
code
=
0
;
this
.
orderStatus
.
text
=
"待付款"
;
this
.
submit
=
true
;
this
.
submitCancel
=
true
;
}
else
if
(
status
==
2
&&
isCancel
==
1
)
{
this
.
orderStatus
.
code
=
-
2
;
this
.
orderStatus
.
text
=
"审核中"
;
this
.
submit
=
false
;
this
.
submitCancel
=
false
;
}
else
if
(
status
==
1
)
{
this
.
orderStatus
.
code
=
1
;
this
.
orderStatus
.
text
=
"正常"
;
this
.
submit
=
false
;
this
.
submitCancel
=
false
;
}
},
// #ifdef MP-WEIXIN
...
...
@@ -844,14 +852,13 @@ export default {
tradeNO
:
tradeNO
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
if
(
res
.
resultCode
==
"9000"
)
{
that
.
submit
=
false
;
that
.
initOrderInfo
(
that
.
orderData
.
model
.
OrderId
);
}
else
if
(
res
.
resultCode
==
"6001"
)
{
uni
.
showToast
({
title
:
"支付取消"
,
});
}
let
obj
=
{
TradeNo
:
tradeNO
,
OrderNo
:
item
.
orderNo
,
OrderId
:
item
.
orderId
,
preferPrice
:
item
.
preferPrice
,
};
that
.
payAliCallback
(
obj
);
},
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
...
...
@@ -864,6 +871,41 @@ export default {
},
});
},
payAliCallback
(
obj
)
{
console
.
log
(
893
),
Obj
;
let
that
=
this
;
this
.
request2
(
{
url
:
"/api/AliPay/ALiPayCallBackDmcNotify"
,
data
:
{
OrderNo
:
obj
.
OrderNo
,
OrderId
:
obj
.
OrderId
,
UserId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
,
TradeNo
:
obj
.
TradeNo
,
ProjectType
:
2
,
PreferPrice
:
obj
.
preferPrice
,
},
},
(
res
)
=>
{
console
.
log
(
"cb"
,
res
);
// uni.redirectTo({
// url:
// "/pages/jiuzhai/paysuccess?PreferPrice=" +
// obj.PreferPrice +
// "&isFrom=1",
// });
that
.
submit
=
false
;
that
.
initOrderInfo
(
that
.
orderData
.
model
.
OrderId
);
},
(
err
)
=>
{
console
.
log
(
"cb2"
,
err
);
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
});
}
);
},
// #endif
},
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment