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
e2dfd947
Commit
e2dfd947
authored
Aug 27, 2020
by
郭志伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/goods' into 'master'
Fix/goods See merge request
!103
parents
bc04df4b
97b6c50a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
125 additions
and
105 deletions
+125
-105
AuthFromXyqb.vue
src/components/AuthFromXyqb.vue
+13
-0
PopupWithIframe.vue
src/components/PopupWithIframe.vue
+3
-33
index.vue
src/views/Consultant/Buy/index.vue
+5
-3
index.vue
src/views/Consultant/index.vue
+20
-3
AIDetail.vue
src/views/Goods/Detail/AIDetail.vue
+8
-4
CIIDetail.vue
src/views/Goods/Detail/CIIDetail.vue
+8
-4
MIDetail.vue
src/views/Goods/Detail/MIDetail.vue
+8
-4
InsurePersonForm.vue
src/views/Goods/Detail/modules/InsurePersonForm.vue
+58
-52
index.less
src/views/Goods/Inform/index.less
+2
-2
No files found.
src/components/AuthFromXyqb.vue
View file @
e2dfd947
...
@@ -46,6 +46,19 @@ export default {
...
@@ -46,6 +46,19 @@ export default {
immediate
:
true
,
immediate
:
true
,
handler
(
val
)
{
handler
(
val
)
{
this
.
showAuth
=
!!
this
.
userInfo
.
length
&&
val
===
2
;
this
.
showAuth
=
!!
this
.
userInfo
.
length
&&
val
===
2
;
if
(
this
.
showAuth
)
{
this
.
$nextTick
(()
=>
{
const
activeElement
=
document
.
activeElement
;
if
(
activeElement
&&
(
activeElement
.
tagName
===
"
INPUT
"
||
activeElement
.
tagName
===
"
TEXTAREA
"
)
)
{
setTimeout
(()
=>
{
activeElement
.
blur
();
},
0
);
}
});
}
}
}
}
}
},
},
...
...
src/components/PopupWithIframe.vue
View file @
e2dfd947
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
v-html=
"content"
v-html=
"content"
></div>
></div>
<!-- iframe -->
<!-- iframe -->
<div
class=
"protocol-frame-wrap"
v-if=
"
!isPdf &&
url && scrollRefresh"
>
<div
class=
"protocol-frame-wrap"
v-if=
"url && scrollRefresh"
>
<iframe
class=
"protocol-frame"
:src=
"url"
frameborder=
"0"
height=
"100%"
></iframe>
<iframe
class=
"protocol-frame"
:src=
"url"
frameborder=
"0"
height=
"100%"
></iframe>
</div>
</div>
<!-- slot -->
<!-- slot -->
...
@@ -26,9 +26,7 @@
...
@@ -26,9 +26,7 @@
<slot></slot>
<slot></slot>
</div>
</div>
<!-- content -->
<!-- content -->
<div
class=
"protocol-content"
v-if=
"isPdf && scrollRefresh && !$slots.default"
>
<div
class=
"protocol-content"
v-if=
"scrollRefresh && !$slots.default"
></div>
<pdf
v-for=
"(item, index) in pdfNumPages"
:key=
"index"
:src=
"pdfUrl"
:page=
"index + 1"
/>
</div>
</cr-popup>
</cr-popup>
</
template
>
</
template
>
...
@@ -38,7 +36,6 @@
...
@@ -38,7 +36,6 @@
* @param {type}
* @param {type}
* @return:
* @return:
*/
*/
import
pdf
from
"
vue-pdf
"
;
const
CHANGE_EVENT
=
"
input
"
;
const
CHANGE_EVENT
=
"
input
"
;
export
default
{
export
default
{
name
:
"
PopupWithIframe
"
,
name
:
"
PopupWithIframe
"
,
...
@@ -57,9 +54,6 @@ export default {
...
@@ -57,9 +54,6 @@ export default {
default
:
""
default
:
""
}
}
},
},
components
:
{
pdf
},
watch
:
{
watch
:
{
value
(
val
)
{
value
(
val
)
{
this
.
popupShow
=
val
;
this
.
popupShow
=
val
;
...
@@ -70,41 +64,17 @@ export default {
...
@@ -70,41 +64,17 @@ export default {
popupShow
(
val
)
{
popupShow
(
val
)
{
this
.
$emit
(
CHANGE_EVENT
,
val
);
this
.
$emit
(
CHANGE_EVENT
,
val
);
if
(
!
val
)
{
if
(
!
val
)
{
this
.
pdfNumPages
=
null
;
this
.
pdfUrl
=
null
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
scrollRefresh
=
false
;
this
.
scrollRefresh
=
false
;
},
300
);
},
300
);
}
}
}
}
},
},
computed
:
{
isPdf
()
{
const
isPdf
=
this
.
url
.
indexOf
(
"
pdf
"
)
>
-
1
;
isPdf
&&
this
.
pdfTask
();
return
isPdf
;
}
},
data
()
{
data
()
{
return
{
return
{
popupShow
:
false
,
popupShow
:
false
,
scrollRefresh
:
true
,
scrollRefresh
:
true
pdfUrl
:
""
,
pdfNumPages
:
null
};
};
},
methods
:
{
pdfTask
()
{
this
.
pdfUrl
=
pdf
.
createLoadingTask
(
this
.
url
);
this
.
pdfUrl
.
promise
.
then
(
pdf
=>
{
this
.
pdfNumPages
=
pdf
.
numPages
;
console
.
error
(
pdf
);
})
.
catch
(
err
=>
{
console
.
error
(
err
);
});
}
}
}
};
};
</
script
>
</
script
>
...
...
src/views/Consultant/Buy/index.vue
View file @
e2dfd947
...
@@ -222,7 +222,7 @@ export default {
...
@@ -222,7 +222,7 @@ export default {
this
.
updateRemain
();
this
.
updateRemain
();
},
},
methods
:
{
methods
:
{
...
mapActions
([
"
setIsShowLogin
"
]),
...
mapActions
([
"
setIsShowLogin
"
,
"
setIsPayWait
"
]),
checkLogin
()
{
checkLogin
()
{
if
(
!
this
.
isLogin
)
{
if
(
!
this
.
isLogin
)
{
this
.
setIsShowLogin
(
true
);
this
.
setIsShowLogin
(
true
);
...
@@ -241,6 +241,7 @@ export default {
...
@@ -241,6 +241,7 @@ export default {
}
}
},
},
async
generateOrder
()
{
async
generateOrder
()
{
this
.
setIsPayWait
(
true
);
const
res
=
await
create
();
const
res
=
await
create
();
if
(
res
)
{
if
(
res
)
{
this
.
consultantOrderNo
=
res
.
consultantOrderNo
;
this
.
consultantOrderNo
=
res
.
consultantOrderNo
;
...
@@ -249,18 +250,19 @@ export default {
...
@@ -249,18 +250,19 @@ export default {
}
}
},
},
async
goPay
()
{
async
goPay
()
{
this
.
setIsPayWait
(
true
);
try
{
try
{
const
res
=
await
goPay
({
tradeType
:
this
.
tradeType
,
openId
:
this
.
openId
});
const
res
=
await
goPay
({
tradeType
:
this
.
tradeType
,
openId
:
this
.
openId
});
if
(
res
)
{
if
(
res
)
{
payByWay
(
this
.
tradeType
,
res
.
payInfo
).
then
(()
=>
{
payByWay
(
this
.
tradeType
,
res
.
payInfo
).
then
(()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$parent
.
getOrderInfo
();
this
.
$parent
.
getOrderInfo
(
true
);
},
1000
);
},
1000
);
});
});
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$parent
.
getOrderInfo
();
this
.
$parent
.
getOrderInfo
(
true
);
},
1000
);
},
1000
);
}
}
}
}
...
...
src/views/Consultant/index.vue
View file @
e2dfd947
...
@@ -17,9 +17,9 @@ import Buy from "./Buy";
...
@@ -17,9 +17,9 @@ import Buy from "./Buy";
import
Success
from
"
./Success
"
;
import
Success
from
"
./Success
"
;
import
Question
from
"
./Question
"
;
import
Question
from
"
./Question
"
;
import
Exclusive
from
"
./Exclusive
"
;
import
Exclusive
from
"
./Exclusive
"
;
import
{
mapState
}
from
"
vuex
"
;
import
{
mapState
,
mapActions
}
from
"
vuex
"
;
import
localStorage
from
"
@/service/localStorage
"
;
import
localStorage
from
"
@/service/localStorage
"
;
import
{
getCulOrder
}
from
"
@/api/consultant
"
;
import
{
getCulOrder
,
getPayState
}
from
"
@/api/consultant
"
;
export
default
{
export
default
{
name
:
"
Consultant
"
,
name
:
"
Consultant
"
,
components
:
{
components
:
{
...
@@ -60,16 +60,33 @@ export default {
...
@@ -60,16 +60,33 @@ export default {
this
.
getOrderInfo
();
this
.
getOrderInfo
();
},
},
methods
:
{
methods
:
{
...
mapActions
([
"
setIsPayWait
"
]),
// 1-待支付,3-支付成功,4-问卷收集完成,方案配置中,5-方案配置完成, -1 -支付失败订单关闭,-2 -支付超过1小时订单关闭,-3 -订单关闭
// 1-待支付,3-支付成功,4-问卷收集完成,方案配置中,5-方案配置完成, -1 -支付失败订单关闭,-2 -支付超过1小时订单关闭,-3 -订单关闭
async
getOrderInfo
()
{
async
getOrderInfo
(
checkPayState
=
false
)
{
if
(
!
this
.
isLogin
)
return
;
if
(
!
this
.
isLogin
)
return
;
this
.
showQuestion
=
false
;
this
.
showQuestion
=
false
;
const
res
=
await
getCulOrder
();
const
res
=
await
getCulOrder
();
if
(
res
)
{
if
(
res
)
{
this
.
orderInfo
=
res
;
this
.
orderInfo
=
res
;
if
(
checkPayState
&&
res
.
state
<
3
)
{
this
.
getPayState
();
}
else
{
this
.
setIsPayWait
(
false
);
}
this
.
$forceUpdate
();
this
.
$forceUpdate
();
}
}
},
},
async
getPayState
()
{
const
res
=
await
getPayState
();
if
(
res
.
state
===
2
)
{
setTimeout
(()
=>
{
this
.
getPayState
();
},
3000
);
}
else
{
this
.
setIsPayWait
(
false
);
this
.
getOrderInfo
();
}
},
changeQuestion
()
{
changeQuestion
()
{
this
.
showQuestion
=
true
;
this
.
showQuestion
=
true
;
},
},
...
...
src/views/Goods/Detail/AIDetail.vue
View file @
e2dfd947
...
@@ -231,14 +231,18 @@ export default {
...
@@ -231,14 +231,18 @@ export default {
return
;
return
;
}
}
if
(
localStorage
.
get
(
"
mongoToken
"
))
{
if
(
localStorage
.
get
(
"
mongoToken
"
))
{
this
.
$refs
.
insureForm
.
getFamilyList_I
().
then
(()
=>
{
this
.
$refs
.
insureForm
.
getFamilyList
(
true
).
then
(()
=>
{
this
.
getIsRead
();
setTimeout
(()
=>
{
this
.
getIsRead
();
},
500
);
});
});
}
else
{
}
else
{
const
{
selfPhone
,
selfCode
}
=
this
.
formData
;
const
{
selfPhone
,
selfCode
}
=
this
.
formData
;
this
.
login
(
selfPhone
,
selfCode
).
then
(()
=>
{
this
.
login
(
selfPhone
,
selfCode
).
then
(()
=>
{
this
.
$refs
.
insureForm
.
getFamilyList_I
().
then
(()
=>
{
this
.
$refs
.
insureForm
.
getFamilyList
(
true
).
then
(()
=>
{
this
.
getIsRead
();
setTimeout
(()
=>
{
this
.
getIsRead
();
},
500
);
});
});
});
});
}
}
...
...
src/views/Goods/Detail/CIIDetail.vue
View file @
e2dfd947
...
@@ -291,14 +291,18 @@ export default {
...
@@ -291,14 +291,18 @@ export default {
return
;
return
;
}
}
if
(
localStorage
.
get
(
"
mongoToken
"
))
{
if
(
localStorage
.
get
(
"
mongoToken
"
))
{
this
.
$refs
.
insureForm
.
getFamilyList_I
().
then
(()
=>
{
this
.
$refs
.
insureForm
.
getFamilyList
(
true
).
then
(()
=>
{
this
.
getIsRead
();
setTimeout
(()
=>
{
this
.
getIsRead
();
},
500
);
});
});
}
else
{
}
else
{
const
{
selfPhone
,
selfCode
}
=
this
.
formData
;
const
{
selfPhone
,
selfCode
}
=
this
.
formData
;
this
.
login
(
selfPhone
,
selfCode
).
then
(()
=>
{
this
.
login
(
selfPhone
,
selfCode
).
then
(()
=>
{
this
.
$refs
.
insureForm
.
getFamilyList_I
().
then
(()
=>
{
this
.
$refs
.
insureForm
.
getFamilyList
(
true
).
then
(()
=>
{
this
.
getIsRead
();
setTimeout
(()
=>
{
this
.
getIsRead
();
},
500
);
});
});
});
});
}
}
...
...
src/views/Goods/Detail/MIDetail.vue
View file @
e2dfd947
...
@@ -225,15 +225,19 @@ export default {
...
@@ -225,15 +225,19 @@ export default {
}
}
if
(
localStorage
.
get
(
"
mongoToken
"
))
{
if
(
localStorage
.
get
(
"
mongoToken
"
))
{
socialSecurityCache
=
this
.
formData
.
socialSecurity
;
socialSecurityCache
=
this
.
formData
.
socialSecurity
;
this
.
$refs
.
insureForm
.
getFamilyList_I
().
then
(()
=>
{
this
.
$refs
.
insureForm
.
getFamilyList
(
true
).
then
(()
=>
{
this
.
getIsRead
();
setTimeout
(()
=>
{
this
.
getIsRead
();
},
500
);
});
});
}
else
{
}
else
{
socialSecurityCache
=
this
.
formData
.
socialSecurity
;
socialSecurityCache
=
this
.
formData
.
socialSecurity
;
const
{
selfPhone
,
selfCode
}
=
this
.
formData
;
const
{
selfPhone
,
selfCode
}
=
this
.
formData
;
this
.
login
(
selfPhone
,
selfCode
).
then
(()
=>
{
this
.
login
(
selfPhone
,
selfCode
).
then
(()
=>
{
this
.
$refs
.
insureForm
.
getFamilyList_I
().
then
(()
=>
{
this
.
$refs
.
insureForm
.
getFamilyList
(
true
).
then
(()
=>
{
this
.
getIsRead
();
setTimeout
(()
=>
{
this
.
getIsRead
();
},
500
);
});
});
});
});
}
}
...
...
src/views/Goods/Detail/modules/InsurePersonForm.vue
View file @
e2dfd947
...
@@ -262,11 +262,18 @@ export default {
...
@@ -262,11 +262,18 @@ export default {
handler
(
val
)
{
handler
(
val
)
{
if
(
val
===
4
&&
this
.
userInfo
.
phoneNoMask
===
"
点击登录
"
)
{
if
(
val
===
4
&&
this
.
userInfo
.
phoneNoMask
===
"
点击登录
"
)
{
const
xyqbUserInfo
=
localStorage
.
get
(
"
xyqbUserInfo
"
);
const
xyqbUserInfo
=
localStorage
.
get
(
"
xyqbUserInfo
"
);
this
.
formData
.
selfName
=
xyqbUserInfo
.
nameMask
;
const
{
nameMask
,
idNoMask
,
phoneNoMask
}
=
xyqbUserInfo
;
this
.
formData
.
selfIdNo
=
xyqbUserInfo
.
idNoMask
;
if
(
nameMask
)
{
this
.
formData
.
selfPhone
=
xyqbUserInfo
.
phoneNoMask
;
this
.
formData
.
selfName
=
nameMask
;
}
if
(
idNoMask
)
{
this
.
formData
.
selfIdNo
=
idNoMask
;
}
if
(
phoneNoMask
)
{
this
.
formData
.
selfPhone
=
phoneNoMask
;
}
this
.
xyqbAuthState
=
localStorage
.
get
(
"
xyqbAuthState
"
);
this
.
xyqbAuthState
=
localStorage
.
get
(
"
xyqbAuthState
"
);
this
.
selfInfoReadonly
=
true
;
this
.
selfInfoReadonly
=
nameMask
&&
idNoMask
&&
phoneNoMask
;
this
.
$forceUpdate
();
this
.
$forceUpdate
();
}
}
}
}
...
@@ -335,7 +342,7 @@ export default {
...
@@ -335,7 +342,7 @@ export default {
};
};
this
.
onRelationCancel
();
this
.
onRelationCancel
();
},
},
relationChange
(
relation
=
this
.
formData
.
relation
)
{
relationChange
(
relation
=
this
.
formData
.
relation
,
validSelf
=
false
)
{
this
.
familyList
.
forEach
(
item
=>
{
this
.
familyList
.
forEach
(
item
=>
{
const
{
const
{
relation
,
relation
,
...
@@ -357,6 +364,7 @@ export default {
...
@@ -357,6 +364,7 @@ export default {
this
.
selfInfoReadonly
=
true
;
this
.
selfInfoReadonly
=
true
;
}
}
});
});
if
(
validSelf
)
return
;
let
userArray
=
this
.
familyList
.
filter
(
item
=>
item
.
relation
===
+
relation
);
let
userArray
=
this
.
familyList
.
filter
(
item
=>
item
.
relation
===
+
relation
);
let
[
name
,
idNo
,
userInfoSecId
,
socialSecurity
]
=
[
""
,
""
,
""
,
""
];
let
[
name
,
idNo
,
userInfoSecId
,
socialSecurity
]
=
[
""
,
""
,
""
,
""
];
if
(
if
(
...
@@ -414,56 +422,54 @@ export default {
...
@@ -414,56 +422,54 @@ export default {
}
}
}
}
},
},
async
getFamilyList
()
{
getFamilyList
(
reset
=
false
)
{
this
.
mongoToken
=
localStorage
.
get
(
"
mongoToken
"
);
return
new
Promise
(
resolve
=>
{
if
(
!
this
.
mongoToken
)
return
;
this
.
mongoToken
=
localStorage
.
get
(
"
mongoToken
"
);
this
.
setUserInfo
();
if
(
!
this
.
mongoToken
)
return
;
const
res
=
await
getFamilyList
();
this
.
setUserInfo
();
if
(
res
)
{
getFamilyList
().
then
(
res
=>
{
this
.
familyList
=
res
;
if
(
res
)
{
if
(
this
.
hasAutoSaveData
(
this
.
autoSaveKey
))
{
this
.
familyList
=
res
;
this
.
getSaveInfoHandler
(
this
.
autoSaveKey
,
AUTO_SAVE_TARGET
);
if
(
this
.
hasAutoSaveData
(
this
.
autoSaveKey
)
&&
!
reset
)
{
if
(
this
.
formData
.
relation
)
{
this
.
getSaveInfoHandler
(
this
.
autoSaveKey
,
AUTO_SAVE_TARGET
);
const
userArray
=
this
.
familyList
.
filter
(
if
(
this
.
formData
.
relation
)
{
item
=>
item
.
relation
===
+
this
.
formData
.
relation
const
userArray
=
this
.
familyList
.
filter
(
);
item
=>
item
.
relation
===
+
this
.
formData
.
relation
this
.
relationList
=
userArray
.
length
>
1
?
userArray
:
[];
);
}
else
{
this
.
relationList
=
userArray
.
length
>
1
?
userArray
:
[];
this
.
formData
.
relation
=
"
1
"
;
}
else
{
}
this
.
formData
.
relation
=
"
1
"
;
if
(
!
this
.
formData
.
selfName
)
{
}
const
selfInfo
=
this
.
familyList
.
find
(
item
=>
item
.
relation
===
1
);
if
(
!
this
.
formData
.
selfName
)
{
this
.
selfInfoReadonly
=
!!
selfInfo
;
const
selfInfo
=
this
.
familyList
.
find
(
item
=>
item
.
relation
===
1
);
if
(
selfInfo
)
{
this
.
selfInfoReadonly
=
!!
selfInfo
;
const
{
if
(
selfInfo
)
{
idNoMask
:
selfIdNo
,
const
{
nameMask
:
selfName
,
idNoMask
:
selfIdNo
,
socialSecurity
,
nameMask
:
selfName
,
userInfoSecId
:
selfSecId
socialSecurity
,
}
=
selfInfo
;
userInfoSecId
:
selfSecId
this
.
formData
=
{
}
=
selfInfo
;
...
this
.
formData
,
this
.
formData
=
{
...{
...
this
.
formData
,
selfName
,
...{
selfIdNo
,
selfName
,
selfSecId
,
selfIdNo
,
selfSocialSecurity
:
socialSecurity
?
"
1
"
:
"
0
"
selfSecId
,
selfSocialSecurity
:
socialSecurity
?
"
1
"
:
"
0
"
}
};
}
}
};
}
else
{
this
.
selfInfoReadonly
=
true
;
}
}
else
{
let
relation
=
this
.
formData
.
relation
||
"
1
"
;
(
this
.
showAuthXyqb
||
this
.
mongoToken
)
&&
this
.
relationChange
(
relation
,
reset
);
}
}
}
else
{
this
.
selfInfoReadonly
=
true
;
}
}
}
else
{
resolve
();
let
relation
=
this
.
formData
.
relation
||
"
1
"
;
});
(
this
.
showAuthXyqb
||
this
.
mongoToken
)
&&
this
.
relationChange
(
relation
);
}
}
},
getFamilyList_I
()
{
return
new
Promise
(
resolve
=>
{
this
.
getFamilyList
();
resolve
();
});
});
},
},
// TODO 倒计时未回显
// TODO 倒计时未回显
...
...
src/views/Goods/Inform/index.less
View file @
e2dfd947
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
-webkit-overflow-scrolling: touch;
-webkit-overflow-scrolling: touch;
overflow: scroll;
overflow: scroll;
margin: 0 -15px;
margin: 0 -15px;
height:
72vh
;
height:
calc(100vh - 182px)
;
}
}
}
}
&-btns {
&-btns {
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
}
}
}
}
&-frame {
&-frame {
height:
72vh
;
height:
calc(100vh - 182px)
;
width: 100%;
width: 100%;
}
}
}
}
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