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
41a0daec
Commit
41a0daec
authored
Aug 21, 2020
by
郭志伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/policy_fix' into 'master'
fix:追加支付中遮罩 See merge request
!65
parents
1071ac40
7ea955b2
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
17 deletions
+40
-17
App.vue
src/App.vue
+15
-2
http.js
src/service/http.js
+2
-1
index.js
src/store/index.js
+7
-0
InsurePersonForm.vue
src/views/Goods/Detail/modules/InsurePersonForm.vue
+8
-11
detailPay.mixin.js
src/views/Goods/Detail/modules/detailPay.mixin.js
+8
-3
No files found.
src/App.vue
View file @
41a0daec
...
...
@@ -6,6 +6,9 @@
<div
class=
"loading-container"
v-if=
"isLoading"
>
<cr-loading
class=
"loading"
size=
"24px"
>
加载中...
</cr-loading>
</div>
<div
class=
"loading-container pay"
v-if=
"isPayWait"
>
<cr-loading
class=
"loading"
size=
"24px"
vertical
>
支付中
</cr-loading>
</div>
<login-modal
/>
<auth-from-xyqb
v-if=
"showAuthXyqb !== -1"
/>
<net-error
/>
...
...
@@ -28,7 +31,7 @@ export default {
};
},
computed
:
{
...
mapState
([
"
isLoading
"
,
"
showAuthXyqb
"
])
...
mapState
([
"
isLoading
"
,
"
showAuthXyqb
"
,
"
isPayWait
"
])
},
watch
:
{
$route
(
to
,
from
)
{
...
...
@@ -90,7 +93,7 @@ export default {
display: flex;
justify-content: center;
align-items: center;
z-index: 999
9
;
z-index: 999;
.loading {
padding: 6px;
border-radius: 6px;
...
...
@@ -101,5 +104,15 @@ export default {
color: #fff;
}
}
&.pay {
z-index: 1000;
background-color: #fff;
.loading {
padding: 15px 25px;
@{deep} .cr-loading--text {
margin-top: 25px;
}
}
}
}
</
style
>
src/service/http.js
View file @
41a0daec
...
...
@@ -79,11 +79,12 @@ axios.interceptors.response.use(
if
(
response
.
data
.
code
===
"
0
"
)
return
response
.
data
.
data
;
Notify
({
type
:
"
danger
"
,
message
:
response
.
data
.
msg
||
"
后端服务异常
"
});
store
.
dispatch
(
"
setIsPayWait
"
,
false
);
return
Promise
.
reject
(
response
.
data
);
},
err
=>
{
afterRequest
();
store
.
dispatch
(
"
setIsPayWait
"
,
false
);
// 判断是否取消请求
if
(
err
.
message
===
"
取消重复请求
"
)
{
const
res
=
{
...
...
src/store/index.js
View file @
41a0daec
...
...
@@ -11,6 +11,7 @@ export default new Vuex.Store({
activeIdx
:
0
,
isLoading
:
false
,
isShowLogin
:
false
,
isPayWait
:
false
,
showAuthXyqb
:
isXyqb
?
localStorage
.
get
(
"
xyqbAuthState
"
)
||
1
:
-
1
// 1 已获取信息未授权,2 打开授权弹框, 3 拒绝授权,4 允许授权, -1 非信用钱包环境
},
mutations
:
{
...
...
@@ -23,6 +24,9 @@ export default new Vuex.Store({
setIsShowLogin
(
state
,
value
)
{
state
.
isShowLogin
=
value
;
},
setIsPayWait
(
state
,
value
)
{
state
.
isPayWait
=
value
;
},
setAuthXyqb
(
state
,
value
)
{
state
.
showAuthXyqb
=
value
;
localStorage
.
set
(
"
xyqbAuthState
"
,
value
);
...
...
@@ -38,6 +42,9 @@ export default new Vuex.Store({
setIsShowLogin
({
commit
},
args
)
{
commit
(
"
setIsShowLogin
"
,
args
);
},
setIsPayWait
({
commit
},
args
)
{
commit
(
"
setIsPayWait
"
,
args
);
},
setAuthXyqb
({
commit
},
args
)
{
commit
(
"
setAuthXyqb
"
,
args
);
}
...
...
src/views/Goods/Detail/modules/InsurePersonForm.vue
View file @
41a0daec
...
...
@@ -218,9 +218,6 @@ export default {
this
.
$forceUpdate
();
}
}
},
familyList
()
{
this
.
relationChange
();
}
},
computed
:
{
...
...
@@ -265,24 +262,20 @@ export default {
this
.
selfInfoReadonly
=
true
;
}
});
let
userArray
=
this
.
familyList
.
filter
(
item
=>
{
if
(
item
.
userInfoSecId
===
sessionStorage
.
getItem
(
this
.
detailType
+
"
userInfoSecId
"
))
{
this
.
formData
.
relation
=
""
+
item
.
relation
;
return
item
;
}
});
let
userArray
=
this
.
familyList
.
filter
(
item
=>
item
.
userInfoSecId
===
sessionStorage
.
getItem
(
this
.
detailType
+
"
userInfoSecId
"
)
);
if
(
!
userArray
.
length
)
{
userArray
=
this
.
familyList
.
filter
(
item
=>
item
.
relation
===
+
relation
);
}
else
{
this
.
formData
.
relation
=
sessionStorage
.
getItem
(
this
.
detailType
+
"
relation
"
);
sessionStorage
.
removeItem
(
this
.
detailType
+
"
userInfoSecId
"
);
sessionStorage
.
removeItem
(
this
.
detailType
+
"
relation
"
);
}
let
[
name
,
idNo
,
userInfoSecId
,
socialSecurity
]
=
[
""
,
""
,
""
,
""
];
if
(
relation
===
(
localStorage
.
get
(
this
.
autoSaveKey
)
&&
localStorage
.
get
(
this
.
autoSaveKey
).
relation
)
)
{
sessionStorage
.
removeItem
(
this
.
detailType
+
"
userInfoSecId
"
);
const
{
name
:
cachename
,
idNo
:
cacheidNo
,
...
...
@@ -329,6 +322,7 @@ export default {
//
}
}
// sessionStorage.removeItem(this.detailType + "relation");
},
async
getFamilyList
()
{
this
.
mongoToken
=
localStorage
.
get
(
"
mongoToken
"
);
...
...
@@ -341,6 +335,9 @@ export default {
this
.
getSaveInfoHandler
(
this
.
autoSaveKey
,
AUTO_SAVE_TARGET
);
}
else
{
let
relation
=
this
.
formData
.
relation
;
if
(
sessionStorage
.
getItem
(
this
.
detailType
+
"
relation
"
))
{
relation
=
sessionStorage
.
getItem
(
this
.
detailType
+
"
relation
"
);
}
(
this
.
showAuthXyqb
||
this
.
mongoToken
)
&&
this
.
relationChange
(
relation
);
}
}
...
...
src/views/Goods/Detail/modules/detailPay.mixin.js
View file @
41a0daec
...
...
@@ -19,8 +19,9 @@ export default {
this
.
tradeType
=
this
.
customTradeType
??
(
isXyqb
?
"
MWEB
"
:
isWeixinBrower
?
"
JSAPI
"
:
"
MWEB
"
);
},
methods
:
{
...
mapActions
([
"
setIsLoading
"
]),
...
mapActions
([
"
setIsLoading
"
,
"
setIsPayWait
"
]),
async
generateOrder
()
{
this
.
setIsLoading
(
true
);
const
res
=
await
placeOrder
.
create
({
...
this
.
subFormData
});
...
...
@@ -30,6 +31,7 @@ export default {
}
},
async
goPay
()
{
this
.
setIsLoading
(
false
);
const
{
tradeType
,
orderInfo
,
openId
}
=
this
;
const
{
payOrderNo
,
payType
}
=
orderInfo
;
if
(
!
payOrderNo
)
{
...
...
@@ -44,6 +46,7 @@ export default {
if
(
openId
&&
tradeType
===
"
JSAPI
"
)
{
params
.
openId
=
openId
;
}
this
.
setIsPayWait
(
true
);
const
res
=
await
placeOrder
.
pay
(
params
);
if
(
res
)
{
let
payInfo
=
{
...
...
@@ -61,19 +64,21 @@ export default {
payByWay
(
tradeType
,
payInfo
).
then
(()
=>
{
this
.
getPayResult
();
});
}
else
{
this
.
setIsPayWait
(
false
);
}
},
getPayResult
()
{
const
{
payOrderNo
,
orderNo
}
=
this
.
orderInfo
;
this
.
setIsLoading
(
true
);
placeOrder
.
polling
({
payOrderNo
,
payOrderType
:
1
}).
then
(
payRes
=>
{
if
(
!
payRes
.
result
&&
payRes
.
payState
===
2
)
{
this
.
payTimer
=
setTimeout
(()
=>
{
this
.
getPayResult
();
},
3000
);
}
else
{
this
.
setIsPayWait
(
false
);
this
.
setIsLoading
(
false
);
this
.
$router
.
push
({
path
:
"
/policy/detail/
"
+
orderNo
});
this
.
$router
.
replace
({
path
:
"
/policy/detail/
"
+
orderNo
});
}
});
}
...
...
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