Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
ztx_wx_gzt
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f527b6cd
authored
2026-04-17 17:12:37 +0800
by
张猛
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
支付
1 parent
7caf72e2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
47 deletions
common/api.js
common/pay.js
config.js
level/addApply.vue
level/paymentDetail.vue
myCenter/payOrder.vue
common/api.js
View file @
f527b6c
...
...
@@ -250,7 +250,8 @@ export function insertSinglePay(data) {
return
request
({
url
:
'/person/paymentNew/insertSinglePay'
,
method
:
'post'
,
params
:
data
params
:
data
,
showLoading
:
false
})
}
...
...
@@ -1541,6 +1542,7 @@ export function certifiedNew(renewYear) {
return
request
({
url
:
`/system/certifiedNew/commit?renewYear=
${
renewYear
}
`
,
method
:
'post'
,
showLoading
:
false
})
}
...
...
@@ -1629,7 +1631,8 @@ export function getMyStatus() {
export
function
goPay
(
id
,
payType
)
{
return
request
({
url
:
`/person/paymentRangeNew/pay/
${
id
}
/
${
payType
}
`
,
method
:
'post'
method
:
'post'
,
showLoading
:
false
})
}
...
...
@@ -1839,7 +1842,8 @@ export function commitJiExam(params) {
return
request
({
url
:
`/exam/info/commitJi/
${
params
.
id
}
/
${
params
.
addresId
}
/
${
params
.
payType
}
`
,
method
:
'post'
,
params
params
,
showLoading
:
false
})
}
...
...
common/pay.js
View file @
f527b6c
...
...
@@ -31,6 +31,7 @@ async function minShengPay(orderId, encryptedData) {
title
:
'生成支付...'
,
mask
:
true
})
console
.
log
(
1111
)
// 参数校验
if
(
!
orderId
)
{
...
...
@@ -219,7 +220,6 @@ function invokeWechatPayment(payParams, orderId) {
})
},
fail
:
async
(
err
)
=>
{
debugger
// 用户取消支付
if
(
err
.
errMsg
?.
includes
(
'cancel'
))
{
await
handleUserCancel
(
orderId
)
...
...
config.js
View file @
f527b6c
// dev
//
const baseUrl_api = 'http://192.168.1.137:8787'
const
baseUrl_api
=
'http://tk001.wxjylt.com/stage-api'
const
baseUrl_api
=
'http://192.168.1.137:8787'
//
const baseUrl_api = 'http://tk001.wxjylt.com/stage-api'
const
loginImage_api
=
'http://tk001.wxjylt.com/stage-api'
const
payUrl
=
'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do'
...
...
level/addApply.vue
View file @
f527b6c
This diff is collapsed.
Click to expand it.
level/paymentDetail.vue
View file @
f527b6c
...
...
@@ -213,13 +213,16 @@ const handleSubmit = async () => {
content
:
`确定提交订单吗?`
,
success
:
async
(
res
)
=>
{
if
(
res
.
confirm
)
{
uni
.
showLoading
({
title
:
'提交中...'
});
uni
.
showLoading
({
title
:
'支付中...'
,
mask
:
true
})
try
{
const
commitRes
=
await
api
.
commitJiExam
({
addresId
:
selectedAddress
.
value
.
id
,
id
:
examId
.
value
,
payType
:
'2'
})
;
})
if
(
commitRes
.
data
&&
commitRes
.
data
.
payResult
.
encryptedData
)
{
const
res
=
await
minShengPay
(
commitRes
.
data
.
orderId
,
commitRes
.
data
.
payResult
.
encryptedData
)
if
(
res
==
'OK'
)
{
...
...
@@ -233,44 +236,6 @@ const handleSubmit = async () => {
}
}
// if (commitRes.data && commitRes.data.orderId) {
// // 有支付流程,调用支付
// const payRes = await api.payJiExam(commitRes.data.orderId);
// uni.hideLoading();
//
// if (payRes.data && payRes.data.payResult && payRes.data.payResult.encryptedData) {
// // 调用支付
// uni.requestPayment({
// provider: 'wxpay',
// timeStamp: payRes.data.payResult.timeStamp,
// nonceStr: payRes.data.payResult.nonceStr,
// package: payRes.data.payResult.package,
// signType: payRes.data.payResult.signType,
// paySign: payRes.data.payResult.paySign,
// success: () => {
// uni.showToast({title: '支付成功', icon: 'success'});
// setTimeout(() => {
// uni.navigateBack();
// }, 1500);
// },
// fail: () => {
// uni.showToast({title: '支付失败', icon: 'none'});
// }
// });
// } else {
// // 无需支付,直接成功
// uni.showToast({title: '提交成功', icon: 'success'});
// setTimeout(() => {
// uni.navigateBack();
// }, 1500);
// }
// } else {
// uni.hideLoading();
// uni.showToast({title: '提交成功', icon: 'success'});
// setTimeout(() => {
// uni.navigateBack();
// }, 1500);
// }
}
catch
(
e
)
{
uni
.
hideLoading
();
console
.
error
(
'提交失败'
,
e
);
...
...
myCenter/payOrder.vue
View file @
f527b6c
...
...
@@ -108,7 +108,7 @@ async function handlePay() {
try
{
payLoading
.
value
=
true
uni
.
show
Toast
({
uni
.
show
Loading
({
title
:
'支付中...'
,
mask
:
true
})
...
...
@@ -134,6 +134,7 @@ async function handlePay() {
// 跳转到支付成功页
}
catch
(
err
)
{
console
.
log
(
err
)
const
errMsg
=
err
?.
data
?.
msg
||
err
?.
message
||
'支付失败,请稍后重试'
uni
.
showToast
({
title
:
errMsg
,
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment