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
1b3c469f
Commit
1b3c469f
authored
Jul 20, 2021
by
FE-安焕焕
👣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复退出登录支付跳转登录失败问题
parent
76841767
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
pay.api.js
src/api/pay.api.js
+4
-2
STATIC_DATA.js
src/views/pay/STATIC_DATA.js
+3
-1
index.vue
src/views/pay/index.vue
+11
-4
No files found.
src/api/pay.api.js
View file @
1b3c469f
...
@@ -11,7 +11,8 @@ const prepay = async function(data) {
...
@@ -11,7 +11,8 @@ const prepay = async function(data) {
return
request
.
post
(
`
${
talosHost
}
/open/checkout/prepay`
,
data
,
{
return
request
.
post
(
`
${
talosHost
}
/open/checkout/prepay`
,
data
,
{
customHeader
:
{
customHeader
:
{
scDeviceId
scDeviceId
}
},
hideToast
:
true
});
});
};
};
...
@@ -20,7 +21,8 @@ const pay = async function(data) {
...
@@ -20,7 +21,8 @@ const pay = async function(data) {
return
request
.
post
(
`
${
talosHost
}
/open/checkout/pay`
,
data
,
{
return
request
.
post
(
`
${
talosHost
}
/open/checkout/pay`
,
data
,
{
customHeader
:
{
customHeader
:
{
scDeviceId
scDeviceId
}
},
hideToast
:
true
});
});
};
};
...
...
src/views/pay/STATIC_DATA.js
View file @
1b3c469f
...
@@ -9,10 +9,12 @@ const payTypeE = [
...
@@ -9,10 +9,12 @@ const payTypeE = [
'
PD_YXMMAEC_UserClickCashierSelectWechatPay
'
'
PD_YXMMAEC_UserClickCashierSelectWechatPay
'
];
];
const
codeArr
=
[
'
4034
'
,
'
4035
'
,
'
4036
'
];
const
codeArr
=
[
'
4034
'
,
'
4035
'
,
'
4036
'
,
'
3005
'
,
'
6049
'
];
// (4034, "密码错误"),
// (4034, "密码错误"),
// (4035, "密码重试超限,无法验证"),
// (4035, "密码重试超限,无法验证"),
// (4036, "验证码错误");
// (4036, "验证码错误");
// (3005, "组合支付方式被锁定")
// (6049, "token过期")
const
payStatus
=
[
3
,
5
];
// 展示支付文案
const
payStatus
=
[
3
,
5
];
// 展示支付文案
const
creditStatus
=
[
1
,
2
];
//展示开通文案
const
creditStatus
=
[
1
,
2
];
//展示开通文案
...
...
src/views/pay/index.vue
View file @
1b3c469f
...
@@ -233,6 +233,7 @@ export default {
...
@@ -233,6 +233,7 @@ export default {
this
.
selectedCoupon
=
displayInfo
.
payCouponInfo
.
optimalPayCoupon
;
this
.
selectedCoupon
=
displayInfo
.
payCouponInfo
.
optimalPayCoupon
;
this
.
selectedCoupon
.
id
=
this
.
selectedCoupon
.
pickupId
;
this
.
selectedCoupon
.
id
=
this
.
selectedCoupon
.
pickupId
;
this
.
showCoupon
=
displayInfo
.
payCouponInfo
.
optimalType
===
3
;
this
.
showCoupon
=
displayInfo
.
payCouponInfo
.
optimalType
===
3
;
console
.
log
(
this
.
selectedCoupon
,
'
selectedCoupon
'
);
}
}
this
.
payContractInfo
=
displayInfo
.
payContractInfo
||
{};
this
.
payContractInfo
=
displayInfo
.
payContractInfo
||
{};
for
(
const
p
of
payMethods
)
{
for
(
const
p
of
payMethods
)
{
...
@@ -415,15 +416,21 @@ export default {
...
@@ -415,15 +416,21 @@ export default {
});
});
return
;
return
;
}
}
if
(
error
?.
response
?.
businessCode
===
'
3005
'
)
{
if
(
error
?.
message
===
'
用户额度小于订单需支付额度
'
)
{
/* 已锁定组合支付,不能切换其他支付方式 */
this
.
$dialog
({
message
:
'
您的消费额度不足,请更换支付方式!
'
,
confirmButtonText
:
'
知道了
'
,
showCancelButton
:
false
,
confirmButtonColor
:
'
#EC1500
'
});
return
;
return
;
}
}
if
(
codeArr
.
indexOf
(
error
.
response
.
businessCode
)
<
0
)
{
if
(
codeArr
.
indexOf
(
error
?.
response
?
.
businessCode
)
<
0
)
{
this
.
payResult
(
'
Fail
'
,
error
.
message
);
this
.
payResult
(
'
Fail
'
,
error
.
message
);
return
;
return
;
}
}
this
.
error
=
error
.
message
;
// error?.message && this.$toast(error?.message);
this
.
error
=
error
?.
message
;
this
.
retrieve
();
this
.
retrieve
();
return
;
return
;
}
}
...
...
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