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 b5203313
authored
Dec 02, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 轻改需求
1 parent
da0bd622
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
169 additions
and
101 deletions
components/CarBrands.vue
pages/boutique/case.vue
pages/boutique/components/OptionalTable.vue
pages/boutique/components/Reception.vue
pages/boutique/components/SkuBox.vue
pages/boutique/detail.vue
pages/boutique/index.vue
pages/boutique/invitation.vue
store/modules/user.js
components/CarBrands.vue
View file @
b520331
...
@@ -98,15 +98,12 @@ export default {
...
@@ -98,15 +98,12 @@ export default {
mounted
()
{
mounted
()
{
},
},
methods
:
{
methods
:
{
autoSelect
(
index
=
0
,
autoHideLoading
=
true
)
{
autoSelect
()
{
const
{
carBrandList
,
boutiqueDefaultCarBrandId
}
=
this
const
{
carBrandList
,
boutiqueDefaultCarBrandId
}
=
this
let
carIndex
=
0
let
carIndex
=
0
if
(
boutiqueDefaultCarBrandId
)
{
if
(
boutiqueDefaultCarBrandId
)
carIndex
=
carBrandList
.
findIndex
(
e
=>
e
.
id
==
boutiqueDefaultCarBrandId
)
carIndex
=
carBrandList
.
findIndex
(
e
=>
e
.
id
==
boutiqueDefaultCarBrandId
)
if
(
carIndex
<
0
)
carIndex
=
0
if
(
carIndex
<
0
)
carIndex
=
0
}
if
(
carBrandList
.
length
)
this
.
selectCar
(
carBrandList
[
carIndex
],
true
)
if
(
index
<
0
)
index
=
0
if
(
carBrandList
.
length
)
this
.
selectCar
(
carBrandList
[
carIndex
],
true
,
index
,
autoHideLoading
)
},
},
open
()
{
open
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
...
@@ -140,8 +137,13 @@ export default {
...
@@ -140,8 +137,13 @@ export default {
this
.
$refs
.
carBrandListVisible
.
open
()
this
.
$refs
.
carBrandListVisible
.
open
()
this
.
carBrandListOff
=
true
this
.
carBrandListOff
=
true
},
},
selectCar
(
e
,
auto
=
false
,
index
,
autoHideLoading
=
true
)
{
selectCar
(
e
,
auto
=
false
,
carId
)
{
let
{
clickFlga
}
=
this
if
(
!
e
.
brandId
||
!
e
.
id
)
return
uni
.
showToast
({
title
:
"车型ID或品牌ID为空"
,
icon
:
"none"
,
});
let
{
clickFlga
}
=
this
,
index
=
0
if
(
clickFlga
)
return
if
(
clickFlga
)
return
this
.
clickFlga
=
true
this
.
clickFlga
=
true
this
.
selectItem
=
{
this
.
selectItem
=
{
...
@@ -154,7 +156,11 @@ export default {
...
@@ -154,7 +156,11 @@ export default {
if
(
carList
)
{
if
(
carList
)
{
this
.
clickFlga
=
false
this
.
clickFlga
=
false
this
.
carlist
=
carList
this
.
carlist
=
carList
if
(
auto
&&
carList
.
length
)
this
.
handleSelect
(
carList
[
index
])
if
(
auto
&&
carList
.
length
)
{
if
(
carId
)
index
=
carList
.
findIndex
(
i
=>
i
.
id
==
carId
)
if
(
index
<
0
)
index
=
0
this
.
handleSelect
(
carList
[
index
])
}
else
this
.
$refs
.
carBoxVisible
.
open
()
else
this
.
$refs
.
carBoxVisible
.
open
()
}
else
{
}
else
{
if
(
!
auto
)
uni
.
showLoading
({
if
(
!
auto
)
uni
.
showLoading
({
...
@@ -165,11 +171,15 @@ export default {
...
@@ -165,11 +171,15 @@ export default {
brandId
:
e
.
brandId
,
brandId
:
e
.
brandId
,
childBrandId
:
e
.
id
childBrandId
:
e
.
id
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
autoHideLoading
)
uni
.
hideLoading
()
uni
.
hideLoading
()
this
.
carlist
=
res
this
.
carlist
=
res
if
(
res
)
uni
.
setStorageSync
(
`
${
e
.
id
}
_
${
e
.
brandId
}
_carlist`
,
res
)
if
(
res
)
uni
.
setStorageSync
(
`
${
e
.
id
}
_
${
e
.
brandId
}
_carlist`
,
res
)
if
(
!
carList
)
{
if
(
!
carList
)
{
if
(
auto
&&
res
.
length
)
this
.
handleSelect
(
res
[
index
])
if
(
auto
&&
res
.
length
)
{
if
(
carId
)
index
=
res
.
findIndex
(
i
=>
i
.
id
==
carId
)
if
(
index
<
0
)
index
=
0
this
.
handleSelect
(
res
[
index
])
}
else
this
.
$refs
.
carBoxVisible
.
open
()
else
this
.
$refs
.
carBoxVisible
.
open
()
}
}
this
.
clickFlga
=
false
this
.
clickFlga
=
false
...
...
pages/boutique/case.vue
View file @
b520331
...
@@ -310,6 +310,7 @@ export default {
...
@@ -310,6 +310,7 @@ export default {
background
:
#ffffff
;
background
:
#ffffff
;
border-radius
:
16
rpx
;
border-radius
:
16
rpx
;
padding
:
16
rpx
0
;
padding
:
16
rpx
0
;
animation
:
show-view-opacity
0.15s
forwards
;
.type-item
{
.type-item
{
padding
:
0
24
rpx
;
padding
:
0
24
rpx
;
margin-bottom
:
8
rpx
;
margin-bottom
:
8
rpx
;
...
...
pages/boutique/components/OptionalTable.vue
View file @
b520331
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
import
NP
from
'number-precision'
import
NP
from
'number-precision'
export
default
{
export
default
{
props
:
{
props
:
{
currentCar
:
String
,
currentCar
:
[
Number
,
String
]
,
show
:
Boolean
show
:
Boolean
},
},
data
()
{
data
()
{
...
@@ -103,7 +103,6 @@ export default {
...
@@ -103,7 +103,6 @@ export default {
currentCar
:
{
currentCar
:
{
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
console
.
log
(
newval
)
this
.
optionalsList
=
[]
this
.
optionalsList
=
[]
this
.
init
()
this
.
init
()
}
}
...
...
pages/boutique/components/Reception.vue
View file @
b520331
...
@@ -14,19 +14,22 @@
...
@@ -14,19 +14,22 @@
@
click
.
stop=
"showSelect"
@
click
.
stop=
"showSelect"
>
>
{{
currentCarString
}}
{{
currentCarString
}}
<view
class=
"sprite-icon icon-arrow-bottom"
v-if=
"carList.length > 1 && !change_disabled"
></view>
<view
class=
"sprite-icon icon-arrow-bottom"
v-if=
"carList.length > 1 && !change_disabled"
></view>
</view>
</view>
<view
<view
class=
"pop-box"
class=
"pop-box"
v-show=
"isSelect"
v-show=
"isSelect"
>
>
<template
v-for=
"(i,index) in carList"
>
<view
<view
v-for=
"i in carList"
:key=
"i.carModelId"
:key=
"i.label"
:class=
"['type-item flex',
{active:i.carModelId == currentCarId},{'has-line':showLine(i,index)},{'is-first':index == 0}]"
class=
"type-item flex"
:class=
"i == currentCarString ? 'active' : ''"
@click="changeCar(i)"
@click="changeCar(i)"
>
{{
i
}}
</view>
>
{{
i
.
carModelName
}}
</view>
</
template
>
</view>
</view>
</view>
</view>
<view
<view
...
@@ -59,7 +62,7 @@
...
@@ -59,7 +62,7 @@
<view
class=
"right-content"
>
<view
class=
"right-content"
>
<view
:class=
"['sku-box',isPreview ? 'preview' : '']"
>
<view
:class=
"['sku-box',isPreview ? 'preview' : '']"
>
<sku-box
<sku-box
:currentCar=
"currentCar
String
"
:currentCar=
"currentCar
Id
"
:defaultTabId=
"tabId"
:defaultTabId=
"tabId"
:show=
"show && tabIndex == 0"
:show=
"show && tabIndex == 0"
@
changePreView=
"changePreView"
@
changePreView=
"changePreView"
...
@@ -75,7 +78,7 @@
...
@@ -75,7 +78,7 @@
</view>
</view>
<optional-table
<optional-table
v-show=
"tabIndex == 1"
v-show=
"tabIndex == 1"
:currentCar=
"currentCar
String
"
:currentCar=
"currentCar
Id
"
:show=
"show && tabIndex == 1"
:show=
"show && tabIndex == 1"
></optional-table>
></optional-table>
<
template
v-if=
"hasOptionals"
>
<
template
v-if=
"hasOptionals"
>
...
@@ -116,9 +119,6 @@ import CarBrands from '@/components/CarBrands.vue'
...
@@ -116,9 +119,6 @@ import CarBrands from '@/components/CarBrands.vue'
import
CouponPop
from
'./CouponPop.vue'
import
CouponPop
from
'./CouponPop.vue'
import
RiskInformedBox
from
'./RiskInformedBox.vue'
import
RiskInformedBox
from
'./RiskInformedBox.vue'
import
OptionalTable
from
'./OptionalTable.vue'
import
OptionalTable
from
'./OptionalTable.vue'
const
m5
=
require
(
"@/assets/images/boutique/index/m5.png"
)
const
m7
=
require
(
"@/assets/images/boutique/index/m7.png"
)
const
m9
=
require
(
"@/assets/images/boutique/index/m9.png"
)
export
default
{
export
default
{
name
:
'Reception'
,
name
:
'Reception'
,
components
:
{
SkuBox
,
CarBrands
,
CouponPop
,
RiskInformedBox
,
OptionalTable
},
components
:
{
SkuBox
,
CarBrands
,
CouponPop
,
RiskInformedBox
,
OptionalTable
},
...
@@ -126,7 +126,7 @@ export default {
...
@@ -126,7 +126,7 @@ export default {
customerType
:
Number
,
customerType
:
Number
,
show
:
Boolean
,
show
:
Boolean
,
tabId
:
Number
,
tabId
:
Number
,
currentCar
:
String
,
propCarId
:
[
Number
,
String
]
,
type
:
String
,
type
:
String
,
popupImg
:
String
,
popupImg
:
String
,
madiaId
:
Number
,
madiaId
:
Number
,
...
@@ -143,6 +143,7 @@ export default {
...
@@ -143,6 +143,7 @@ export default {
tabs
:
[
'加装'
,
'选装'
],
tabs
:
[
'加装'
,
'选装'
],
tabIndex
:
0
,
tabIndex
:
0
,
isSelect
:
false
,
isSelect
:
false
,
currentCarId
:
''
}
}
},
},
watch
:
{
watch
:
{
...
@@ -152,13 +153,14 @@ export default {
...
@@ -152,13 +153,14 @@ export default {
this
.
customerInfo
=
newval
this
.
customerInfo
=
newval
}
}
},
},
currentCar
:
{
propCarId
:
{
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
this
.
currentCarString
=
newval
this
.
currentCarId
=
newval
this
.
currentCarString
=
this
.
carList
.
find
(
e
=>
e
.
carModelId
==
newval
)?.
carModelName
||
''
}
}
},
},
currentCar
String
:
{
currentCar
Id
:
{
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
if
(
!
this
.
hasOptionals
&&
this
.
tabIndex
==
1
)
this
.
tabIndex
=
0
if
(
!
this
.
hasOptionals
&&
this
.
tabIndex
==
1
)
this
.
tabIndex
=
0
...
@@ -166,7 +168,8 @@ export default {
...
@@ -166,7 +168,8 @@ export default {
uni
.
showLoading
({
uni
.
showLoading
({
mask
:
true
mask
:
true
})
})
this
.
$refs
.
carBrandRef
.
autoSelect
(
this
.
carList
.
findIndex
(
e
=>
e
==
newval
),
false
)
let
item
=
this
.
carList
.
find
(
e
=>
e
.
carModelId
==
newval
)
this
.
$refs
.
carBrandRef
.
selectCar
(
item
,
true
,
newval
)
}
}
}
}
},
},
...
@@ -196,21 +199,18 @@ export default {
...
@@ -196,21 +199,18 @@ export default {
watchCustomerInfo
()
{
watchCustomerInfo
()
{
return
this
.
$store
.
state
.
user
.
customerInfo
return
this
.
$store
.
state
.
user
.
customerInfo
},
},
currentIndex
()
{
return
this
.
carList
.
findIndex
(
e
=>
e
==
this
.
currentCarString
)
},
isPreview
()
{
isPreview
()
{
return
this
.
type
==
'preview'
return
this
.
type
==
'preview'
},
},
couponText
()
{
couponText
()
{
return
this
.
customerType
==
0
?
'查看客户券码'
:
'为客户发券'
return
this
.
customerType
==
0
?
'查看客户券码'
:
'为客户发券'
},
},
change_disabled
()
{
return
this
.
customerType
==
0
||
this
.
couponPopupRef
.
pageParams
.
QRURL
},
couponPopupRef
()
{
couponPopupRef
()
{
return
this
.
$refs
.
couponPopup
return
this
.
$refs
.
couponPopup
},
},
change_disabled
()
{
return
this
.
customerType
==
0
||
this
.
$refs
?.
couponPopup
?.
pageParams
.
QRURL
},
receptionTrack
()
{
receptionTrack
()
{
return
this
.
$store
.
state
.
user
.
receptionTrack
return
this
.
$store
.
state
.
user
.
receptionTrack
},
},
...
@@ -219,23 +219,19 @@ export default {
...
@@ -219,23 +219,19 @@ export default {
},
},
hasOptionals
()
{
hasOptionals
()
{
let
flag
=
false
let
flag
=
false
if
(
this
.
show
)
flag
=
this
.
boutiqueMediaConfig
[
this
.
currentCar
String
].
optionals
&&
this
.
boutiqueMediaConfig
[
this
.
currentCarString
].
optionals
.
length
if
(
this
.
show
)
flag
=
this
.
boutiqueMediaConfig
[
this
.
currentCar
Id
].
optionals
&&
this
.
boutiqueMediaConfig
[
this
.
currentCarId
].
optionals
.
length
return
flag
return
flag
},
},
carList
()
{
carList
()
{
let
{
boutiqueMediaConfig
}
=
this
,
return
this
.
$store
.
state
.
user
.
boutiqueCarList
carList
=
[]
Object
.
keys
(
boutiqueMediaConfig
).
map
(
e
=>
carList
.
push
(
e
))
console
.
log
(
carList
)
return
carList
}
}
},
},
methods
:
{
methods
:
{
changeCar
(
item
)
{
changeCar
(
item
)
{
if
(
this
.
change_disabled
||
this
.
currentCarString
==
item
)
return
uni
.
hideLoading
()
if
(
this
.
change_disabled
||
this
.
currentCarId
==
item
.
carModelId
)
return
uni
.
hideLoading
()
this
.
currentCarString
=
item
this
.
currentCarString
=
item
.
carModelName
this
.
currentCarId
=
item
.
carModelId
this
.
isSelect
=
false
this
.
isSelect
=
false
this
.
updateViewKey
=
Date
.
now
()
this
.
updateViewKey
=
Date
.
now
()
this
.
clearCanvas
()
this
.
clearCanvas
()
...
@@ -309,9 +305,15 @@ export default {
...
@@ -309,9 +305,15 @@ export default {
else
this
.
$refs
.
sku
.
changeCar
(
this
.
currentCarString
)
else
this
.
$refs
.
sku
.
changeCar
(
this
.
currentCarString
)
this
.
clearCanvas
()
this
.
clearCanvas
()
},
},
showSelect
()
{
showSelect
()
{
if
(
this
.
carList
.
length
==
1
||
this
.
change_disabled
)
return
if
(
this
.
carList
.
length
==
1
||
this
.
change_disabled
)
return
this
.
isSelect
=
!
this
.
isSelect
this
.
isSelect
=
!
this
.
isSelect
},
showLine
(
item
,
index
)
{
let
result
=
true
,
{
carList
}
=
this
if
(
index
!=
0
&&
item
.
id
==
carList
[
index
-
1
].
id
)
result
=
false
return
result
}
}
}
}
}
}
...
@@ -361,12 +363,17 @@ export default {
...
@@ -361,12 +363,17 @@ export default {
left
:
50%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
transform
:
translateX
(
-50%
);
padding
:
12
rpx
0
;
padding
:
12
rpx
0
;
animation
:
show-view-opacity
0.15s
forwards
;
.type-item
{
.type-item
{
padding
:
0
24
rpx
;
padding
:
0
24
rpx
;
margin
-bottom
:
8
rpx
;
margin
:
8
rpx
0
;
height
:
56
rpx
;
height
:
56
rpx
;
color
:
#292d33
;
color
:
#292d33
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
position
:
relative
;
&:first-child
{
margin-top
:
0
;
}
&
:last-child
{
&
:last-child
{
margin-bottom
:
0
;
margin-bottom
:
0
;
}
}
...
@@ -374,6 +381,24 @@ export default {
...
@@ -374,6 +381,24 @@ export default {
background-color
:
#ecf1ff
;
background-color
:
#ecf1ff
;
}
}
}
}
.has-line
{
margin-top
:
18
rpx
;
&::after
{
content
:
''
;
width
:
calc
(
100%
-
48
rpx
);
height
:
2
rpx
;
background
:
#f5f5f5
;
position
:
absolute
;
left
:
50%
;
top
:
-10
rpx
;
transform
:
translateX
(
-50%
);
}
}
.is-first
{
&::after
{
display
:
none
;
}
}
}
}
}
}
.content-box
{
.content-box
{
...
...
pages/boutique/components/SkuBox.vue
View file @
b520331
...
@@ -87,7 +87,7 @@ export default {
...
@@ -87,7 +87,7 @@ export default {
name
:
'SkuBox'
,
name
:
'SkuBox'
,
props
:
{
props
:
{
defaultTabId
:
Number
,
defaultTabId
:
Number
,
currentCar
:
String
,
currentCar
:
[
Number
,
String
]
,
show
:
Boolean
show
:
Boolean
},
},
...
...
pages/boutique/detail.vue
View file @
b520331
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
:show=
"id == item.id"
:show=
"id == item.id"
@
reception=
"reception"
@
reception=
"reception"
:tabId=
"tabId"
:tabId=
"tabId"
:
currentCar=
"currentCar
"
:
propCarId=
"currentCarId
"
:type=
"type"
:type=
"type"
:popupImg=
"item.popupImg"
:popupImg=
"item.popupImg"
@
preview=
"onPreview"
@
preview=
"onPreview"
...
@@ -118,7 +118,7 @@ export default {
...
@@ -118,7 +118,7 @@ export default {
customerType
:
Number
,
customerType
:
Number
,
toolList
:
Array
,
toolList
:
Array
,
tabId
:
Number
,
tabId
:
Number
,
currentCar
:
String
currentCar
Id
:
[
Number
,
String
]
},
},
mixins
:
[
receptionTrackMixin
],
mixins
:
[
receptionTrackMixin
],
data
()
{
data
()
{
...
@@ -210,7 +210,8 @@ export default {
...
@@ -210,7 +210,8 @@ export default {
salesUuid
:
item
.
userId
,
salesUuid
:
item
.
userId
,
staffName
:
item
.
employeeName
,
staffName
:
item
.
employeeName
,
receiveCouponDate
:
item
.
receiveCouponDate
,
receiveCouponDate
:
item
.
receiveCouponDate
,
customerCouponId
:
item
.
customerCouponId
customerCouponId
:
item
.
customerCouponId
,
carSeriesId
:
item
.
carSeriesId
}
}
let
[
reception
]
=
this
.
$refs
.
media1
let
[
reception
]
=
this
.
$refs
.
media1
reception
?.
clearCustomerReceivedTimer
()
reception
?.
clearCustomerReceivedTimer
()
...
...
pages/boutique/index.vue
View file @
b520331
...
@@ -30,12 +30,19 @@
...
@@ -30,12 +30,19 @@
</
template
>
</
template
>
</view>
</view>
<view
class=
"center-bg"
></view>
<view
class=
"center-bg"
></view>
<view
class=
"banner-tab-box-content"
>
<view
class=
"banner-tab-scroll"
>
<scroll-view
class=
"banner-tab-box-content"
scroll-x
:scroll-into-view=
"bannerTabId"
scroll-with-animation
>
<view
class=
"banner-tab-box flex"
>
<view
class=
"banner-tab-box flex"
>
<
template
v-for=
"(item, index) in carBannerList"
>
<
template
v-for=
"(item, index) in carBannerList"
>
<view
<view
:class=
"['banner-item',
{'has-title':showCarBrand(item,index)},{'is-first':index == 0}]"
:class=
"['banner-item',
{'has-title':showCarBrand(item,index)},{'is-first':index == 0}]"
:key="index"
:key="index"
:id="`car-banner-${index}`"
>
>
<view
class=
"banner-title"
>
{{
item
.
title
}}
</view>
<view
class=
"banner-title"
>
{{
item
.
title
}}
</view>
<view
<view
...
@@ -47,10 +54,12 @@
...
@@ -47,10 +54,12 @@
</view>
</view>
</
template
>
</
template
>
<view
class=
"block"
></view>
</view>
</view>
</scroll-view>
<view
class=
"banner-tab-mask"
></view>
<view
class=
"banner-tab-mask"
></view>
</view>
</view>
<!-- :autoplay="bannerAutoplay && !previewOff" -->
<swiper
<swiper
class=
"swiper"
class=
"swiper"
circular
circular
...
@@ -59,7 +68,9 @@
...
@@ -59,7 +68,9 @@
next-margin=
"448rpx"
next-margin=
"448rpx"
@
change=
"swiperChange"
@
change=
"swiperChange"
:current=
"currentIndex"
:current=
"currentIndex"
:autoplay=
"bannerAutoplay && !previewOff"
>
>
<!-- :autoplay="bannerAutoplay && !previewOff" -->
<
template
v-for=
"(item, index) in carBannerList"
>
<
template
v-for=
"(item, index) in carBannerList"
>
<swiper-item
<swiper-item
:key=
"index"
:key=
"index"
...
@@ -108,7 +119,7 @@
...
@@ -108,7 +119,7 @@
:customerType
.
sync=
"customerType"
:customerType
.
sync=
"customerType"
@
reception=
"reception"
@
reception=
"reception"
:tabId
.
sync=
"tabId"
:tabId
.
sync=
"tabId"
:currentCar
=
"currentCar
"
:currentCar
Id=
"currentCarId
"
/>
/>
</
template
>
</
template
>
<
template
slot=
"content"
>
<
template
slot=
"content"
>
...
@@ -165,11 +176,13 @@ export default {
...
@@ -165,11 +176,13 @@ export default {
tabId
:
1
,
tabId
:
1
,
recording
:
false
,
recording
:
false
,
carBannerList
:
[],
carBannerList
:
[],
currentCar
:
''
,
currentCar
Id
:
''
,
currentIndex
:
0
,
currentIndex
:
0
,
bannerAutoplay
:
true
,
bannerAutoplay
:
true
,
previewOff
:
false
,
previewOff
:
false
,
mediaConfigList
:
[]
mediaConfigList
:
[],
bannerTabId
:
'car-banner-0'
,
defaultCarId
:
''
}
}
},
},
onBackPress
(
options
)
{
onBackPress
(
options
)
{
...
@@ -243,43 +256,55 @@ export default {
...
@@ -243,43 +256,55 @@ export default {
}).
then
(({
materials
,
hidePackage
})
=>
{
}).
then
(({
materials
,
hidePackage
})
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
let
boutiqueMediaConfig
=
{},
let
boutiqueMediaConfig
=
{},
carBannerList
=
[]
carBannerList
=
[],
boutiqueCarList
=
[]
materials
.
map
(
e
=>
{
materials
.
map
(
e
=>
{
if
(
e
.
carModelName
)
{
if
(
e
&&
e
.
carModelName
&&
e
.
carModelId
)
{
const
configItems
=
[
const
configItems
=
[
{
key
:
'films'
,
configIndex
:
1
},
{
key
:
'films'
,
configIndex
:
1
},
{
key
:
'products'
,
configIndex
:
2
}
{
key
:
'products'
,
configIndex
:
2
}
]
]
let
retrofitting
=
[]
let
retrofitting
=
[]
carBannerList
.
push
({
carBannerList
.
push
({
title
:
e
.
brandName
||
''
,
title
:
e
.
seriesName
||
e
.
brandName
||
''
,
url
:
e
.
carModelDisplayImgUrl
||
''
,
url
:
e
.
modelDisplayPicurl
||
''
,
name
:
e
.
carModelName
name
:
e
.
carModelName
,
carModelId
:
e
.
carModelId
,
seriesId
:
e
.
seriesId
,
})
boutiqueMediaConfig
[
e
.
carModelId
]
=
{}
boutiqueCarList
.
push
({
carModelName
:
e
.
carModelName
,
carModelId
:
e
.
carModelId
,
brandId
:
e
.
brandId
,
brandName
:
e
.
brandName
,
name
:
e
.
seriesName
,
id
:
e
.
seriesId
,
})
})
boutiqueMediaConfig
[
e
.
carModelName
]
=
{}
if
(
!
hidePackage
)
configItems
.
unshift
({
key
:
'packages'
,
configIndex
:
0
})
if
(
!
hidePackage
)
configItems
.
unshift
({
key
:
'packages'
,
configIndex
:
0
})
configItems
.
map
(
item
=>
{
configItems
.
map
(
item
=>
{
retrofitting
.
push
({
retrofitting
.
push
({
...
defaultConfig
[
item
.
configIndex
],
...
defaultConfig
[
item
.
configIndex
],
list
:
e
[
item
.
key
],
list
:
e
[
item
.
key
],
})
})
boutiqueMediaConfig
[
e
.
carModel
Name
].
retrofitting
=
retrofitting
boutiqueMediaConfig
[
e
.
carModel
Id
].
retrofitting
=
retrofitting
})
})
e
.
optionals
?.
map
(
item
=>
{
e
.
optionals
?.
map
(
item
=>
{
item
.
checked
=
false
item
.
checked
=
false
item
.
warranty
=
item
.
warranty
?.
replace
(
/<
\/?
br
\s
*
\/?
>|
\n
/g
,
'<br>'
)
item
.
warranty
=
item
.
warranty
?.
replace
(
/<
\/?
br
\s
*
\/?
>|
\n
/g
,
'<br>'
)
})
})
boutiqueMediaConfig
[
e
.
carModel
Name
].
optionals
=
e
.
optionals
boutiqueMediaConfig
[
e
.
carModel
Id
].
optionals
=
e
.
optionals
}
}
})
})
this
.
carBannerList
=
carBannerList
.
map
(
e
=>
{
this
.
carBannerList
=
carBannerList
.
map
(
e
=>
{
let
configList
=
[]
let
configList
=
[]
if
(
boutiqueMediaConfig
[
e
.
name
])
configList
=
boutiqueMediaConfig
[
e
.
name
].
retrofitting
if
(
boutiqueMediaConfig
[
e
.
carModelId
])
configList
=
boutiqueMediaConfig
[
e
.
carModelId
].
retrofitting
e
.
configList
=
configList
e
.
configList
=
configList
return
e
return
e
})
})
this
.
$store
.
state
.
user
.
boutiqueMediaConfig
=
boutiqueMediaConfig
this
.
$store
.
state
.
user
.
boutiqueMediaConfig
=
boutiqueMediaConfig
this
.
$store
.
state
.
user
.
boutiqueCarList
=
boutiqueCarList
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
error
)
console
.
log
(
error
)
uni
.
hideLoading
()
uni
.
hideLoading
()
...
@@ -292,10 +317,10 @@ export default {
...
@@ -292,10 +317,10 @@ export default {
},
},
// 查询素材
// 查询素材
async
getSoure
()
{
async
getSoure
()
{
let
{
moduleList
,
toolList
,
boutiqueDefaultCarBrand
Id
}
=
await
uni
.
$api
.
systemApi
.
getBoutiqueMockData
(
true
)
let
{
moduleList
,
toolList
,
defaultCar
Id
}
=
await
uni
.
$api
.
systemApi
.
getBoutiqueMockData
(
true
)
this
.
moduleList
=
moduleList
this
.
moduleList
=
moduleList
this
.
toolList
=
toolList
this
.
toolList
=
toolList
this
.
$store
.
state
.
user
.
boutiqueDefaultCarBrandId
=
boutiqueDefaultCarBrand
Id
this
.
defaultCarId
=
defaultCar
Id
},
},
toDetail
(
item
)
{
toDetail
(
item
)
{
this
.
chooseItem
=
item
this
.
chooseItem
=
item
...
@@ -311,7 +336,7 @@ export default {
...
@@ -311,7 +336,7 @@ export default {
this
.
type
=
"preview"
;
this
.
type
=
"preview"
;
this
.
id
=
id
;
this
.
id
=
id
;
this
.
tabId
=
tabId
this
.
tabId
=
tabId
this
.
currentCar
=
this
.
carBannerList
[
this
.
currentIndex
].
name
this
.
currentCar
Id
=
this
.
carBannerList
[
this
.
currentIndex
].
carModelId
},
},
back
()
{
back
()
{
if
(
!
this
.
id
)
return
uni
.
navigateBack
();
if
(
!
this
.
id
)
return
uni
.
navigateBack
();
...
@@ -331,7 +356,7 @@ export default {
...
@@ -331,7 +356,7 @@ export default {
this
.
$refs
.
detail
.
clearCustomerReceivedTimer
()
this
.
$refs
.
detail
.
clearCustomerReceivedTimer
()
this
.
id
=
""
;
this
.
id
=
""
;
this
.
type
=
""
;
this
.
type
=
""
;
this
.
currentCar
=
''
this
.
currentCar
Id
=
''
this
.
bannerAutoplay
=
true
this
.
bannerAutoplay
=
true
this
.
previewOff
=
false
this
.
previewOff
=
false
this
.
customerType
=
-
1
this
.
customerType
=
-
1
...
@@ -356,11 +381,11 @@ export default {
...
@@ -356,11 +381,11 @@ export default {
},
},
jumpPage
(
id
)
{
jumpPage
(
id
)
{
let
{
carBannerList
}
=
this
,
let
{
carBannerList
}
=
this
,
carIndex
=
1
carIndex
=
carBannerList
.
findIndex
(
e
=>
e
.
carModelId
==
this
.
defaultCarId
)
if
(
carBannerList
.
length
==
1
)
carIndex
=
0
if
(
carBannerList
.
length
==
1
||
carIndex
<
0
)
carIndex
=
0
//只有一个车型或者默认车型没有时
this
.
id
=
id
?
id
:
this
.
moduleList
[
0
].
id
this
.
id
=
id
?
id
:
this
.
moduleList
[
0
].
id
this
.
tabId
=
1
this
.
tabId
=
1
this
.
currentCar
=
carBannerList
[
carIndex
].
name
this
.
currentCar
Id
=
carBannerList
[
carIndex
].
carModelId
this
.
type
=
"edit"
this
.
type
=
"edit"
},
},
clearHistory
()
{
clearHistory
()
{
...
@@ -390,7 +415,7 @@ export default {
...
@@ -390,7 +415,7 @@ export default {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
id
=
""
;
this
.
id
=
""
;
this
.
type
=
""
;
this
.
type
=
""
;
this
.
currentCar
=
''
this
.
currentCar
Id
=
''
this
.
bannerAutoplay
=
true
this
.
bannerAutoplay
=
true
this
.
customerType
=
-
1
this
.
customerType
=
-
1
this
.
setReceptionStatus
(
e
);
this
.
setReceptionStatus
(
e
);
...
@@ -400,7 +425,7 @@ export default {
...
@@ -400,7 +425,7 @@ export default {
},
},
/**客户邀约接待 */
/**客户邀约接待 */
reception
(
customer
)
{
reception
(
customer
)
{
this
.
currentCar
=
''
this
.
currentCar
Id
=
''
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
let
{
customerType
}
=
this
let
{
customerType
}
=
this
if
(
customerType
==
-
1
)
this
.
start
(
false
)
//开始接待
if
(
customerType
==
-
1
)
this
.
start
(
false
)
//开始接待
...
@@ -408,17 +433,20 @@ export default {
...
@@ -408,17 +433,20 @@ export default {
this
.
jumpPage
()
this
.
jumpPage
()
this
.
$nextTick
(()
=>
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
customer
))
this
.
$nextTick
(()
=>
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
customer
))
let
{
carBannerList
}
=
this
,
let
{
carBannerList
}
=
this
,
carIndex
=
1
currentCarId
=
''
,
if
(
carBannerList
.
length
==
1
)
carIndex
=
0
//只有一个车型时
carIndex
=
carBannerList
.
findIndex
(
e
=>
e
.
carModelId
==
this
.
defaultCarId
)
currentCar
=
carBannerList
[
carIndex
].
name
/**优先判断客户车型是否在banner中,没有则取默认车型 */
carBannerList
.
map
(
i
=>
{
if
(
carBannerList
.
findIndex
(
e
=>
e
.
carModelId
==
customer
.
carSeriesId
)
!=
-
1
)
currentCarId
=
customer
.
carSeriesId
if
(
customer
.
carModel
.
includes
(
i
.
name
))
currentCar
=
i
.
name
else
{
})
if
(
carBannerList
.
length
==
1
||
carIndex
<
0
)
carIndex
=
0
//只有一个车型或者默认M7没有时
this
.
currentCar
=
currentCar
currentCarId
=
carBannerList
[
carIndex
].
carModelId
}
this
.
currentCarId
=
currentCarId
})
})
},
},
swiperChange
(
e
)
{
swiperChange
(
e
)
{
this
.
currentIndex
=
e
.
detail
.
current
this
.
currentIndex
=
e
.
detail
.
current
this
.
bannerTabId
=
`car-banner-
${
e
.
detail
.
current
}
`
},
},
carClass
(
index
)
{
carClass
(
index
)
{
let
className
=
this
.
currentIndex
==
index
?
'current-item'
:
''
let
className
=
this
.
currentIndex
==
index
?
'current-item'
:
''
...
@@ -443,7 +471,7 @@ export default {
...
@@ -443,7 +471,7 @@ export default {
showCarBrand
(
item
,
index
)
{
showCarBrand
(
item
,
index
)
{
let
result
=
true
,
let
result
=
true
,
{
carBannerList
}
=
this
{
carBannerList
}
=
this
if
(
index
!=
0
&&
item
.
title
==
carBannerList
[
index
-
1
].
title
)
result
=
false
if
(
index
!=
0
&&
item
.
seriesId
==
carBannerList
[
index
-
1
].
seriesId
)
result
=
false
return
result
return
result
}
}
}
}
...
@@ -481,15 +509,19 @@ export default {
...
@@ -481,15 +509,19 @@ export default {
}
}
}
}
}
}
.banner-tab-
box-content
{
.banner-tab-
scroll
{
width
:
1080
rpx
;
width
:
1080
rpx
;
position
:
relative
;
position
:
relative
;
.banner-tab-box-content
{
width
:
100%
;
.block
{
width
:
30
rpx
;
height
:
100%
;
flex-shrink
:
0
;
}
.banner-tab-box
{
.banner-tab-box
{
padding
:
32
rpx
0
40
rpx
;
padding
:
32
rpx
0
20
rpx
;
overflow
:
auto
hidden
;
height
:
126
rpx
;
flex-wrap
:
nowrap
;
height
:
146
rpx
;
.banner-item
{
.banner-item
{
position
:
relative
;
position
:
relative
;
flex-shrink
:
0
;
flex-shrink
:
0
;
...
@@ -498,7 +530,7 @@ export default {
...
@@ -498,7 +530,7 @@ export default {
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-weight
:
400
;
font-weight
:
400
;
height
:
30
rpx
;
height
:
30
rpx
;
padding
-bottom
:
8
rpx
;
margin
-bottom
:
8
rpx
;
opacity
:
0
;
opacity
:
0
;
}
}
}
}
...
@@ -513,7 +545,7 @@ export default {
...
@@ -513,7 +545,7 @@ export default {
height
:
32
rpx
;
height
:
32
rpx
;
background
:
#cccccc
;
background
:
#cccccc
;
left
:
0
;
left
:
0
;
top
:
40
rpx
;
top
:
42
rpx
;
content
:
''
;
content
:
''
;
}
}
}
}
...
@@ -529,15 +561,14 @@ export default {
...
@@ -529,15 +561,14 @@ export default {
font-size
:
36
rpx
;
font-size
:
36
rpx
;
color
:
#333333
b3
;
color
:
#333333
b3
;
line-height
:
44
rpx
;
line-height
:
44
rpx
;
min-width
:
60
rpx
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
position
:
relative
;
position
:
relative
;
text-align
:
center
;
}
}
.active
{
.active
{
font-weight
:
700
;
font-weight
:
700
;
color
:
#333333
;
color
:
#333333
;
transition
:
all
1s
;
&::after
{
&::after
{
content
:
''
;
content
:
''
;
position
:
absolute
;
position
:
absolute
;
...
@@ -559,9 +590,10 @@ export default {
...
@@ -559,9 +590,10 @@ export default {
}
}
}
}
}
}
}
.banner-tab-mask
{
.banner-tab-mask
{
width
:
140
rpx
;
width
:
140
rpx
;
height
:
100%
;
height
:
calc
(
100%
-
20
rpx
)
;
opacity
:
1
;
opacity
:
1
;
background
:
linear-gradient
(
270deg
,
#e9edfa
0%
,
#e9edfa00
100%
);
background
:
linear-gradient
(
270deg
,
#e9edfa
0%
,
#e9edfa00
100%
);
position
:
absolute
;
position
:
absolute
;
...
...
pages/boutique/invitation.vue
View file @
b520331
...
@@ -127,7 +127,11 @@ export default {
...
@@ -127,7 +127,11 @@ export default {
watch
:
{
watch
:
{
show
:
{
show
:
{
handler
(
val
)
{
handler
(
val
)
{
if
(
val
)
this
.
init
()
if
(
val
)
{
this
.
flag
=
false
this
.
list
=
[]
this
.
init
()
}
this
.
$refs
.
receptionTips
?.
close
()
this
.
$refs
.
receptionTips
?.
close
()
},
},
immediate
:
true
immediate
:
true
...
@@ -137,7 +141,6 @@ export default {
...
@@ -137,7 +141,6 @@ export default {
methods
:
{
methods
:
{
init
()
{
init
()
{
this
.
customerNameOrPhone
=
''
;
this
.
customerNameOrPhone
=
''
;
console
.
log
(
'init'
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
isSearch
=
false
this
.
isSearch
=
false
this
.
pageNum
=
1
this
.
pageNum
=
1
...
...
store/modules/user.js
View file @
b520331
...
@@ -24,11 +24,8 @@ export default {
...
@@ -24,11 +24,8 @@ export default {
employeeList
:
[],
employeeList
:
[],
paymentType
:
[],
paymentType
:
[],
haveCustomerAccess
:
false
,
haveCustomerAccess
:
false
,
boutiqueMediaConfig
:
{
boutiqueMediaConfig
:
{},
M5
:
[],
boutiqueCarList
:[],
M7
:
[],
M9
:
[]
},
receptionTrack
:
{},
//接待记录埋点
receptionTrack
:
{},
//接待记录埋点
boutiqueDefaultCarBrandId
:
''
boutiqueDefaultCarBrandId
:
''
};
};
...
@@ -81,7 +78,7 @@ export default {
...
@@ -81,7 +78,7 @@ export default {
},
},
setReceptionTrack
({
state
},
{
key
,
value
})
{
setReceptionTrack
({
state
},
{
key
,
value
})
{
state
.
receptionTrack
[
key
]
=
value
state
.
receptionTrack
[
key
]
=
value
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
state
.
receptionTrack
)))
//
console.log(JSON.parse(JSON.stringify(state.receptionTrack)))
},
},
clearReceptionTrack
({
state
})
{
clearReceptionTrack
({
state
})
{
state
.
receptionTrack
=
{}
state
.
receptionTrack
=
{}
...
...
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