Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-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
mongo-ui
Commits
19e203df
Commit
19e203df
authored
Aug 29, 2020
by
郝聪敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/fix_pay_bug' into 'master'
fix: 保单详情页调用支付结果 See merge request
!131
parents
430f52f8
8d649dce
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
16 deletions
+20
-16
http.js
src/service/http.js
+0
-1
detailPay.mixin.js
src/views/Goods/Detail/modules/detailPay.mixin.js
+11
-6
index.vue
src/views/Policy/Detail/index.vue
+8
-8
FamilyForm.vue
src/views/User/Family/modules/FamilyForm.vue
+1
-1
No files found.
src/service/http.js
View file @
19e203df
...
...
@@ -100,7 +100,6 @@ axios.interceptors.response.use(
return
Promise
.
resolve
(
res
);
}
console
.
error
(
"
axios:
"
,
err
.
message
,
err
);
// 提示网络错误时尝试重试
if
(
err
.
message
===
"
Network Error
"
&&
...
...
src/views/Goods/Detail/modules/detailPay.mixin.js
View file @
19e203df
...
...
@@ -89,7 +89,7 @@ export default {
this
.
isPayWait
=
false
;
}
},
getPayResult
()
{
getPayResult
(
expectResult
)
{
const
{
payOrderNo
,
payType
,
orderNo
}
=
this
.
orderInfo
;
placeOrder
.
polling
({
payOrderNo
,
payOrderType
:
payType
||
1
}).
then
(
async
payRes
=>
{
if
(
!
payRes
.
result
&&
payRes
.
payState
===
2
)
{
...
...
@@ -97,17 +97,22 @@ export default {
this
.
getPayResult
();
},
3000
);
}
else
{
// 保单详情页支付需重新调用保单接口
if
(
this
.
$route
.
name
===
"
PolicyDetail
"
)
{
this
.
getPolicy
();
return
;
}
// expectResult为true时期望支付结果成功,否则继续执行
if
(
expectResult
&&
!
payRes
?.
result
)
return
;
// 清除定时器
if
(
this
.
timer
)
clearInterval
(
this
.
timer
);
// 根据状态跳转页面
const
status
=
await
this
.
getPolicyStatus
(
orderNo
);
if
([
"
6.2-3
"
,
"
6.1-3
"
].
includes
(
status
))
{
this
.
$router
.
replace
(
`/policy/success/
${
orderNo
}
`
);
return
;
}
// 保单详情页支付需重新调用保单接口
if
(
this
.
$route
.
name
===
"
PolicyDetail
"
)
{
this
.
getPolicy
();
return
;
}
this
.
$router
.
replace
({
path
:
"
/policy/detail/
"
+
orderNo
+
"
?isWxH5=
"
+
this
.
orderInfo
.
isWxH5
||
""
});
...
...
src/views/Policy/Detail/index.vue
View file @
19e203df
...
...
@@ -9,13 +9,12 @@
import
Guarantee
from
"
./Types/Guarantee
"
;
import
Refund
from
"
./Types/Refund
"
;
import
policyStatusMixin
from
"
../mixin/policyStatus.mixin
"
;
import
detailPayMixin
from
"
@/views/Goods/Detail/modules/detailPay.mixin
"
;
import
{
getPolicyDetail
}
from
"
@/api/policy
"
;
let
timer
=
null
;
export
default
{
name
:
"
PolicyList
"
,
mixins
:
[
policyStatusMixin
],
mixins
:
[
policyStatusMixin
,
detailPayMixin
],
provide
()
{
return
{
getPolicy
:
this
.
getPolicy
...
...
@@ -31,19 +30,20 @@ export default {
cardConfig
:
{
component
:
""
}
}
},
timer
:
null
};
},
async
created
()
{
await
this
.
getPolicy
();
if
(
this
.
$route
?.
query
?.
isWxH5
&&
this
.
policy
?.
cardConfig
?.
key
===
"
4
"
)
{
if
(
this
.
$route
?.
query
?.
isWxH5
)
{
this
.
$dialog
({
message
:
"
请确认是否已经完成了微信免密支付签约
"
,
onCancel
:
()
=>
{
t
imer
=
setInterval
(
this
.
getPolicy
,
3000
);
t
his
.
timer
=
setInterval
(()
=>
this
.
getPayResult
(
true
)
,
3000
);
},
onConfirm
:
()
=>
{
t
imer
=
setInterval
(
this
.
getPolicy
,
3000
);
t
his
.
timer
=
setInterval
(()
=>
this
.
getPayResult
(
true
)
,
3000
);
}
});
}
...
...
@@ -55,7 +55,7 @@ export default {
}
},
beforeDestroy
()
{
clear
Timeout
(
timer
);
clear
Interval
(
this
.
timer
);
}
};
</
script
>
...
...
src/views/User/Family/modules/FamilyForm.vue
View file @
19e203df
...
...
@@ -233,7 +233,7 @@ export default {
params
.
userInfoSecId
=
this
.
information
?.
userInfoSecId
;
await
updateFamily
(
params
);
this
.
$notify
({
type
:
"
success
"
,
message
:
"
修改成功
"
});
this
.
$router
.
push
(
"
/user/family
"
);
this
.
$router
.
back
(
-
1
);
}
},
onConfirm
(
picker
,
res
)
{
...
...
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