Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 94f0107d
authored
Aug 12, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 提交
1 parent
f216f8c2
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
193 additions
and
99 deletions
assets/css/sprite.scss
assets/images/sprite.png
assets/spritesmith/no-insurance-data.png
components/FinishStep.vue
components/Insurance/Insurance.vue
components/Insurance/components/InsurancePopup.vue
components/Insurance/components/InsuranceTable.vue
pages/common/components/Scene.vue
pages/equity/index.vue
assets/css/sprite.scss
View file @
94f0107
.sprite-icon
{
background-image
:
url(@/assets/images/sprite.png)
;
background-size
:
1
026rpx
1020
rpx
;}
.sprite-icon
{
background-image
:
url(@/assets/images/sprite.png)
;
background-size
:
1
310rpx
1028
rpx
;}
.icon-addr
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-
757rpx
-470
rpx
;}
.icon-addr
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-
1261rpx
-557
rpx
;}
.icon-aito
{
width
:
320rpx
;
height
:
36rpx
;
background-position
:
-
495rpx
-550
rpx
;}
.icon-aito
{
width
:
320rpx
;
height
:
36rpx
;
background-position
:
-
830rpx
-617
rpx
;}
.icon-arrow-right
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-
479rpx
-733
rpx
;}
.icon-arrow-right
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-
1165rpx
-617
rpx
;}
.icon-avatar
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-
127rpx
-797
rpx
;}
.icon-avatar
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-
381rpx
-726
rpx
;}
.icon-back
{
width
:
128rpx
;
height
:
50rpx
;
background-position
:
-
830rpx
-688
rpx
;}
.icon-back
{
width
:
128rpx
;
height
:
50rpx
;
background-position
:
-
111rpx
-853
rpx
;}
.icon-bao
{
width
:
196rpx
;
height
:
220rpx
;
background-position
:
-830rpx
0
rpx
;}
.icon-bao
{
width
:
196rpx
;
height
:
220rpx
;
background-position
:
-830rpx
-382
rpx
;}
.icon-change-account
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-
526rpx
-733
rpx
;}
.icon-change-account
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-
1212rpx
-617
rpx
;}
.icon-customer-1
{
width
:
400rpx
;
height
:
400rpx
;
background-position
:
0rpx
0rpx
;}
.icon-customer-1
{
width
:
400rpx
;
height
:
400rpx
;
background-position
:
0rpx
0rpx
;}
.icon-customer-2
{
width
:
400rpx
;
height
:
400rpx
;
background-position
:
-415rpx
0rpx
;}
.icon-customer-2
{
width
:
400rpx
;
height
:
400rpx
;
background-position
:
-415rpx
0rpx
;}
.icon-customer-detail
{
width
:
40rpx
;
height
:
40rpx
;
background-position
:
-973rpx
-473rpx
;}
.icon-face-error-active
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-238rpx
-797rpx
;}
.icon-face-error
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-349rpx
-797rpx
;}
.icon-face-success-active
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-460rpx
-797rpx
;}
.icon-face-success
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-571rpx
-797rpx
;}
.icon-feedback
{
width
:
64rpx
;
height
:
64rpx
;
background-position
:
-111rpx
-924rpx
;}
.icon-first-nav
{
width
:
464rpx
;
height
:
176rpx
;
background-position
:
0rpx
-606rpx
;}
.icon-home-active
{
width
:
112rpx
;
height
:
112rpx
;
background-position
:
-630rpx
-415rpx
;}
.icon-home
{
width
:
112rpx
;
height
:
112rpx
;
background-position
:
-479rpx
-606rpx
;}
.icon-icon-arrow
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-573rpx
-733rpx
;}
.icon-icon-close
{
width
:
72rpx
;
height
:
72rpx
;
background-position
:
-733rpx
-606rpx
;}
.icon-icon-female
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-620rpx
-733rpx
;}
.icon-icon-male
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-667rpx
-733rpx
;}
.icon-icon-shop
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-714rpx
-733rpx
;}
.icon-icon-upload
{
width
:
128rpx
;
height
:
128rpx
;
background-position
:
-830rpx
-410rpx
;}
.icon-icon-weixin
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-761rpx
-733rpx
;}
.icon-invisible
{
width
:
40rpx
;
height
:
40rpx
;
background-position
:
-965rpx
-628rpx
;}
.icon-kf-0
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-419rpx
-924rpx
;}
.icon-kf-1
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-466rpx
-924rpx
;}
.icon-kf-2
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-513rpx
-924rpx
;}
.icon-kf-3
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-560rpx
-924rpx
;}
.icon-logo
{
width
:
160rpx
;
height
:
160rpx
;
background-position
:
-830rpx
-235rpx
;}
.icon-pen-active
{
width
:
120rpx
;
height
:
120rpx
;
background-position
:
-830rpx
-553rpx
;}
.icon-pen
{
width
:
120rpx
;
height
:
120rpx
;
background-position
:
-495rpx
-415rpx
;}
.icon-qr-success
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-682rpx
-797rpx
;}
.icon-qw
{
width
:
48rpx
;
height
:
48rpx
;
background-position
:
-973rpx
-410rpx
;}
.icon-record-active
{
width
:
112rpx
;
height
:
112rpx
;
background-position
:
-606rpx
-606rpx
;}
.icon-record
{
width
:
112rpx
;
height
:
112rpx
;
background-position
:
0rpx
-797rpx
;}
.icon-scan
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-607rpx
-924rpx
;}
.icon-scene-0
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-793rpx
-797rpx
;}
.icon-scene-1
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-904rpx
-797rpx
;}
.icon-search
{
width
:
40rpx
;
height
:
40rpx
;
background-position
:
-973rpx
-688rpx
;}
.icon-second-nav
{
width
:
480rpx
;
height
:
176rpx
;
background-position
:
0rpx
-415rpx
;}
.icon-setting
{
width
:
64rpx
;
height
:
64rpx
;
background-position
:
-190rpx
-924rpx
;}
.icon-store
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
0rpx
-924rpx
;}
.icon-tool-file
{
width
:
60rpx
;
height
:
60rpx
;
background-position
:
-965rpx
-553rpx
;}
.icon-tool-finish
{
width
:
60rpx
;
height
:
60rpx
;
background-position
:
-269rpx
-924rpx
;}
.icon-tool-pay
{
width
:
60rpx
;
height
:
60rpx
;
background-position
:
-344rpx
-924rpx
;}
.icon-total
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-654rpx
-924rpx
;}
.icon-visible
{
width
:
40rpx
;
height
:
40rpx
;
background-position
:
-757rpx
-415rpx
;}
\ No newline at end of file
\ No newline at end of file
.icon-customer-detail
{
width
:
40rpx
;
height
:
40rpx
;
background-position
:
-1041rpx
-557rpx
;}
.icon-face-error-active
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-492rpx
-726rpx
;}
.icon-face-error
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-603rpx
-726rpx
;}
.icon-face-success-active
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-714rpx
-726rpx
;}
.icon-face-success
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-825rpx
-726rpx
;}
.icon-feedback
{
width
:
64rpx
;
height
:
64rpx
;
background-position
:
-1216rpx
-469rpx
;}
.icon-first-nav
{
width
:
464rpx
;
height
:
176rpx
;
background-position
:
-830rpx
-191rpx
;}
.icon-home-active
{
width
:
112rpx
;
height
:
112rpx
;
background-position
:
-638rpx
-558rpx
;}
.icon-home
{
width
:
112rpx
;
height
:
112rpx
;
background-position
:
0rpx
-726rpx
;}
.icon-icon-arrow
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-1259rpx
-617rpx
;}
.icon-icon-close
{
width
:
72rpx
;
height
:
72rpx
;
background-position
:
-1216rpx
-382rpx
;}
.icon-icon-female
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-830rpx
-668rpx
;}
.icon-icon-male
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-877rpx
-668rpx
;}
.icon-icon-shop
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-924rpx
-668rpx
;}
.icon-icon-upload
{
width
:
128rpx
;
height
:
128rpx
;
background-position
:
-503rpx
-415rpx
;}
.icon-icon-weixin
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-971rpx
-668rpx
;}
.icon-invisible
{
width
:
40rpx
;
height
:
40rpx
;
background-position
:
-1096rpx
-557rpx
;}
.icon-kf-0
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-1018rpx
-668rpx
;}
.icon-kf-1
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-1065rpx
-668rpx
;}
.icon-kf-2
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-1112rpx
-668rpx
;}
.icon-kf-3
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-1159rpx
-668rpx
;}
.icon-logo
{
width
:
160rpx
;
height
:
160rpx
;
background-position
:
-1041rpx
-382rpx
;}
.icon-no-insurance-data
{
width
:
488rpx
;
height
:
296rpx
;
background-position
:
0rpx
-415rpx
;}
.icon-pen-active
{
width
:
120rpx
;
height
:
120rpx
;
background-position
:
-646rpx
-415rpx
;}
.icon-pen
{
width
:
120rpx
;
height
:
120rpx
;
background-position
:
-503rpx
-558rpx
;}
.icon-qr-success
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-936rpx
-726rpx
;}
.icon-qw
{
width
:
48rpx
;
height
:
48rpx
;
background-position
:
-765rpx
-558rpx
;}
.icon-record-active
{
width
:
112rpx
;
height
:
112rpx
;
background-position
:
-127rpx
-726rpx
;}
.icon-record
{
width
:
112rpx
;
height
:
112rpx
;
background-position
:
-254rpx
-726rpx
;}
.icon-scan
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-1206rpx
-668rpx
;}
.icon-scene-0
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-1047rpx
-726rpx
;}
.icon-scene-1
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
-1158rpx
-726rpx
;}
.icon-search
{
width
:
40rpx
;
height
:
40rpx
;
background-position
:
-1151rpx
-557rpx
;}
.icon-second-nav
{
width
:
480rpx
;
height
:
176rpx
;
background-position
:
-830rpx
0rpx
;}
.icon-setting
{
width
:
64rpx
;
height
:
64rpx
;
background-position
:
0rpx
-964rpx
;}
.icon-store
{
width
:
96rpx
;
height
:
96rpx
;
background-position
:
0rpx
-853rpx
;}
.icon-tool-file
{
width
:
60rpx
;
height
:
60rpx
;
background-position
:
-79rpx
-964rpx
;}
.icon-tool-finish
{
width
:
60rpx
;
height
:
60rpx
;
background-position
:
-154rpx
-964rpx
;}
.icon-tool-pay
{
width
:
60rpx
;
height
:
60rpx
;
background-position
:
-229rpx
-964rpx
;}
.icon-total
{
width
:
32rpx
;
height
:
32rpx
;
background-position
:
-1253rpx
-668rpx
;}
.icon-visible
{
width
:
40rpx
;
height
:
40rpx
;
background-position
:
-1206rpx
-557rpx
;}
\ No newline at end of file
\ No newline at end of file
assets/images/sprite.png
View file @
94f0107
972 KB
|
W:
|
H:
1.09 MB
|
W:
|
H:
2-up
Swipe
Onion skin
assets/spritesmith/no-insurance-data.png
0 → 100644
View file @
94f0107
112 KB
components/FinishStep.vue
View file @
94f0107
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
:placeholder=
"i.placeholder"
:placeholder=
"i.placeholder"
:disabled=
"customerType == 0"
:disabled=
"customerType == 0"
@
input=
"inputCustomer"
@
input=
"inputCustomer"
placeholder-style=
"color:#c9c9c9;"
/>
/>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
...
...
components/Insurance/Insurance.vue
View file @
94f0107
...
@@ -57,7 +57,10 @@
...
@@ -57,7 +57,10 @@
</view>
</view>
</view>
</view>
</view>
</view>
<insurance-table
:isPreview=
"isPreview"
:show=
"show"
/>
<insurance-table
:isPreview=
"isPreview"
:show=
"show"
/>
</template>
</template>
</wnCanvas>
</wnCanvas>
<car-brands
<car-brands
...
@@ -114,7 +117,7 @@ export default {
...
@@ -114,7 +117,7 @@ export default {
],
],
customerInfo
:
{},
customerInfo
:
{},
focusIndex
:
-
1
,
focusIndex
:
-
1
,
insuranceList
:[]
insuranceList
:
[]
}
}
},
},
watch
:
{
watch
:
{
...
@@ -162,10 +165,10 @@ export default {
...
@@ -162,10 +165,10 @@ export default {
if
(
e
?.
currentTarget
&&
e
?.
target
)
{
if
(
e
?.
currentTarget
&&
e
?.
target
)
{
const
{
key
}
=
e
.
currentTarget
.
dataset
const
{
key
}
=
e
.
currentTarget
.
dataset
if
(
key
==
'newCarFare'
)
{
if
(
key
==
'newCarFare'
)
{
let
value
=
Number
(
e
.
target
.
value
>
999999.99
?
999999.
99
:
e
.
target
.
value
)
let
value
=
Number
(
e
.
target
.
value
>
=
999999
?
9999
99
:
e
.
target
.
value
)
// 判断是否为整数
// 判断是否为整数
if
(
!
Number
.
isInteger
(
value
))
value
=
String
(
value
).
replace
(
/
(\d
*
\.?\d{0,2})\d
*/
,
'$1'
)
if
(
!
Number
.
isInteger
(
value
))
value
=
String
(
value
).
replace
(
/
(\d
*
\.?\d{0,2})\d
*/
,
'$1'
)
this
.
customerInfo
[
key
]
=
Number
(
value
).
toFixed
(
2
)
?
value
:
''
this
.
customerInfo
[
key
]
=
Number
(
value
).
toFixed
(
2
)
?
value
>
0
?
value
:
''
:
''
this
.
inputCustomer
()
this
.
inputCustomer
()
}
}
}
}
...
@@ -213,6 +216,8 @@ export default {
...
@@ -213,6 +216,8 @@ export default {
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
0
24
rpx
;
padding
:
0
24
rpx
;
z-index
:
2
;
z-index
:
2
;
display
:
flex
;
align-items
:
center
;
.unit
{
.unit
{
position
:
absolute
;
position
:
absolute
;
top
:
50%
;
top
:
50%
;
...
@@ -227,21 +232,23 @@ export default {
...
@@ -227,21 +232,23 @@ export default {
.input
,
.input
,
.select
{
.select
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
60
rpx
;
border
:
none
!important
;
border
:
none
!important
;
outline
:
none
;
outline
:
none
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
color
:
#333333
;
color
:
#333333
;
border-radius
:
16
rpx
;
border-radius
:
16
rpx
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
line-height
:
80
rpx
;
padding
:
0
!important
;
padding
:
0
!important
;
display
:
flex
;
align-items
:
center
;
&::placeholder
{
&::placeholder
{
color
:
#999999
;
color
:
#999999
;
}
}
}
}
.placeholderStyle
{
.placeholderStyle
{
color
:
#999999
;
color
:
#999999
;
line-height
:
80
rpx
;
}
}
.arrow
{
.arrow
{
color
:
#999
!important
;
color
:
#999
!important
;
...
...
components/Insurance/components/InsurancePopup.vue
View file @
94f0107
...
@@ -2,7 +2,9 @@
...
@@ -2,7 +2,9 @@
<uni-popup
<uni-popup
ref=
"popup"
ref=
"popup"
type=
"bottom"
type=
"bottom"
>
>
<!-- :mask-click="false" -->
<view
class=
"detail-box"
>
<view
class=
"detail-box"
>
<view
<view
class=
"close-box flex"
class=
"close-box flex"
...
...
components/Insurance/components/InsuranceTable.vue
View file @
94f0107
...
@@ -10,16 +10,21 @@
...
@@ -10,16 +10,21 @@
</
template
>
</
template
>
</view>
</view>
<view
class=
"views-content"
>
<view
class=
"views-content"
>
<view
class=
"main"
>
商业险
</view>
<view
class=
"main"
v-if=
"flag && check"
>
商业险
</view>
<scroll-view
<scroll-view
class=
"table"
class=
"table"
scroll-y
scroll-y
@
touchmove
.
stop
@
touchmove
.
stop
:scroll-top=
"scrollTop"
:scroll-top=
"scrollTop"
>
>
<
template
v-if=
"flag"
>
<template
v-if=
"check"
>
<template
v-for=
"(i,index) in insuranceList"
>
<template
v-for=
"(i,index) in insuranceList"
>
<view
<view
:class=
"['insurance-item flex',
{'disabled':!i.show
}]"
:class=
"['insurance-item flex',
{'disabled':!i.show},{'disabled-input':!i.checked
}]"
:key="index"
:key="index"
v-if="showInsurance(i)"
v-if="showInsurance(i)"
>
>
...
@@ -57,7 +62,7 @@
...
@@ -57,7 +62,7 @@
v-model=
"i.cost"
v-model=
"i.cost"
class=
"input"
class=
"input"
placeholder=
"输入金额"
placeholder=
"输入金额"
:disabled=
"!i.show
"
:disabled=
"!i.show || !i.checked
"
:placeholder-style=
"`color:${i.show?'#999':'#ccc'}`"
:placeholder-style=
"`color:${i.show?'#999':'#ccc'}`"
@
blur=
"handleInput"
@
blur=
"handleInput"
:data-index=
"index"
:data-index=
"index"
...
@@ -73,6 +78,14 @@
...
@@ -73,6 +78,14 @@
</view>
</view>
</view>
</view>
</template>
</template>
</template>
<
template
v-else
>
<view
class=
"nothing flex"
>
<view
class=
"sprite-icon icon-no-insurance-data"
></view>
暂无数据
{{
!
isPreview
?
',请进入预览模式,开启相关车险及权益内容'
:
''
}}
</view>
</
template
>
</template>
</scroll-view>
</scroll-view>
</view>
</view>
...
@@ -103,7 +116,9 @@ export default {
...
@@ -103,7 +116,9 @@ export default {
viewsTitle
:
[
'险种及权益'
,
'主要保障范围'
,
'费用'
,
'是否显示'
],
viewsTitle
:
[
'险种及权益'
,
'主要保障范围'
,
'费用'
,
'是否显示'
],
currentItem
:
{},
currentItem
:
{},
insuranceList
:
[],
insuranceList
:
[],
scrollTop
:
0
scrollTop
:
0
,
storageKey
:
''
,
flag
:
false
}
}
},
},
watch
:
{
watch
:
{
...
@@ -111,6 +126,7 @@ export default {
...
@@ -111,6 +126,7 @@ export default {
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
this
.
$refs
.
popupRef
?.
close
()
this
.
$refs
.
popupRef
?.
close
()
this
.
flag
=
false
this
.
scrollTop
=
1000
this
.
scrollTop
=
1000
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
scrollTop
=
0
this
.
scrollTop
=
0
...
@@ -119,9 +135,13 @@ export default {
...
@@ -119,9 +135,13 @@ export default {
},
},
show
(
n
)
{
show
(
n
)
{
if
(
n
)
{
if
(
n
)
{
const
{
phone
,
shopMerchantId
}
=
uni
.
$storage
.
get
(
"userInfo"
),
const
{
storageKey
}
=
this
,
insuranceList
=
uni
.
getStorageSync
(
`
${
shopMerchantId
}
_
${
phone
}
_insurance_list`
)
insuranceList
=
uni
.
getStorageSync
(
storageKey
)
if
(
insuranceList
)
this
.
insuranceList
=
insuranceList
if
(
insuranceList
)
{
insuranceList
.
map
(
e
=>
e
.
cost
=
''
)
this
.
insuranceList
=
insuranceList
this
.
flag
=
true
}
this
.
getMerchantInsuranceList
()
this
.
getMerchantInsuranceList
()
}
}
},
},
...
@@ -134,10 +154,14 @@ export default {
...
@@ -134,10 +154,14 @@ export default {
return
this
.
insuranceList
.
reduce
((
pre
,
cur
)
=>
{
return
this
.
insuranceList
.
reduce
((
pre
,
cur
)
=>
{
return
NP
.
plus
(
pre
,
NP
.
times
(
cur
.
cost
,
(
this
.
isPreview
?
cur
.
show
:
cur
.
checked
)
?
1
:
0
))
return
NP
.
plus
(
pre
,
NP
.
times
(
cur
.
cost
,
(
this
.
isPreview
?
cur
.
show
:
cur
.
checked
)
?
1
:
0
))
},
0
)
},
0
)
},
check
()
{
return
this
.
isPreview
?
this
.
insuranceList
.
length
:
this
.
insuranceList
.
filter
(
item
=>
item
.
show
).
length
}
}
},
},
mounted
()
{
mounted
()
{
const
{
phone
,
shopMerchantId
}
=
uni
.
$storage
.
get
(
"userInfo"
)
this
.
storageKey
=
`
${
shopMerchantId
}
_
${
phone
}
_insurance_list`
},
},
methods
:
{
methods
:
{
showRow
(
index
)
{
showRow
(
index
)
{
...
@@ -152,8 +176,9 @@ export default {
...
@@ -152,8 +176,9 @@ export default {
handleInput
(
event
)
{
handleInput
(
event
)
{
let
value
=
event
.
target
.
value
,
let
value
=
event
.
target
.
value
,
{
index
}
=
event
.
currentTarget
.
dataset
{
index
}
=
event
.
currentTarget
.
dataset
value
=
Number
(
value
>
999999
?
999999
:
value
)
// 使用正则表达式来限制小数点后的位数
// 使用正则表达式来限制小数点后的位数
this
.
insuranceList
[
index
].
cost
=
Number
(
value
).
toFixed
(
2
)
>
0
?
value
.
replace
(
/
(\d
*
\.?\d{0,2})\d
*/
,
'$1'
)
:
''
this
.
insuranceList
[
index
].
cost
=
Number
(
value
).
toFixed
(
2
)
>
0
?
String
(
value
)
.
replace
(
/
(\d
*
\.?\d{0,2})\d
*/
,
'$1'
)
:
''
},
},
defaultBlock
(
item
)
{
defaultBlock
(
item
)
{
return
item
.
main
==
'交强险'
?
(
this
.
isPreview
?
'has-default'
:
item
.
show
?
'has-default'
:
''
)
:
''
return
item
.
main
==
'交强险'
?
(
this
.
isPreview
?
'has-default'
:
item
.
show
?
'has-default'
:
''
)
:
''
...
@@ -162,46 +187,64 @@ export default {
...
@@ -162,46 +187,64 @@ export default {
return
this
.
isPreview
?
true
:
item
.
show
?
true
:
false
return
this
.
isPreview
?
true
:
item
.
show
?
true
:
false
},
},
setItemDisabled
(
item
,
index
)
{
setItemDisabled
(
item
,
index
)
{
const
{
phone
,
shopMerchantId
}
=
uni
.
$storage
.
get
(
"userInfo"
)
const
{
storageKey
}
=
this
this
.
insuranceList
[
index
].
show
=
!
item
.
show
this
.
insuranceList
[
index
].
show
=
!
item
.
show
uni
.
setStorageSync
(
`
${
shopMerchantId
}
_
${
phone
}
_insurance_list`
,
this
.
insuranceList
);
uni
.
setStorageSync
(
storageKey
,
this
.
insuranceList
);
},
},
/**
/**
* 查询门店保险权益
* 查询门店保险权益
*/
*/
async
getMerchantInsuranceList
()
{
async
getMerchantInsuranceList
()
{
try
{
try
{
const
{
phone
,
shopMerchantId
}
=
uni
.
$storage
.
get
(
"userInfo"
),
const
{
storageKey
}
=
this
,
{
shopMerchantId
}
=
uni
.
$storage
.
get
(
"userInfo"
),
storageInsuranceList
=
uni
.
getStorageSync
(
storageKey
),
list
=
await
uni
.
$api
.
userApi
.
getMerchantInsuranceList
({
list
=
await
uni
.
$api
.
userApi
.
getMerchantInsuranceList
({
merchantId
:
shopMerchantId
,
merchantId
:
shopMerchantId
,
}),
})
insuranceList
=
uni
.
getStorageSync
(
`
${
shopMerchantId
}
_
${
phone
}
_insurance_list`
)
list
?.
map
(
e
=>
{
list
?.
map
(
e
=>
{
e
.
cost
=
''
e
.
cost
=
''
e
.
show
=
true
e
.
checked
=
true
e
.
checked
=
false
e
.
main
=
e
.
itemName
==
'交强险'
?
'交强险'
:
'商业险'
e
.
main
=
e
.
itemName
==
'交强险'
?
'交强险'
:
'商业险'
e
.
show
=
false
e
.
itemDesc
=
this
.
processHtmlString
(
e
.
itemDesc
)
})
if
(
!
storageInsuranceList
)
{
uni
.
showLoading
({
mask
:
true
})
})
if
(
!
insuranceList
)
{
this
.
setInsuranceList
(
storageKey
,
list
||
[])
this
.
insuranceList
=
list
uni
.
setStorageSync
(
`
${
shopMerchantId
}
_
${
phone
}
_insurance_list`
,
list
||
[]);
}
}
else
{
else
{
const
combinedList
=
[...
insuranceList
,
...
list
]
const
{
insuranceList
}
=
this
,
combinedList
=
[...
insuranceList
,
...
list
]
const
deduplicatedList
=
combinedList
.
reduce
((
acc
,
item
)
=>
{
const
deduplicatedList
=
combinedList
.
reduce
((
acc
,
item
)
=>
{
const
existingItem
=
acc
.
find
(
existing
=>
String
(
existing
.
id
)
===
String
(
item
.
id
));
const
existingItem
=
acc
.
find
(
existing
=>
String
(
existing
.
id
)
===
String
(
item
.
id
));
if
(
existingItem
)
{
if
(
existingItem
)
{
existingItem
.
itemName
=
item
.
itemName
||
existingItem
.
itemName
;
existingItem
.
itemName
=
item
.
itemName
||
''
existingItem
.
itemDesc
=
item
.
itemDesc
||
existingItem
.
itemDesc
;
existingItem
.
itemDesc
=
item
.
itemDesc
||
''
if
(
this
.
currentItem
.
id
==
existingItem
.
id
)
this
.
currentItem
=
existingItem
}
else
acc
.
push
(
item
)
}
else
acc
.
push
(
item
)
return
acc
;
return
acc
;
},
[])
},
[])
this
.
insuranceList
=
deduplicatedList
this
.
setInsuranceList
(
storageKey
,
deduplicatedList
)
uni
.
setStorageSync
(
`
${
shopMerchantId
}
_
${
phone
}
_insurance_list`
,
deduplicatedList
);
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
this
.
flag
=
true
}
}
},
setInsuranceList
(
storageKey
,
value
)
{
uni
.
hideLoading
()
this
.
insuranceList
=
value
uni
.
setStorageSync
(
storageKey
,
value
);
this
.
flag
=
true
},
processHtmlString
(
htmlString
)
{
const
regexStyle
=
/style="
[^
"
]
*"/g
const
regexBr
=
/<
\/
br>|<br>|<br
\/
>|
\n
/g
let
processedString
=
htmlString
.
replace
(
regexBr
,
'<div></div>'
)
let
newHtmlString
=
processedString
.
replace
(
regexStyle
,
''
)
return
newHtmlString
}
}
}
}
}
}
...
@@ -223,6 +266,7 @@ export default {
...
@@ -223,6 +266,7 @@ export default {
font-weight
:
500
;
font-weight
:
500
;
font-size
:
26
rpx
;
font-size
:
26
rpx
;
color
:
#292d33
;
color
:
#292d33
;
line-height
:
40
rpx
;
.title-item
{
.title-item
{
height
:
96
rpx
;
height
:
96
rpx
;
justify-content
:
center
;
justify-content
:
center
;
...
@@ -280,6 +324,7 @@ export default {
...
@@ -280,6 +324,7 @@ export default {
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
flex-shrink
:
0
;
flex-shrink
:
0
;
transition
:
all
0.25s
;
}
}
.name
,
.name
,
.range
{
.range
{
...
@@ -311,6 +356,7 @@ export default {
...
@@ -311,6 +356,7 @@ export default {
justify-content
:
center
;
justify-content
:
center
;
overflow
:
hidden
;
overflow
:
hidden
;
font-weight
:
700
;
font-weight
:
700
;
transition
:
all
0.25s
;
}
}
.checked
{
.checked
{
background
:
#2c66f7
;
background
:
#2c66f7
;
...
@@ -385,6 +431,17 @@ export default {
...
@@ -385,6 +431,17 @@ export default {
}
}
}
}
}
}
.disabled-input
{
.cost
{
&-input
{
border-color
:
#d8dce6
;
.input,
.unit
{
color
:
#cccccc
;
}
}
}
}
}
}
&
::before
{
&
::before
{
position
:
absolute
;
position
:
absolute
;
...
@@ -406,6 +463,21 @@ export default {
...
@@ -406,6 +463,21 @@ export default {
content
:
''
;
content
:
''
;
z-index
:
-1
;
z-index
:
-1
;
}
}
.nothing
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
justify-content
:
center
;
flex-direction
:
column
;
font-size
:
26
rpx
;
color
:
#808291
;
.sprite-icon
{
margin-bottom
:
24
rpx
;
}
}
}
}
.views-footer
{
.views-footer
{
height
:
96
rpx
;
height
:
96
rpx
;
...
@@ -458,6 +530,7 @@ export default {
...
@@ -458,6 +530,7 @@ export default {
position
:
relative
;
position
:
relative
;
.name
{
.name
{
width
:
296
rpx
!important
;
width
:
296
rpx
!important
;
padding
:
0
24
rpx
!important
;
}
}
.show
{
.show
{
border-left
:
none
;
border-left
:
none
;
...
...
pages/common/components/Scene.vue
View file @
94f0107
...
@@ -116,6 +116,7 @@ export default {
...
@@ -116,6 +116,7 @@ export default {
})
})
uni
.
hideLoading
()
uni
.
hideLoading
()
userInfo
.
channelType
=
res
.
channelType
||
1
// 默认1 1问界 2 比亚迪 3 其他
userInfo
.
channelType
=
res
.
channelType
||
1
// 默认1 1问界 2 比亚迪 3 其他
// userInfo.channelType = 3
uni
.
$storage
.
set
(
'userInfo'
,
userInfo
)
uni
.
$storage
.
set
(
'userInfo'
,
userInfo
)
let
url
=
{
let
url
=
{
1
:
'/pages/boutique/index'
,
1
:
'/pages/boutique/index'
,
...
...
pages/equity/index.vue
View file @
94f0107
...
@@ -83,6 +83,13 @@ export default {
...
@@ -83,6 +83,13 @@ export default {
recording
:
false
,
recording
:
false
,
};
};
},
},
computed
:
{
/**是否是问界 */
isAITO
()
{
const
{
channelType
}
=
uni
.
$storage
.
get
(
"userInfo"
)
return
(
channelType
!=
2
&&
channelType
!=
3
)
}
},
onBackPress
(
options
)
{
onBackPress
(
options
)
{
if
(
options
.
from
===
"backbutton"
)
{
if
(
options
.
from
===
"backbutton"
)
{
// 物理返回按钮触发
// 物理返回按钮触发
...
@@ -94,10 +101,14 @@ export default {
...
@@ -94,10 +101,14 @@ export default {
return
false
;
return
false
;
},
},
onLoad
()
{
onLoad
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
const
{
mock_data
=
uni
.
$storage
.
get
(
"mock_data"
)
||
{}
default_moduleList
,
this
.
moduleList
=
(
userInfo
.
channelType
==
3
?
mock_data
.
default_moduleList
:
mock_data
.
moduleList
)
||
[];
default_toolList
,
this
.
toolList
=
(
userInfo
.
channelType
==
3
?
mock_data
.
default_toolList
:
mock_data
.
toolList
)
||
[];
moduleList
,
toolList
}
=
uni
.
$storage
.
get
(
"mock_data"
)
||
{}
this
.
moduleList
=
(
this
.
isAITO
?
moduleList
:
default_moduleList
)
||
[]
this
.
toolList
=
(
this
.
isAITO
?
toolList
:
default_toolList
)
||
[]
this
.
getSoure
();
this
.
getSoure
();
this
.
get_Vehicle_Sales_Data
();
this
.
get_Vehicle_Sales_Data
();
},
},
...
@@ -159,12 +170,10 @@ export default {
...
@@ -159,12 +170,10 @@ export default {
},
},
// 查询素材
// 查询素材
async
getSoure
()
{
async
getSoure
()
{
const
{
channelType
}
=
uni
.
$storage
.
get
(
"userInfo"
);
let
{
moduleList
,
toolList
,
default_moduleList
,
default_toolList
}
=
await
uni
.
$api
.
systemApi
.
getMockData
(
let
{
moduleList
,
toolList
,
default_moduleList
,
default_toolList
}
=
await
uni
.
$api
.
systemApi
.
getMockData
(
true
true
);
);
if
(
channelType
==
3
)
default_toolList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
default_toolList
,
"shortTitleUrl"
);
if
(
this
.
isAITO
)
{
else
{
/**默认问界 */
/**默认问界 */
await
moduleList
.
map
(
async
(
e
)
=>
{
await
moduleList
.
map
(
async
(
e
)
=>
{
if
(
e
.
receptionSourceDetailList
)
if
(
e
.
receptionSourceDetailList
)
...
@@ -188,9 +197,9 @@ export default {
...
@@ -188,9 +197,9 @@ export default {
toolList
,
toolList
,
"shortTitleUrl"
"shortTitleUrl"
);
);
}
}
else
default_toolList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
default_toolList
,
"shortTitleUrl"
);
this
.
moduleList
=
channelType
==
3
?
default_moduleList
:
moduleList
;
this
.
moduleList
=
this
.
isAITO
?
moduleList
:
default_moduleList
this
.
toolList
=
channelType
==
3
?
default_toolList
:
toolList
this
.
toolList
=
this
.
isAITO
?
toolList
:
default_
toolList
uni
.
$api
.
systemApi
.
updateMockData
({
uni
.
$api
.
systemApi
.
updateMockData
({
default_moduleList
,
default_moduleList
,
default_toolList
,
default_toolList
,
...
@@ -202,16 +211,16 @@ export default {
...
@@ -202,16 +211,16 @@ export default {
this
.
moduleList
[
index
].
showAlt
=
true
;
this
.
moduleList
[
index
].
showAlt
=
true
;
},
},
async
start
()
{
async
start
()
{
//
const result = await this.$permision.requestAndroidPermission(
const
result
=
await
this
.
$permision
.
requestAndroidPermission
(
//
"android.permission.RECORD_AUDIO"
"android.permission.RECORD_AUDIO"
//
);
);
//
if (result !== 1) {
if
(
result
!==
1
)
{
//
uni.showToast({
uni
.
showToast
({
//
title: "为了记录语音通话,请打开录音权限",
title
:
"为了记录语音通话,请打开录音权限"
,
//
icon: "none",
icon
:
"none"
,
//
});
});
//
return;
return
;
//
}
}
this
.
getSoure
();
this
.
getSoure
();
this
.
clearHistory
();
this
.
clearHistory
();
this
.
$refs
.
home
.
startAudio
();
this
.
$refs
.
home
.
startAudio
();
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment