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
2838c5d2
Commit
2838c5d2
authored
Aug 27, 2020
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 顾问下单查询优化
parent
67bd3dc7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
10 deletions
+36
-10
index.vue
src/views/Consultant/Buy/index.vue
+5
-3
index.vue
src/views/Consultant/index.vue
+20
-3
InsurePersonForm.vue
src/views/Goods/Detail/modules/InsurePersonForm.vue
+11
-4
No files found.
src/views/Consultant/Buy/index.vue
View file @
2838c5d2
...
...
@@ -222,7 +222,7 @@ export default {
this
.
updateRemain
();
},
methods
:
{
...
mapActions
([
"
setIsShowLogin
"
]),
...
mapActions
([
"
setIsShowLogin
"
,
"
setIsPayWait
"
]),
checkLogin
()
{
if
(
!
this
.
isLogin
)
{
this
.
setIsShowLogin
(
true
);
...
...
@@ -241,6 +241,7 @@ export default {
}
},
async
generateOrder
()
{
this
.
setIsPayWait
(
true
);
const
res
=
await
create
();
if
(
res
)
{
this
.
consultantOrderNo
=
res
.
consultantOrderNo
;
...
...
@@ -249,18 +250,19 @@ export default {
}
},
async
goPay
()
{
this
.
setIsPayWait
(
true
);
try
{
const
res
=
await
goPay
({
tradeType
:
this
.
tradeType
,
openId
:
this
.
openId
});
if
(
res
)
{
payByWay
(
this
.
tradeType
,
res
.
payInfo
).
then
(()
=>
{
setTimeout
(()
=>
{
this
.
$parent
.
getOrderInfo
();
this
.
$parent
.
getOrderInfo
(
true
);
},
1000
);
});
}
}
catch
(
error
)
{
setTimeout
(()
=>
{
this
.
$parent
.
getOrderInfo
();
this
.
$parent
.
getOrderInfo
(
true
);
},
1000
);
}
}
...
...
src/views/Consultant/index.vue
View file @
2838c5d2
...
...
@@ -17,9 +17,9 @@ import Buy from "./Buy";
import
Success
from
"
./Success
"
;
import
Question
from
"
./Question
"
;
import
Exclusive
from
"
./Exclusive
"
;
import
{
mapState
}
from
"
vuex
"
;
import
{
mapState
,
mapActions
}
from
"
vuex
"
;
import
localStorage
from
"
@/service/localStorage
"
;
import
{
getCulOrder
}
from
"
@/api/consultant
"
;
import
{
getCulOrder
,
getPayState
}
from
"
@/api/consultant
"
;
export
default
{
name
:
"
Consultant
"
,
components
:
{
...
...
@@ -60,16 +60,33 @@ export default {
this
.
getOrderInfo
();
},
methods
:
{
...
mapActions
([
"
setIsPayWait
"
]),
// 1-待支付,3-支付成功,4-问卷收集完成,方案配置中,5-方案配置完成, -1 -支付失败订单关闭,-2 -支付超过1小时订单关闭,-3 -订单关闭
async
getOrderInfo
()
{
async
getOrderInfo
(
checkPayState
=
false
)
{
if
(
!
this
.
isLogin
)
return
;
this
.
showQuestion
=
false
;
const
res
=
await
getCulOrder
();
if
(
res
)
{
this
.
orderInfo
=
res
;
if
(
checkPayState
&&
res
.
state
<
3
)
{
this
.
getPayState
();
}
else
{
this
.
setIsPayWait
(
false
);
}
this
.
$forceUpdate
();
}
},
async
getPayState
()
{
const
res
=
await
getPayState
();
if
(
res
.
state
===
2
)
{
setTimeout
(()
=>
{
this
.
getPayState
();
},
3000
);
}
else
{
this
.
setIsPayWait
(
false
);
this
.
getOrderInfo
();
}
},
changeQuestion
()
{
this
.
showQuestion
=
true
;
},
...
...
src/views/Goods/Detail/modules/InsurePersonForm.vue
View file @
2838c5d2
...
...
@@ -262,11 +262,18 @@ export default {
handler
(
val
)
{
if
(
val
===
4
&&
this
.
userInfo
.
phoneNoMask
===
"
点击登录
"
)
{
const
xyqbUserInfo
=
localStorage
.
get
(
"
xyqbUserInfo
"
);
this
.
formData
.
selfName
=
xyqbUserInfo
.
nameMask
;
this
.
formData
.
selfIdNo
=
xyqbUserInfo
.
idNoMask
;
this
.
formData
.
selfPhone
=
xyqbUserInfo
.
phoneNoMask
;
const
{
nameMask
,
idNoMask
,
phoneNoMask
}
=
xyqbUserInfo
;
if
(
nameMask
)
{
this
.
formData
.
selfName
=
nameMask
;
}
if
(
idNoMask
)
{
this
.
formData
.
selfIdNo
=
idNoMask
;
}
if
(
phoneNoMask
)
{
this
.
formData
.
selfPhone
=
phoneNoMask
;
}
this
.
xyqbAuthState
=
localStorage
.
get
(
"
xyqbAuthState
"
);
this
.
selfInfoReadonly
=
true
;
this
.
selfInfoReadonly
=
nameMask
&&
idNoMask
&&
phoneNoMask
;
this
.
$forceUpdate
();
}
}
...
...
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