Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cauchy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
cauchy-ui
Commits
ea975873
Commit
ea975873
authored
Dec 17, 2021
by
郭志伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/orderPaymentStatus' into 'master'
Feature/order payment status See merge request
!15
parents
c9bc8ed6
f2cc15a5
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
6 deletions
+44
-6
pay.api.js
src/api/pay.api.js
+3
-3
httpDecorator.js
src/service/httpDecorator.js
+2
-1
index.vue
src/views/orderDetail/index.vue
+16
-0
index.vue
src/views/orderList/index.vue
+16
-0
STATIC_DATA.js
src/views/pay/STATIC_DATA.js
+2
-0
index.vue
src/views/pay/index.vue
+5
-2
No files found.
src/api/pay.api.js
View file @
ea975873
...
...
@@ -8,7 +8,7 @@ const queryPayInfo = function(data) {
};
const
prepay
=
async
function
(
data
)
{
const
scDeviceId
=
await
saDeviceId
();
return
request
.
post
(
`
${
talosHost
}
/open/checkout/prepay`
,
data
,
{
return
request
.
post
(
`
${
talosHost
}
/open/checkout/
v2/
prepay`
,
data
,
{
customHeader
:
{
scDeviceId
},
...
...
@@ -18,7 +18,7 @@ const prepay = async function(data) {
const
pay
=
async
function
(
data
)
{
const
scDeviceId
=
await
saDeviceId
();
return
request
.
post
(
`
${
talosHost
}
/open/checkout/pay`
,
data
,
{
return
request
.
post
(
`
${
talosHost
}
/open/checkout/
v2/
pay`
,
data
,
{
customHeader
:
{
scDeviceId
},
...
...
@@ -27,7 +27,7 @@ const pay = async function(data) {
};
const
queryPayStatus
=
function
(
data
)
{
return
request
.
post
(
`
${
talosHost
}
/open/checkout/pay_status/query`
,
data
);
return
request
.
post
(
`
${
talosHost
}
/open/checkout/
v2/
pay_status/query`
,
data
);
};
const
sendSms
=
function
(
data
)
{
...
...
src/service/httpDecorator.js
View file @
ea975873
...
...
@@ -8,7 +8,8 @@ const http = new HttpRequest(
{
headers
:
{
'
x-user-terminal
'
:
'
H5
'
,
version
:
appVersion
||
'
7900
'
version
:
appVersion
||
'
7900
'
,
'
qg-tenant-id
'
:
560761
}
},
function
(
msg
)
{
...
...
src/views/orderDetail/index.vue
View file @
ea975873
...
...
@@ -194,6 +194,14 @@ export default {
'
https://kdspstatic.91xr.cn/kdsp/mine/service/customer-service/customer-service-prod2.html
'
;
},
openCancelPopup
()
{
if
(
this
.
orderInfo
.
orderStatusInfo
.
paymentInProgress
)
{
this
.
$dialog
({
message
:
'
订单支付处理中,请稍后再试
'
,
confirmButtonText
:
'
知道了
'
,
showCancelButton
:
false
});
return
;
}
this
.
$dialog
({
title
:
'
取消订单
'
,
message
:
'
您真的要取消吗?
'
,
...
...
@@ -217,6 +225,14 @@ export default {
}
},
toPay
()
{
if
(
this
.
orderInfo
.
orderStatusInfo
.
paymentInProgress
)
{
this
.
$dialog
({
message
:
'
支付中,请勿重复支付
'
,
confirmButtonText
:
'
知道了
'
,
showCancelButton
:
false
});
return
;
}
this
.
$router
.
push
({
path
:
'
/pay
'
,
query
:
{
orderNo
:
this
.
orderNo
}
});
},
toGoods
()
{
...
...
src/views/orderList/index.vue
View file @
ea975873
...
...
@@ -109,6 +109,14 @@ export default {
},
toPay
()
{
if
(
this
.
currentOrder
.
paymentInProgress
)
{
this
.
$dialog
({
message
:
'
支付中,请勿重复支付
'
,
confirmButtonText
:
'
知道了
'
,
showCancelButton
:
false
});
return
;
}
this
.
$router
.
push
({
path
:
'
/pay
'
,
query
:
{
orderNo
:
this
.
currentOrder
.
orderNo
}
});
},
toGoods
()
{
...
...
@@ -123,6 +131,14 @@ export default {
this
.
$set
(
this
.
navList
[
this
.
currentTab
],
key
,
val
);
},
orderCancelPopup
()
{
if
(
this
.
currentOrder
.
paymentInProgress
)
{
this
.
$dialog
({
message
:
'
订单支付处理中,请稍后再试
'
,
confirmButtonText
:
'
知道了
'
,
showCancelButton
:
false
});
return
;
}
this
.
$dialog
({
title
:
'
取消订单
'
,
message
:
'
您真的要取消吗?
'
,
...
...
src/views/pay/STATIC_DATA.js
View file @
ea975873
...
...
@@ -48,6 +48,7 @@ const IS_CREDIT_PAY = method =>
const
PAYMENT_CODE_PAY
=
1
;
// 支付密码
const
SMS_VERIFICATION_CODE_PAY
=
2
;
//短信验证码
const
FACE_VERIFICATION_CODE_PAY
=
4
;
//人脸验证
const
CENTER_CODE_PAY
=
5
;
//支付中
const
PAY_SUCCESS
=
3
;
// 支付成功
const
PAY_PAYING
=
2
;
//支付中
...
...
@@ -172,5 +173,6 @@ export {
ACCOUNT_APPLY_AUDIT_FAIL
,
SMS_VERIFICATION_CODE_PAY
,
FACE_VERIFICATION_CODE_PAY
,
CENTER_CODE_PAY
,
payTypeMap
};
src/views/pay/index.vue
View file @
ea975873
...
...
@@ -119,7 +119,8 @@ import {
creditPayStatusType
,
ACCOUNT_APPLY_SUCCESS
,
SMS_VERIFICATION_CODE_PAY
,
//短信验证码
FACE_VERIFICATION_CODE_PAY
FACE_VERIFICATION_CODE_PAY
,
CENTER_CODE_PAY
}
from
'
./STATIC_DATA
'
;
import
{
pay
,
...
...
@@ -253,7 +254,7 @@ export default {
async
queryPayInfo
()
{
const
[
data
,
error
]
=
await
queryPayInfo
({
orderNo
:
this
.
orderNo
,
isUsedMergePayMethod
:
cookies
.
get
(
'
source
'
)
!==
'
tob
'
// 是否需要组合支付,true需要。false不需要
isUsedMergePayMethod
:
false
// 是否需要组合支付,true需要。false不需要
});
if
(
error
&&
codeArr
.
indexOf
(
error
?.
response
?.
businessCode
)
<
0
)
{
this
.
payResult
(
'
Fail
'
);
...
...
@@ -521,6 +522,8 @@ export default {
});
this
.
close
();
this
.
goOcr
();
}
else
if
(
creditPayStatus
===
CENTER_CODE_PAY
)
{
this
.
payResult
(
'
Waiting
'
);
}
},
payResult
(
type
,
error
)
{
...
...
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