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 02b8e1d2
authored
Jun 25, 2026
by
Lin
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'saas+v5.8.3' of
http://192.168.3.233:8090/glsx/gl_tape
into saas+v5.8.3
2 parents
2484c906
80f0150d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
179 additions
and
129 deletions
components/CustomerOpportunities/components/Table.vue
components/CustomerOpportunities/components/TaskItem.vue
pages/boutique/components/GoodsBox.vue
pages/boutique/components/Reception.vue
pages/boutique/components/SkuBox.vue
components/CustomerOpportunities/components/Table.vue
View file @
02b8e1d
...
@@ -8,9 +8,9 @@
...
@@ -8,9 +8,9 @@
<view
class=
"header-item action-col"
>
操作
</view>
<view
class=
"header-item action-col"
>
操作
</view>
</view>
</view>
<template
v-if=
"loadComplete"
>
<template
v-if=
"loadComplete"
>
<template
v-if=
"
list
.length"
>
<template
v-if=
"
tableData
.length"
>
<scroll-view
class=
"table-body"
scroll-y
@
scrolltolower=
"$emit('loadMore')"
>
<scroll-view
class=
"table-body"
scroll-y
@
scrolltolower=
"$emit('loadMore')"
>
<view
v-for=
"(item, index) in
list
"
:key=
"index"
class=
"table-row"
>
<view
v-for=
"(item, index) in
tableData
"
:key=
"index"
class=
"table-row"
>
<view
class=
"row-item customer-col"
>
<view
class=
"row-item customer-col"
>
<view
class=
"customer-info"
>
<view
class=
"customer-info"
>
<view
class=
"avatar"
>
{{
getAvatar
(
item
.
customerName
)
}}
</view>
<view
class=
"avatar"
>
{{
getAvatar
(
item
.
customerName
)
}}
</view>
...
@@ -86,13 +86,18 @@ export default {
...
@@ -86,13 +86,18 @@ export default {
watch
:
{
watch
:
{
list
:
{
list
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
$nextTick
(()
=>
{
let
query
=
uni
.
createSelectorQuery
().
in
(
this
)
this
.
tableData
=
val
setTimeout
(()
=>
{
val
.
forEach
((
item
,
index
)
=>
{
val
.
forEach
((
item
,
index
)
=>
{
this
.
showTagMore
(
item
.
tags
,
index
)
query
.
select
(
`#tag-list-
${
index
}
`
).
boundingClientRect
((
data
)
=>
{
})
this
.
showTagMore
(
item
.
tagList
,
index
,
data
)
}).
exec
()
})
})
},
100
)
},
},
immediate
:
true
,
//
immediate: true,
deep
:
true
deep
:
true
}
}
},
},
...
@@ -133,29 +138,33 @@ export default {
...
@@ -133,29 +138,33 @@ export default {
orderHandleTime
(
time
)
{
orderHandleTime
(
time
)
{
return
time
?
dayjs
(
time
).
format
(
'YYYY-MM-DD'
)
:
''
return
time
?
dayjs
(
time
).
format
(
'YYYY-MM-DD'
)
:
''
},
},
showTagMore
(
tags
,
index
)
{
showTagMore
(
tags
,
index
,
listItem
)
{
let
query
=
uni
.
createSelectorQuery
(),
let
query
=
uni
.
createSelectorQuery
()
.
in
(
this
)
,
listItem
=
null
,
_this
=
this
,
targetIndex
=
0
targetIndex
=
0
if
(
this
.
tableData
[
index
]
&&
this
.
tableData
[
index
].
hasMoreTags
)
return
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
try
{
try
{
query
.
select
(
`#tag-list-
${
index
}
`
).
boundingClientRect
((
data
)
=>
{
const
promise
=
new
Promise
((
resolve
,
reject
)
=>
{
listItem
=
data
tags
?.
map
((
tag
,
tagIndex
)
=>
{
}).
exec
()
tags
?.
forEach
((
tag
,
tagIndex
)
=>
{
query
.
select
(
`#tag-
${
index
}
-
${
tagIndex
}
`
).
boundingClientRect
((
data
)
=>
{
query
.
select
(
`#tag-
${
index
}
-
${
tagIndex
}
`
).
boundingClientRect
((
data
)
=>
{
if
(
listItem
&&
data
.
top
>
(
listItem
.
height
+
listItem
.
top
)
&&
!
targetIndex
)
targetIndex
=
tagIndex
-
1
if
(
listItem
&&
data
.
top
>
(
listItem
.
height
+
listItem
.
top
)
&&
!
targetIndex
)
{
targetIndex
=
tagIndex
-
1
}
if
(
targetIndex
)
resolve
(
targetIndex
)
}).
exec
()
}).
exec
()
})
})
if
(
targetIndex
!=
0
)
query
.
select
(
`#tag-
${
index
}
-
${
targetIndex
}
`
).
boundingClientRect
((
data
)
=>
{
})
promise
.
then
(
cutIndex
=>
{
query
.
select
(
`#tag-
${
index
}
-
${
cutIndex
}
`
).
boundingClientRect
((
data
)
=>
{
let
listWidth
=
listItem
.
left
+
listItem
.
width
,
let
listWidth
=
listItem
.
left
+
listItem
.
width
,
cutWidth
=
data
.
left
+
data
.
width
cutWidth
=
data
.
left
+
data
.
width
if
(
cutWidth
+
34
<
listWidth
)
targetIndex
+=
1
if
(
cutWidth
+
34
<
listWidth
)
cutIndex
+=
1
_this
.
$set
(
_this
.
tableData
[
index
],
'tagList'
,
tags
.
slice
(
0
,
cutIndex
))
_this
.
$set
(
_this
.
tableData
[
index
],
'hasMoreTags'
,
true
)
}).
exec
()
}).
exec
()
if
(
targetIndex
)
{
})
this
.
$set
(
this
.
tableData
[
index
],
'tags'
,
tags
.
slice
(
0
,
targetIndex
))
this
.
$set
(
this
.
tableData
[
index
],
'hasMoreTags'
,
true
)
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
}
}
...
...
components/CustomerOpportunities/components/TaskItem.vue
View file @
02b8e1d
...
@@ -99,8 +99,8 @@ export default {
...
@@ -99,8 +99,8 @@ export default {
if
(
item
.
taskStatus
==
1
)
taskRecordList
.
push
({
if
(
item
.
taskStatus
==
1
)
taskRecordList
.
push
({
label
:
'推送结果'
,
key
:
'pushResult'
,
format
:
(
status
)
=>
{
label
:
'推送结果'
,
key
:
'pushResult'
,
format
:
(
status
)
=>
{
return
{
return
{
2
:
'成功'
,
1
:
'成功'
,
3
:
'失败'
,
2
:
'失败'
,
}[
status
]
||
'-'
}[
status
]
||
'-'
}
}
})
})
...
...
pages/boutique/components/GoodsBox.vue
View file @
02b8e1d
...
@@ -33,6 +33,7 @@ export default {
...
@@ -33,6 +33,7 @@ export default {
tabIndex
:
Number
,
tabIndex
:
Number
,
hasBeforeActivity
:
Boolean
,
hasBeforeActivity
:
Boolean
,
hasAfterActivity
:
Boolean
,
hasAfterActivity
:
Boolean
,
tabListId
:
Number
,
},
},
data
()
{
data
()
{
...
@@ -89,8 +90,10 @@ export default {
...
@@ -89,8 +90,10 @@ export default {
},
},
changeCar
(
newval
)
{
changeCar
(
newval
)
{
this
.
goodsList
=
[]
this
.
goodsList
=
[]
let
{
activityData
,
tabIndex
}
=
this
let
{
activityData
,
tabListId
}
=
this
,
let
carSeriesList
=
activityData
[
tabIndex
].
carSeriesList
,
list
=
activityData
.
find
(
e
=>
e
.
marketingStage
==
tabListId
)
if
(
!
list
)
return
let
carSeriesList
=
list
.
carSeriesList
,
data
=
carSeriesList
.
find
(
e
=>
e
.
carSeriesId
==
newval
)
data
=
carSeriesList
.
find
(
e
=>
e
.
carSeriesId
==
newval
)
if
(
data
)
{
if
(
data
)
{
this
.
goodsIndex
=
-
1
this
.
goodsIndex
=
-
1
...
...
pages/boutique/components/Reception.vue
View file @
02b8e1d
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<view
class=
"sku-box"
>
<view
class=
"sku-box"
>
<goods-box
:currentCar=
"currentCarId"
:activityData=
"activityData"
<goods-box
:currentCar=
"currentCarId"
:activityData=
"activityData"
:show=
"show && [0, 1].includes(tabIndex)"
@
changePreView=
"currentItem = $event"
ref=
"goodsBox"
:show=
"show && [0, 1].includes(tabIndex)"
@
changePreView=
"currentItem = $event"
ref=
"goodsBox"
:tabIndex=
"tabIndex"
@
noActivity=
"setNoActivity"
/>
:tabIndex=
"tabIndex"
@
noActivity=
"setNoActivity"
:tabListId=
"tabListId"
/>
</view>
</view>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
...
@@ -67,7 +67,8 @@
...
@@ -67,7 +67,8 @@
<
template
v-if=
"tabs.length > 1"
>
<
template
v-if=
"tabs.length > 1"
>
<view
class=
"tabs-box flex"
>
<view
class=
"tabs-box flex"
>
<template
v-for=
"(i, index) in tabs"
>
<template
v-for=
"(i, index) in tabs"
>
<view
:class=
"['tab flex',
{ active: index == tabIndex }]" :key="index" @click="changeTab(index)">
{{
i
<view
:class=
"['tab flex',
{ active: index == tabIndex }]" :key="index" @click="changeTab(index)">
{{
i
.
name
}}
</view>
}}
</view>
</
template
>
</
template
>
<view
:class=
"['block', `block-${tabIndex}`]"
></view>
<view
:class=
"['block', `block-${tabIndex}`]"
></view>
...
@@ -115,7 +116,8 @@ export default {
...
@@ -115,7 +116,8 @@ export default {
isSelect
:
false
,
isSelect
:
false
,
currentCarId
:
''
,
currentCarId
:
''
,
activityData
:
[],
activityData
:
[],
noActivity
:
false
noActivity
:
false
,
tabListId
:
2
}
}
},
},
watch
:
{
watch
:
{
...
@@ -135,7 +137,7 @@ export default {
...
@@ -135,7 +137,7 @@ export default {
currentCarId
:
{
currentCarId
:
{
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
if
(
!
this
.
hasOptionals
&&
this
.
tabIndex
!=
0
)
this
.
tabIndex
=
0
if
(
this
.
tabIndex
!=
0
)
this
.
tabIndex
=
0
if
(
this
.
show
&&
newval
&&
!
this
.
isPreview
&&
this
.
customerType
==
1
)
{
if
(
this
.
show
&&
newval
&&
!
this
.
isPreview
&&
this
.
customerType
==
1
)
{
uni
.
showLoading
({
uni
.
showLoading
({
mask
:
true
mask
:
true
...
@@ -158,11 +160,16 @@ export default {
...
@@ -158,11 +160,16 @@ export default {
handler
(
newval
)
{
handler
(
newval
)
{
if
(
newval
)
{
if
(
newval
)
{
this
.
isSelect
=
false
this
.
isSelect
=
false
let
index
=
0
let
index
=
0
,
tabListId
=
2
if
(
this
.
hasBeforeActivity
||
this
.
hasAfterActivity
)
{
if
(
this
.
hasBeforeActivity
||
this
.
hasAfterActivity
)
{
index
=
1
index
=
1
tabListId
=
1
}
if
(
this
.
hasBeforeActivity
&&
this
.
hasAfterActivity
)
{
index
=
2
tabListId
=
0
}
}
if
(
this
.
hasBeforeActivity
&&
this
.
hasAfterActivity
)
index
=
2
if
(
newval
&&
this
.
currentItem
&&
this
.
tabIndex
==
index
)
this
.
changePreView
(
this
.
currentItem
,
false
,
false
)
if
(
newval
&&
this
.
currentItem
&&
this
.
tabIndex
==
index
)
this
.
changePreView
(
this
.
currentItem
,
false
,
false
)
}
}
}
}
...
@@ -175,15 +182,28 @@ export default {
...
@@ -175,15 +182,28 @@ export default {
if
(
newval
.
length
)
this
.
currentItem
=
null
if
(
newval
.
length
)
this
.
currentItem
=
null
}
}
},
},
hasBeforeActivity
:
{
immediate
:
true
,
deep
:
true
,
handler
(
newval
)
{
let
{
tabListId
}
=
this
if
(
newval
&&
tabListId
!=
0
)
this
.
changeTab
(
0
,
true
,
false
)
}
},
hasAfterActivity
:
{
immediate
:
true
,
deep
:
true
,
handler
(
newval
)
{
let
{
tabListId
,
hasBeforeActivity
}
=
this
if
(
newval
&&
tabListId
!=
1
&&
!
hasBeforeActivity
)
this
.
changeTab
(
0
,
true
,
false
)
}
},
},
},
computed
:
{
computed
:
{
showActivity
()
{
showActivity
()
{
let
{
hasBeforeActivity
,
hasAfterActivity
,
tabIndex
}
=
this
,
let
{
tabListId
}
=
this
skuIndex
=
0
return
[
0
,
1
].
includes
(
tabListId
)
if
(
hasBeforeActivity
||
hasAfterActivity
)
skuIndex
=
1
if
(
hasBeforeActivity
&&
hasAfterActivity
)
skuIndex
=
2
return
tabIndex
!=
skuIndex
},
},
watchStatus
()
{
watchStatus
()
{
return
this
.
$store
.
state
.
user
.
historyStatus
;
return
this
.
$store
.
state
.
user
.
historyStatus
;
...
@@ -225,26 +245,38 @@ export default {
...
@@ -225,26 +245,38 @@ export default {
},
},
tabs
()
{
tabs
()
{
let
{
hasBeforeActivity
,
hasAfterActivity
,
hasOptionals
}
=
this
,
let
{
hasBeforeActivity
,
hasAfterActivity
,
hasOptionals
}
=
this
,
tabs
=
[
'加装'
]
tabs
=
[{
if
(
hasAfterActivity
)
tabs
.
unshift
(
'售后钜惠'
)
name
:
'加装'
,
if
(
hasBeforeActivity
)
tabs
.
unshift
(
'新享特惠'
)
id
:
2
if
(
hasOptionals
)
tabs
.
push
(
'选装'
)
}]
if
(
hasAfterActivity
)
tabs
.
unshift
({
name
:
'售后钜惠'
,
id
:
1
})
if
(
hasBeforeActivity
)
tabs
.
unshift
({
name
:
'新享特惠'
,
id
:
0
})
if
(
hasOptionals
)
tabs
.
push
({
name
:
'选装'
,
id
:
3
})
return
tabs
return
tabs
},
},
hasBeforeActivity
()
{
hasBeforeActivity
()
{
// let { currentCarId } = this,
let
{
currentCarId
}
=
this
,
// hasBeforeActivity = this.activityData.some(e => e.marketingStage == 0),
beforeActivityIndex
=
this
.
activityData
.
findIndex
(
e
=>
e
.
marketingStage
==
0
),
// hasCar = false
hasCar
=
false
// this.activityData.forEach(e => {
if
(
!
hasCar
&&
beforeActivityIndex
>
-
1
)
hasCar
=
this
.
activityData
[
beforeActivityIndex
].
carSeriesList
.
some
(
e
=>
e
.
carSeriesId
==
currentCarId
)
// if (!hasCar) e.carSeriesList.some(e => e.carSeriesId == currentCarId)
return
hasCar
// })
// return hasBeforeActivity && hasCar
return
this
.
activityData
.
some
(
e
=>
e
.
marketingStage
==
0
)
},
},
hasAfterActivity
()
{
hasAfterActivity
()
{
return
this
.
activityData
.
some
(
e
=>
e
.
marketingStage
==
1
)
let
{
currentCarId
}
=
this
,
}
afterActivityIndex
=
this
.
activityData
.
findIndex
(
e
=>
e
.
marketingStage
==
1
),
hasCar
=
false
if
(
!
hasCar
&&
afterActivityIndex
>
-
1
)
hasCar
=
this
.
activityData
[
afterActivityIndex
].
carSeriesList
.
some
(
e
=>
e
.
carSeriesId
==
currentCarId
)
return
hasCar
},
},
},
methods
:
{
methods
:
{
...
@@ -318,6 +350,7 @@ export default {
...
@@ -318,6 +350,7 @@ export default {
if
(
this
.
isPreview
)
return
if
(
this
.
isPreview
)
return
let
key
=
`
${
currentItem
.
carModelName
}
_
${
currentItem
.
id
}
`
,
let
key
=
`
${
currentItem
.
carModelName
}
_
${
currentItem
.
id
}
`
,
value
=
this
.
receptionTrack
[
key
]
value
=
this
.
receptionTrack
[
key
]
if
(
!
value
)
return
value
.
stayDuration
+=
Number
(
Date
.
now
()
-
value
.
entryTime
)
value
.
stayDuration
+=
Number
(
Date
.
now
()
-
value
.
entryTime
)
this
.
$store
.
dispatch
(
"setReceptionTrack"
,
{
key
,
value
})
this
.
$store
.
dispatch
(
"setReceptionTrack"
,
{
key
,
value
})
},
},
...
@@ -327,19 +360,20 @@ export default {
...
@@ -327,19 +360,20 @@ export default {
clearCanvas
()
{
clearCanvas
()
{
this
.
$refs
.
receptionCanvas
.
clearBoard
()
this
.
$refs
.
receptionCanvas
.
clearBoard
()
},
},
changeTab
(
index
)
{
changeTab
(
index
,
force
=
false
,
changeCar
=
true
)
{
if
(
this
.
tabIndex
==
index
)
return
if
(
this
.
tabIndex
==
index
&&
!
force
)
return
let
skuIndex
=
0
let
skuIndex
=
0
if
(
this
.
hasBeforeActivity
||
this
.
hasAfterActivity
)
skuIndex
=
1
if
(
this
.
hasBeforeActivity
||
this
.
hasAfterActivity
)
skuIndex
=
1
if
(
this
.
hasBeforeActivity
&&
this
.
hasAfterActivity
)
skuIndex
=
2
if
(
this
.
hasBeforeActivity
&&
this
.
hasAfterActivity
)
skuIndex
=
2
if
(
this
.
tabIndex
==
skuIndex
)
this
.
previewLeave
(
this
.
currentItem
)
if
(
this
.
tabIndex
==
skuIndex
&&
this
.
currentItem
.
carModelName
)
this
.
previewLeave
(
this
.
currentItem
)
let
goods
=
this
.
$refs
.
goodsBox
this
.
tabIndex
=
index
this
.
tabIndex
=
index
this
.
currentItem
=
null
this
.
currentItem
=
null
this
.
$nextTick
(()
=>
{
this
.
tabListId
=
this
.
tabs
[
index
].
id
if
(
skuIndex
==
2
&&
index
<
2
)
this
.
$refs
.
goodsBox
.
changeCar
(
this
.
currentCarId
)
setTimeout
(()
=>
{
if
(
index
==
skuIndex
)
this
.
$refs
.
sku
.
changeCar
(
this
.
currentCarId
)
if
(
changeCar
&&
goods
&&
[
0
,
1
].
includes
(
this
.
tabListId
))
goods
.
changeCar
(
this
.
currentCarId
)
this
.
clearCanvas
()
this
.
clearCanvas
()
})
}
,
100
)
},
},
showSelect
()
{
showSelect
()
{
if
(
this
.
carList
.
length
==
1
||
this
.
change_disabled
)
return
if
(
this
.
carList
.
length
==
1
||
this
.
change_disabled
)
return
...
...
pages/boutique/components/SkuBox.vue
View file @
02b8e1d
<
template
>
<
template
>
<view
class=
"sku-content"
>
<view
class=
"sku-content"
>
<view
:class=
"['first-type-box flex',firstClass(list)]"
>
<view
:class=
"['first-type-box flex', firstClass(list)]"
>
<view
:class=
"['block',blockClass]"
></view>
<view
:class=
"['block', blockClass]"
></view>
<template
v-for=
"(i,index) in list"
>
<template
v-for=
"(i, index) in list"
>
<view
<view
:class=
"['first-type-item flex',
{ active: i.tabId == tabId }]" :key="index"
:class=
"['first-type-item flex',
{active:i.tabId == tabId}]"
@click="changeTabId(i.tabId, index)">
:key="index"
<view
:class=
"['sprite-icon', `icon-$
{i.icon}`]">
</view>
@click="changeTabId(i.tabId,index)"
{{
i
.
tabName
}}
>
<view
:class=
"['sprite-icon',`icon-$
{i.icon}`]">
</view>
{{
i
.
tabName
}}
</view>
</view>
</
template
>
</
template
>
</view>
</view>
<scroll-view
<scroll-view
class=
"second-type-scroll"
scroll-x
enable-flex
>
class=
"second-type-scroll"
scroll-x
enable-flex
>
<view
class=
"second-type-box flex"
>
<view
class=
"second-type-box flex"
>
<
template
v-for=
"(i,index) in secondList"
>
<
template
v-for=
"(i, index) in secondList"
>
<view
<view
:class=
"['second-type-item flex', secondIndex == index ? 'active' : '']"
:key=
"index"
:class=
"['second-type-item flex',secondIndex == index ? 'active' : '']"
@
click=
"secondClick(index)"
>
{{
i
.
category
}}
</view>
:key=
"index"
@
click=
"secondClick(index)"
>
{{
i
.
category
}}
</view>
</
template
>
</
template
>
<view
class=
"padding-right"
></view>
<view
class=
"padding-right"
></view>
</view>
</view>
</scroll-view>
</scroll-view>
<
template
v-if=
"tabId == 2 && secondName == '窗膜'"
>
<
template
v-if=
"tabId == 2 && secondName == '窗膜'"
>
<view
class=
"sub-title"
>
品牌
</view>
<view
class=
"sub-title"
>
品牌
</view>
<scroll-view
<scroll-view
class=
"thirdly-type-scroll"
scroll-x
enable-flex
>
class=
"thirdly-type-scroll"
scroll-x
enable-flex
>
<view
class=
"thirdly-type-box flex"
>
<view
class=
"thirdly-type-box flex"
>
<template
v-for=
"(i,index) in brandList"
>
<template
v-for=
"(i, index) in brandList"
>
<view
<view
:class=
"['thirdly-type-item flex', thirdlyIndex == index ? 'active' : '']"
:key=
"index"
:class=
"['thirdly-type-item flex',thirdlyIndex == index ? 'active' : '']"
@
click=
"thirdlyClick(index)"
>
{{
i
.
brandName
}}
</view>
:key=
"index"
@
click=
"thirdlyClick(index)"
>
{{
i
.
brandName
}}
</view>
</
template
>
</
template
>
<view
class=
"padding-right"
></view>
<view
class=
"padding-right"
></view>
</view>
</view>
...
@@ -51,20 +34,12 @@
...
@@ -51,20 +34,12 @@
</template>
</template>
<
template
v-if=
"flagObject.goodsFlag"
>
<
template
v-if=
"flagObject.goodsFlag"
>
<template
v-if=
"goodsList.length"
>
<template
v-if=
"goodsList.length"
>
<scroll-view
<scroll-view
scroll-y
class=
"content-scroll-box"
id=
"content-scroll"
:style=
"
{ height: contentHeight }"
scroll-y
:scroll-top="flagObject.scrollTop">
class=
"content-scroll-box"
<template
v-for=
"(i, index) in goodsList"
>
id=
"content-scroll"
<view
:class=
"['goods-item', goodsIndex == index ? 'active' : '']"
:key=
"index"
:style=
"
{height:contentHeight}"
@
click=
"changeGoods(i, index)"
>
:scroll-top="flagObject.scrollTop"
<view
class=
"goods-title"
>
{{
i
.
name
}}
</view>
>
<template
v-for=
"(i,index) in goodsList"
>
<view
:class=
"['goods-item',goodsIndex == index ? 'active' : '']"
:key=
"index"
@
click=
"changeGoods(i,index)"
>
<view
class=
"goods-title"
>
{{
i
.
name
}}
</view>
<view
class=
"goods-description"
>
<view
class=
"goods-description"
>
<rich-text
:nodes=
"i.descriptionText"
></rich-text>
<rich-text
:nodes=
"i.descriptionText"
></rich-text>
</view>
</view>
...
@@ -87,11 +62,11 @@ export default {
...
@@ -87,11 +62,11 @@ export default {
name
:
'SkuBox'
,
name
:
'SkuBox'
,
props
:
{
props
:
{
defaultTabId
:
Number
,
defaultTabId
:
Number
,
currentCar
:
[
Number
,
String
],
currentCar
:
[
Number
,
String
],
show
:
Boolean
show
:
Boolean
},
},
data
()
{
data
()
{
return
{
return
{
tabId
:
'1'
,
tabId
:
'1'
,
blockIndex
:
0
,
blockIndex
:
0
,
...
@@ -113,20 +88,20 @@ export default {
...
@@ -113,20 +88,20 @@ export default {
watch
:
{
watch
:
{
defaultTabId
:
{
defaultTabId
:
{
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
if
(
this
.
show
)
this
.
tabId
=
newval
if
(
this
.
show
)
this
.
tabId
=
newval
}
}
},
},
/**切换车型 */
/**切换车型 */
currentCar
:
{
currentCar
:
{
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
if
(
this
.
show
&&
this
.
requested
)
this
.
changeCar
(
newval
)
if
(
this
.
show
&&
this
.
requested
)
this
.
changeCar
(
newval
)
}
}
},
},
show
:
{
show
:
{
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
if
(
newval
&&
!
this
.
requested
)
{
if
(
newval
&&
!
this
.
requested
)
{
this
.
requested
=
true
this
.
requested
=
true
this
.
init
(
this
.
defaultTabId
)
this
.
init
(
this
.
defaultTabId
)
...
@@ -135,44 +110,44 @@ export default {
...
@@ -135,44 +110,44 @@ export default {
},
},
watchStatus
:
{
watchStatus
:
{
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
this
.
tabId
=
'1'
this
.
tabId
=
'1'
}
}
},
},
},
},
computed
:
{
computed
:
{
watchStatus
()
{
watchStatus
()
{
return
this
.
$store
.
state
.
user
.
historyStatus
;
return
this
.
$store
.
state
.
user
.
historyStatus
;
},
},
blockClass
()
{
blockClass
()
{
return
[
'block-0'
,
'block-1'
,
'block-2'
][
this
.
blockIndex
]
return
[
'block-0'
,
'block-1'
,
'block-2'
][
this
.
blockIndex
]
},
},
boutiqueMediaConfig
()
{
boutiqueMediaConfig
()
{
return
this
.
$store
.
state
.
user
.
boutiqueMediaConfig
return
this
.
$store
.
state
.
user
.
boutiqueMediaConfig
},
},
list
(){
list
()
{
let
item
=
this
.
boutiqueMediaConfig
[
this
.
currentCar
]
let
item
=
this
.
boutiqueMediaConfig
[
this
.
currentCar
]
return
item
?.
retrofitting
||
[]
return
item
?.
retrofitting
||
[]
}
}
},
},
mounted
()
{
mounted
()
{
},
},
methods
:
{
methods
:
{
changeCar
(
newval
)
{
changeCar
(
newval
)
{
let
[
item
]
=
this
.
boutiqueMediaConfig
[
newval
].
retrofitting
let
[
item
]
=
this
.
boutiqueMediaConfig
[
newval
].
retrofitting
this
.
changeTabId
(
item
.
tabId
,
0
,
false
)
this
.
changeTabId
(
item
.
tabId
,
0
,
false
)
},
},
init
(
tabId
)
{
init
(
tabId
)
{
let
index
=
this
.
boutiqueMediaConfig
[
this
.
currentCar
].
retrofitting
.
findIndex
(
e
=>
e
.
tabId
==
tabId
)
let
index
=
this
.
boutiqueMediaConfig
[
this
.
currentCar
].
retrofitting
.
findIndex
(
e
=>
e
.
tabId
==
tabId
)
this
.
changeTabId
(
tabId
,
index
,
false
)
this
.
changeTabId
(
tabId
,
index
,
false
)
},
},
changeTabId
(
tabId
,
index
,
filter
=
true
)
{
changeTabId
(
tabId
,
index
,
filter
=
true
)
{
if
(
filter
&&
tabId
==
this
.
tabId
&&
index
==
this
.
blockIndex
)
return
if
(
filter
&&
tabId
==
this
.
tabId
&&
index
==
this
.
blockIndex
)
return
this
.
tabId
=
tabId
this
.
tabId
=
tabId
this
.
blockIndex
=
index
this
.
blockIndex
=
index
this
.
setSecondList
()
this
.
setSecondList
()
},
},
async
setSecondList
()
{
async
setSecondList
()
{
let
secondList
=
this
.
boutiqueMediaConfig
[
this
.
currentCar
].
retrofitting
,
let
secondList
=
this
.
boutiqueMediaConfig
[
this
.
currentCar
].
retrofitting
,
index
=
secondList
.
findIndex
(
e
=>
e
.
tabId
==
this
.
tabId
)
index
=
secondList
.
findIndex
(
e
=>
e
.
tabId
==
this
.
tabId
)
if
(
index
==
-
1
)
index
=
0
if
(
index
==
-
1
)
index
=
0
...
@@ -180,7 +155,7 @@ export default {
...
@@ -180,7 +155,7 @@ export default {
this
.
secondList
=
list
this
.
secondList
=
list
this
.
secondClick
(
0
,
false
)
this
.
secondClick
(
0
,
false
)
},
},
setScrollHeight
()
{
setScrollHeight
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
let
query
=
uni
.
createSelectorQuery
()
let
query
=
uni
.
createSelectorQuery
()
query
.
select
(
`#content-scroll`
).
boundingClientRect
(
data
=>
{
query
.
select
(
`#content-scroll`
).
boundingClientRect
(
data
=>
{
...
@@ -189,7 +164,7 @@ export default {
...
@@ -189,7 +164,7 @@ export default {
}).
exec
()
}).
exec
()
})
})
},
},
secondClick
(
index
,
filter
=
true
)
{
secondClick
(
index
,
filter
=
true
)
{
if
(
filter
&&
this
.
secondIndex
==
index
)
return
if
(
filter
&&
this
.
secondIndex
==
index
)
return
let
{
secondList
}
=
this
let
{
secondList
}
=
this
this
.
secondIndex
=
index
this
.
secondIndex
=
index
...
@@ -212,18 +187,18 @@ export default {
...
@@ -212,18 +187,18 @@ export default {
this
.
thirdlyClick
(
0
,
false
)
this
.
thirdlyClick
(
0
,
false
)
}
else
this
.
getGoodsList
()
}
else
this
.
getGoodsList
()
},
},
thirdlyClick
(
index
,
filter
=
true
)
{
thirdlyClick
(
index
,
filter
=
true
)
{
if
(
filter
&&
this
.
thirdlyIndex
==
index
)
return
if
(
filter
&&
this
.
thirdlyIndex
==
index
)
return
this
.
thirdlyIndex
=
index
this
.
thirdlyIndex
=
index
this
.
getGoodsList
()
this
.
getGoodsList
()
},
},
changeGoods
(
item
,
index
,
filter
=
true
)
{
changeGoods
(
item
,
index
,
filter
=
true
)
{
if
(
filter
&&
this
.
goodsIndex
==
index
)
return
if
(
filter
&&
this
.
goodsIndex
==
index
)
return
this
.
goodsIndex
=
index
this
.
goodsIndex
=
index
this
.
currentItem
=
item
this
.
currentItem
=
item
this
.
changePreView
()
this
.
changePreView
()
},
},
getGoodsList
()
{
getGoodsList
()
{
this
.
goodsList
=
[]
this
.
goodsList
=
[]
this
.
flagObject
.
goodsFlag
=
false
this
.
flagObject
.
goodsFlag
=
false
let
{
secondIndex
,
secondList
,
tabId
,
brandList
,
thirdlyIndex
,
secondName
}
=
this
let
{
secondIndex
,
secondList
,
tabId
,
brandList
,
thirdlyIndex
,
secondName
}
=
this
...
@@ -231,15 +206,16 @@ export default {
...
@@ -231,15 +206,16 @@ export default {
this
.
goodsList
=
goodsList
this
.
goodsList
=
goodsList
this
.
flagObject
.
goodsFlag
=
true
this
.
flagObject
.
goodsFlag
=
true
this
.
flagObject
.
scrollTop
=
-
100
this
.
flagObject
.
scrollTop
=
-
100
this
.
changeGoods
(
goodsList
[
0
],
0
,
false
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setScrollHeight
()
this
.
setScrollHeight
()
},
500
)
this
.
changeGoods
(
goodsList
[
0
],
0
,
false
)
},
200
)
},
},
changePreView
()
{
changePreView
()
{
this
.
$emit
(
'changePreView'
,
this
.
currentItem
)
this
.
$emit
(
'changePreView'
,
this
.
currentItem
)
},
},
setGoodsData
(
data
,
key
)
{
setGoodsData
(
data
,
key
)
{
let
goodsList
=
[]
let
goodsList
=
[]
data
.
map
(
e
=>
{
data
.
map
(
e
=>
{
if
(
e
.
description
)
e
.
descriptionText
=
e
.
description
.
replace
(
/<
\/?
br
\s
*
\/?
>|
\\
n|
\n
/g
,
'<br>'
)
if
(
e
.
description
)
e
.
descriptionText
=
e
.
description
.
replace
(
/<
\/?
br
\s
*
\/?
>|
\\
n|
\n
/g
,
'<br>'
)
...
@@ -247,7 +223,7 @@ export default {
...
@@ -247,7 +223,7 @@ export default {
})
})
return
goodsList
return
goodsList
},
},
firstClass
(
list
=
[])
{
firstClass
(
list
=
[])
{
return
list
.
length
==
2
?
'two-block'
:
''
return
list
.
length
==
2
?
'two-block'
:
''
}
}
}
}
...
@@ -258,11 +234,13 @@ export default {
...
@@ -258,11 +234,13 @@ export default {
.sku-content
{
.sku-content
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
.padding-right
{
.padding-right
{
height
:
toRpx
(
80
);
height
:
toRpx
(
80
);
width
:
toRpx
(
40
);
width
:
toRpx
(
40
);
flex-shrink
:
0
;
flex-shrink
:
0
;
}
}
.first-type-box
{
.first-type-box
{
width
:
calc
(
100%
-
#{
toRpx
(
64
)}
);
width
:
calc
(
100%
-
#{
toRpx
(
64
)}
);
height
:
toRpx
(
176
);
height
:
toRpx
(
176
);
...
@@ -271,6 +249,7 @@ export default {
...
@@ -271,6 +249,7 @@ export default {
box-sizing
:
border-box
;
box-sizing
:
border-box
;
border
:
toRpx
(
8
)
solid
#f2f2f2
;
border
:
toRpx
(
8
)
solid
#f2f2f2
;
position
:
relative
;
position
:
relative
;
.first-type-item
{
.first-type-item
{
width
:
toRpx
(
280
);
width
:
toRpx
(
280
);
height
:
toRpx
(
160
);
height
:
toRpx
(
160
);
...
@@ -284,14 +263,17 @@ export default {
...
@@ -284,14 +263,17 @@ export default {
position
:
relative
;
position
:
relative
;
z-index
:
2
;
z-index
:
2
;
opacity
:
0.7
;
opacity
:
0.7
;
.sprite-icon
{
.sprite-icon
{
margin-bottom
:
toRpx
(
12
);
margin-bottom
:
toRpx
(
12
);
transform
:
scale
(
1.45
);
transform
:
scale
(
1.45
);
}
}
}
}
.active
{
.active
{
opacity
:
1
;
opacity
:
1
;
}
}
.block
{
.block
{
width
:
toRpx
(
280
);
width
:
toRpx
(
280
);
height
:
toRpx
(
160
);
height
:
toRpx
(
160
);
...
@@ -303,36 +285,46 @@ export default {
...
@@ -303,36 +285,46 @@ export default {
transform
:
translateY
(
-50%
);
transform
:
translateY
(
-50%
);
transition
:
all
0.15s
;
transition
:
all
0.15s
;
}
}
.block-0
{
.block-0
{
left
:
0
;
left
:
0
;
}
}
.block-1
{
.block-1
{
left
:
toRpx
(
280
);
left
:
toRpx
(
280
);
}
}
.block-2
{
.block-2
{
left
:
toRpx
(
560
);
left
:
toRpx
(
560
);
}
}
}
}
.two-block
{
.two-block
{
.first-type-item,
.first-type-item,
.block
{
.block
{
width
:
toRpx
(
420
);
width
:
toRpx
(
420
);
}
}
.block-0
{
.block-0
{
left
:
0
;
left
:
0
;
}
}
.block-1
{
.block-1
{
left
:
toRpx
(
420
);
left
:
toRpx
(
420
);
}
}
}
}
.second-type-scroll
{
.second-type-scroll
{
width
:
100%
;
width
:
100%
;
animation
:
show-view-opacity
0.15s
forwards
;
animation
:
show-view-opacity
0.15s
forwards
;
.second-type-box
{
.second-type-box
{
width
:
100%
;
width
:
100%
;
gap
:
toRpx
(
24
);
gap
:
toRpx
(
24
);
flex-wrap
:
nowrap
;
flex-wrap
:
nowrap
;
padding
:
toRpx
(
32
)
0
toRpx
(
24
);
padding
:
toRpx
(
32
)
0
toRpx
(
24
);
.second-type-item
{
.second-type-item
{
width
:
fit-content
;
width
:
fit-content
;
flex-shrink
:
0
;
flex-shrink
:
0
;
...
@@ -346,6 +338,7 @@ export default {
...
@@ -346,6 +338,7 @@ export default {
justify-content
:
center
;
justify-content
:
center
;
transition
:
all
0.15s
;
transition
:
all
0.15s
;
}
}
.active
{
.active
{
background
:
#2d66f71
a
;
background
:
#2d66f71
a
;
font-weight
:
500
;
font-weight
:
500
;
...
@@ -353,15 +346,18 @@ export default {
...
@@ -353,15 +346,18 @@ export default {
}
}
}
}
}
}
.thirdly-type-scroll
{
.thirdly-type-scroll
{
width
:
100%
;
width
:
100%
;
animation
:
show-view-opacity
0.15s
forwards
;
animation
:
show-view-opacity
0.15s
forwards
;
.thirdly-type-box
{
.thirdly-type-box
{
width
:
100%
;
width
:
100%
;
gap
:
toRpx
(
24
);
gap
:
toRpx
(
24
);
flex-wrap
:
nowrap
;
flex-wrap
:
nowrap
;
padding-bottom
:
toRpx
(
24
);
padding-bottom
:
toRpx
(
24
);
.thirdly-type-item
{
.thirdly-type-item
{
flex-shrink
:
0
;
flex-shrink
:
0
;
height
:
toRpx
(
80
);
height
:
toRpx
(
80
);
...
@@ -374,6 +370,7 @@ export default {
...
@@ -374,6 +370,7 @@ export default {
justify-content
:
center
;
justify-content
:
center
;
transition
:
all
0.15s
;
transition
:
all
0.15s
;
}
}
.active
{
.active
{
font-weight
:
500
;
font-weight
:
500
;
color
:
#333333
;
color
:
#333333
;
...
@@ -381,12 +378,14 @@ export default {
...
@@ -381,12 +378,14 @@ export default {
}
}
}
}
}
}
.sub-title
{
.sub-title
{
font-size
:
toRpx
(
24
);
font-size
:
toRpx
(
24
);
color
:
#999999
;
color
:
#999999
;
line-height
:
toRpx
(
36
);
line-height
:
toRpx
(
36
);
padding-bottom
:
toRpx
(
16
);
padding-bottom
:
toRpx
(
16
);
}
}
.content-scroll-box
{
.content-scroll-box
{
.goods-item
{
.goods-item
{
width
:
calc
(
100%
-
#{
toRpx
(
64
)}
);
width
:
calc
(
100%
-
#{
toRpx
(
64
)}
);
...
@@ -395,12 +394,14 @@ export default {
...
@@ -395,12 +394,14 @@ export default {
padding
:
toRpx
(
24
)
toRpx
(
32
);
padding
:
toRpx
(
24
)
toRpx
(
32
);
margin-bottom
:
toRpx
(
24
);
margin-bottom
:
toRpx
(
24
);
transition
:
all
0
.15s
;
transition
:
all
0
.15s
;
.goods-title
{
.goods-title
{
font-weight
:
500
;
font-weight
:
500
;
font-size
:
toRpx
(
28
);
font-size
:
toRpx
(
28
);
color
:
#333333
;
color
:
#333333
;
line-height
:
toRpx
(
44
);
line-height
:
toRpx
(
44
);
}
}
.goods-description
{
.goods-description
{
margin-top
:
toRpx
(
8
);
margin-top
:
toRpx
(
8
);
font-size
:
toRpx
(
24
);
font-size
:
toRpx
(
24
);
...
@@ -410,20 +411,24 @@ export default {
...
@@ -410,20 +411,24 @@ export default {
overflow
:
hidden
;
overflow
:
hidden
;
}
}
}
}
.active
{
.active
{
border-color
:
#333
;
border-color
:
#333
;
.goods-description
{
.goods-description
{
max-height
:
none
;
max-height
:
none
;
overflow
:
auto
;
overflow
:
auto
;
}
}
}
}
}
}
.nothing
{
.nothing
{
flex-direction
:
column
;
flex-direction
:
column
;
padding-top
:
toRpx
(
136
);
padding-top
:
toRpx
(
136
);
font-size
:
toRpx
(
28
);
font-size
:
toRpx
(
28
);
color
:
#999999
;
color
:
#999999
;
line-height
:
toRpx
(
40
);
line-height
:
toRpx
(
40
);
&-icon
{
&-icon
{
width
:
toRpx
(
676
);
width
:
toRpx
(
676
);
height
:
toRpx
(
284
);
height
:
toRpx
(
284
);
...
@@ -433,5 +438,4 @@ export default {
...
@@ -433,5 +438,4 @@ export default {
}
}
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
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