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
219ef121
Commit
219ef121
authored
Jul 20, 2021
by
FE-安焕焕
👣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ocr修改
parent
cd086c0d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
index.vue
src/views/pay/index.vue
+16
-8
No files found.
src/views/pay/index.vue
View file @
219ef121
...
@@ -206,6 +206,9 @@ export default {
...
@@ -206,6 +206,9 @@ export default {
mounted
()
{
mounted
()
{
this
.
orderNo
=
this
.
$route
.
query
.
orderNo
||
cookies
.
get
(
'
orderNo
'
)?.
orderNo
;
this
.
orderNo
=
this
.
$route
.
query
.
orderNo
||
cookies
.
get
(
'
orderNo
'
)?.
orderNo
;
cookies
.
set
(
'
orderNo
'
,
{
orderNo
:
this
.
orderNo
});
cookies
.
set
(
'
orderNo
'
,
{
orderNo
:
this
.
orderNo
});
if
(
this
.
$route
?.
query
?.
ocrflag
||
cookies
.
get
(
'
ocrflag
'
))
{
this
.
pay
(
cookies
.
get
(
'
paramsData
'
),
'
ocr
'
);
}
const
vccToken
=
localStorage
.
get
(
'
vccToken
'
);
const
vccToken
=
localStorage
.
get
(
'
vccToken
'
);
Current_Url
=
`
${
window
.
location
.
origin
}
/payWaiting?vccToken=
${
vccToken
}
&orderNo=
${
this
.
orderNo
}
`
;
Current_Url
=
`
${
window
.
location
.
origin
}
/payWaiting?vccToken=
${
vccToken
}
&orderNo=
${
this
.
orderNo
}
`
;
this
.
queryPayInfo
();
this
.
queryPayInfo
();
...
@@ -365,19 +368,19 @@ export default {
...
@@ -365,19 +368,19 @@ export default {
this
.
accountS
.
fn
();
this
.
accountS
.
fn
();
},
1000
),
},
1000
),
/* 预支付 */
/* 预支付 */
async
pay
(
params
)
{
async
pay
(
params
,
isOcr
)
{
// 组合支付的提示和享花卡支付逻辑
// 组合支付的提示和享花卡支付逻辑
if
(
this
.
overtime
)
{
if
(
this
.
overtime
)
{
this
.
$toast
(
'
订单已超时!
'
);
this
.
$toast
(
'
订单已超时!
'
);
return
;
return
;
}
}
this
.
error
=
''
;
this
.
error
=
''
;
if
(
this
.
isShowProtocol
&&
!
this
.
isCheckAgreement
)
{
if
(
this
.
isShowProtocol
&&
!
this
.
isCheckAgreement
&&
!
isOcr
)
{
this
.
$toast
(
'
请仔细阅读并同意相关协议
'
);
this
.
$toast
(
'
请仔细阅读并同意相关协议
'
);
return
;
return
;
}
}
this
.
setAmount
();
this
.
setAmount
();
if
(
!
params
&&
!
this
.
isDetention
&&
IS_THIRD_PAY
(
this
.
payType
))
{
if
(
!
params
&&
!
this
.
isDetention
&&
IS_THIRD_PAY
(
this
.
payType
)
&&
!
isOcr
)
{
this
.
isDetention
=
true
;
this
.
isDetention
=
true
;
isDetentionFn
.
call
(
this
);
isDetentionFn
.
call
(
this
);
return
;
return
;
...
@@ -400,7 +403,11 @@ export default {
...
@@ -400,7 +403,11 @@ export default {
payCouponId
:
this
.
selectedCoupon
.
id
||
''
,
payCouponId
:
this
.
selectedCoupon
.
id
||
''
,
mergePayPretreatmentId
:
this
.
mergePayPretreatmentInfo
?.
mergePayPretreatmentId
mergePayPretreatmentId
:
this
.
mergePayPretreatmentInfo
?.
mergePayPretreatmentId
};
};
const
[
data
,
error
]
=
params
?
await
pay
(
paramsData
)
:
await
prepay
(
paramsData
);
const
[
data
,
error
]
=
params
?
isOcr
?
await
pay
(
params
)
:
await
pay
(
paramsData
)
:
await
prepay
(
paramsData
);
/* 支付失败 */
/* 支付失败 */
if
(
error
)
{
if
(
error
)
{
if
(
error
?.
response
?.
businessCode
===
'
3001
'
)
{
if
(
error
?.
response
?.
businessCode
===
'
3001
'
)
{
...
@@ -457,6 +464,7 @@ export default {
...
@@ -457,6 +464,7 @@ export default {
return
;
return
;
}
else
if
(
creditPayStatus
===
FACE_VERIFICATION_CODE_PAY
)
{
}
else
if
(
creditPayStatus
===
FACE_VERIFICATION_CODE_PAY
)
{
/* 人脸鉴权 */
/* 人脸鉴权 */
cookies
.
set
(
'
paramsData
'
,
paramsData
);
this
.
goOcr
();
this
.
goOcr
();
}
}
},
},
...
@@ -530,11 +538,11 @@ export default {
...
@@ -530,11 +538,11 @@ export default {
type
:
'
xyqb
'
,
type
:
'
xyqb
'
,
orderNo
:
this
.
orderNo
,
orderNo
:
this
.
orderNo
,
flowOrderNo
:
this
.
flowOrderNo
,
flowOrderNo
:
this
.
flowOrderNo
,
callBackUrl
:
window
.
location
.
href
callBackUrl
:
`
${
window
.
location
.
href
}
&ocrflag=1`
});
});
if
(
!
res
.
url
)
return
;
cookies
.
set
(
'
ocrflag
'
,
1
)
;
console
.
log
(
res
)
;
if
(
!
res
.
callBackUrl
)
return
;
window
.
location
.
href
=
res
.
u
rl
;
window
.
location
.
href
=
res
.
callBackU
rl
;
},
},
selectCouponItem
(
isSelected
,
couponInfo
)
{
selectCouponItem
(
isSelected
,
couponInfo
)
{
registeredEvents
(
'
PD_YXMMACP_UserClickCouponPopupWindowCoupon
'
,
{
registeredEvents
(
'
PD_YXMMACP_UserClickCouponPopupWindowCoupon
'
,
{
...
...
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