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 93a53115
authored
Sep 12, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 提交
1 parent
fb561762
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
45 deletions
components/CarBrands.vue
pages/boutique/components/Reception.vue
pages/boutique/components/SkuBox.vue
pages/boutique/detail.vue
pages/boutique/index.vue
components/CarBrands.vue
View file @
93a5311
...
@@ -82,6 +82,7 @@ export default {
...
@@ -82,6 +82,7 @@ export default {
methods
:
{
methods
:
{
autoSelect
(
index
=
0
)
{
autoSelect
(
index
=
0
)
{
const
{
carBrandList
}
=
this
const
{
carBrandList
}
=
this
if
(
index
<
0
)
index
=
0
if
(
carBrandList
.
length
)
this
.
selectCar
(
carBrandList
[
0
],
true
,
index
)
if
(
carBrandList
.
length
)
this
.
selectCar
(
carBrandList
[
0
],
true
,
index
)
},
},
open
()
{
open
()
{
...
...
pages/boutique/components/Reception.vue
View file @
93a5311
...
@@ -19,14 +19,14 @@
...
@@ -19,14 +19,14 @@
<view
class=
"sprite-icon icon-info_shield"
></view>
<view
class=
"sprite-icon icon-info_shield"
></view>
</view>
</view>
<view
class=
"content-box flex"
>
<view
class=
"content-box flex"
>
<
template
v-if=
"currentItem.
poster
"
>
<
template
v-if=
"currentItem.
modelDisplayPicurl
"
>
<view
<view
class=
"left-content"
class=
"left-content"
:key=
"updateViewKey"
:key=
"updateViewKey"
@
click=
"showPicture(currentItem.detail
ImgU
rl)"
@
click=
"showPicture(currentItem.detail
Picu
rl)"
>
>
<image
<image
:src=
"currentItem.
poster
"
:src=
"currentItem.
modelDisplayPicurl
"
class=
"poster"
class=
"poster"
/>
/>
<view
class=
"tips"
>
* 点击图片查看详情
>
</view>
<view
class=
"tips"
>
* 点击图片查看详情
>
</view>
...
...
pages/boutique/components/SkuBox.vue
View file @
93a5311
...
@@ -19,12 +19,12 @@
...
@@ -19,12 +19,12 @@
enable-flex
enable-flex
>
>
<view
class=
"second-type-box flex"
>
<view
class=
"second-type-box flex"
>
<
template
v-for=
"(i,index) in
20
"
>
<
template
v-for=
"(i,index) in
secondList
"
>
<view
<view
:class=
"['second-type-item flex',secondIndex == index ? 'active' : '']"
:class=
"['second-type-item flex',secondIndex == index ? 'active' : '']"
:key=
"index"
:key=
"index"
@
click=
"secondClick(index)"
@
click=
"secondClick(index)"
>
{{
i
}}
一二三四五一二三四
</view>
>
{{
i
.
category
}}
</view>
</
template
>
</
template
>
<view
class=
"padding-right"
></view>
<view
class=
"padding-right"
></view>
</view>
</view>
...
@@ -37,12 +37,12 @@
...
@@ -37,12 +37,12 @@
enable-flex
enable-flex
>
>
<view
class=
"thirdly-type-box flex"
>
<view
class=
"thirdly-type-box flex"
>
<template
v-for=
"(i,index) in
3
"
>
<template
v-for=
"(i,index) in
brandList
"
>
<view
<view
:class=
"['thirdly-type-item flex',thirdlyIndex == index ? 'active' : '']"
:class=
"['thirdly-type-item flex',thirdlyIndex == index ? 'active' : '']"
:key=
"index"
:key=
"index"
@
click=
"thirdlyClick(index)"
@
click=
"thirdlyClick(index)"
>
{{
i
}}
</view>
>
{{
i
.
brandName
}}
</view>
</
template
>
</
template
>
<view
class=
"padding-right"
></view>
<view
class=
"padding-right"
></view>
</view>
</view>
...
@@ -59,13 +59,13 @@
...
@@ -59,13 +59,13 @@
>
>
<template
v-for=
"(i,index) in goodsList"
>
<template
v-for=
"(i,index) in goodsList"
>
<view
<view
:class=
"['goods-item',goodsI
d
== index ? 'active' : '']"
:class=
"['goods-item',goodsI
ndex
== index ? 'active' : '']"
:key=
"index"
:key=
"index"
@
click=
"changeGoods(index)"
@
click=
"changeGoods(i
,i
ndex)"
>
>
<view
class=
"goods-title"
>
{{
i
ndex
}}
</view>
<view
class=
"goods-title"
>
{{
i
.
goodsName
}}
</view>
<view
class=
"goods-description"
>
<view
class=
"goods-description"
>
<rich-text
:nodes=
"i.
t
ext"
></rich-text>
<rich-text
:nodes=
"i.
descriptionT
ext"
></rich-text>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -99,17 +99,15 @@ export default {
...
@@ -99,17 +99,15 @@ export default {
blockIndex
:
0
,
blockIndex
:
0
,
secondIndex
:
0
,
secondIndex
:
0
,
thirdlyIndex
:
0
,
thirdlyIndex
:
0
,
goodsI
d
:
''
,
goodsI
ndex
:
0
,
contentHeight
:
'0'
,
contentHeight
:
'0'
,
requested
:
false
,
requested
:
false
,
currentItem
:
{
currentItem
:
{},
// poster: 'https:// img02.glsx.com.cn/weapp/resource/app-tape/common/default-cover.webp',
detailImgUrl
:
'https://wx.glsx.com.cn/upload/biz/d3c64724-3e0c-4401-aabe-56dc0060f6d6.png'
},
goodsList
:
[],
goodsList
:
[],
flagObject
:
{
flagObject
:
{
goodsFlag
:
false
goodsFlag
:
false
},
},
secondList
:
[],
}
}
},
},
watch
:
{
watch
:
{
...
@@ -166,9 +164,11 @@ export default {
...
@@ -166,9 +164,11 @@ export default {
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
.
getSkuConfig
()
this
.
setSecondList
()
},
},
async
getSkuConfig
()
{
async
setSecondList
()
{
let
{
list
}
=
this
.
boutiqueMediaConfig
[
this
.
currentCar
].
find
(
e
=>
e
.
tabId
==
this
.
tabId
)
this
.
secondList
=
list
this
.
secondClick
(
0
,
false
)
this
.
secondClick
(
0
,
false
)
},
},
setScrollHeight
()
{
setScrollHeight
()
{
...
@@ -184,35 +184,74 @@ export default {
...
@@ -184,35 +184,74 @@ export default {
this
.
secondIndex
=
index
this
.
secondIndex
=
index
if
(
this
.
tabId
==
2
)
{
if
(
this
.
tabId
==
2
)
{
/**获取品牌 */
/**获取品牌 */
this
.
thirdlyIndex
=
0
if
(
index
==
0
)
{
this
.
getGoodsList
()
let
{
filmInfoList
}
=
this
.
secondList
[
0
],
arr
=
Array
.
from
(
new
Set
([...
filmInfoList
.
map
((
e
)
=>
e
.
brand
)])),
brandList
=
[]
arr
.
map
(
e
=>
{
let
obj
=
{
brandName
:
e
,
list
:
[]
}
filmInfoList
.
map
(
i
=>
{
if
(
i
.
brand
==
e
)
obj
.
list
.
push
(
i
)
})
brandList
.
push
(
obj
)
})
this
.
brandList
=
brandList
this
.
thirdlyClick
(
0
,
false
)
}
else
this
.
getGoodsList
()
}
else
this
.
getGoodsList
()
}
else
this
.
getGoodsList
()
},
},
thirdlyClick
(
index
)
{
thirdlyClick
(
index
,
filter
=
true
)
{
if
(
this
.
thirdlyIndex
==
index
)
return
if
(
filter
&&
this
.
thirdlyIndex
==
index
)
return
this
.
thirdlyIndex
=
index
this
.
thirdlyIndex
=
index
this
.
getGoodsList
()
this
.
getGoodsList
()
},
},
changeGoods
(
index
)
{
changeGoods
(
item
,
index
)
{
this
.
goodsId
=
index
this
.
goodsIndex
=
index
this
.
currentItem
=
item
this
.
changePreView
()
this
.
changePreView
()
},
},
getGoodsList
()
{
getGoodsList
()
{
// console.log('获取商品列表')
this
.
goodsList
=
[]
this
.
goodsList
=
[]
this
.
flagObject
.
goodsFlag
=
false
this
.
flagObject
.
goodsFlag
=
false
uni
.
showLoading
({
uni
.
showLoading
({
mask
:
true
mask
:
true
})
})
setTimeout
(()
=>
{
let
{
secondIndex
,
secondList
,
tabId
,
brandList
,
thirdlyIndex
}
=
this
,
uni
.
hideLoading
()
target
=
{
this
.
goodsList
=
new
Array
(
Math
.
floor
(
Math
.
random
()
*
21
)).
fill
({
1
:
'packageInfoList'
,
text
:
'·AITO汽车专享 3M车窗膜(全车)\n·M7专享天窗冰甲\n·AITO汽车专享 挡泥板(适配M7)\n·AITO汽车专享 底盘护板(适配M7)\n·AITO汽车专享 挡泥板(适配M7)\n·AITO汽车专享 M7中控屏钢化保护膜\n·M7专享后备箱垫'
.
replace
(
/<
\/?
br
\s
*
\/?
>|
\n
/g
,
'<br>'
)
2
:
'filmInfoList'
,
3
:
'productInfoList'
}[
tabId
],
goodsNameKey
=
{
1
:
'packageName'
,
2
:
'filmName'
,
3
:
'productName'
}[
tabId
]
uni
.
hideLoading
()
let
goodsList
=
[]
if
(
tabId
==
2
&&
secondIndex
==
0
)
{
brandList
[
thirdlyIndex
].
list
.
map
(
e
=>
{
e
.
goodsName
=
e
[
goodsNameKey
]
if
(
e
.
description
)
e
.
descriptionText
=
e
.
description
.
replace
(
/<
\/?
br
\s
*
\/?
>|
\\
n|
\n
/g
,
'<br>'
)
goodsList
.
push
(
e
)
})
})
this
.
flagObject
.
goodsFlag
=
true
}
else
{
this
.
setScrollHeight
()
secondList
[
secondIndex
][
target
].
map
(
e
=>
{
this
.
changeGoods
(
0
)
e
.
goodsName
=
e
[
goodsNameKey
]
},
100
)
if
(
e
.
description
)
e
.
descriptionText
=
e
.
description
.
replace
(
/<
\/?
br
\s
*
\/?
>|
\\
n|
\n
/g
,
'<br>'
)
goodsList
.
push
(
e
)
})
}
this
.
goodsList
=
goodsList
this
.
flagObject
.
goodsFlag
=
true
this
.
setScrollHeight
()
this
.
changeGoods
(
goodsList
[
0
],
0
)
},
},
changePreView
()
{
changePreView
()
{
...
...
pages/boutique/detail.vue
View file @
93a5311
...
@@ -134,7 +134,7 @@ export default {
...
@@ -134,7 +134,7 @@ export default {
// this.$emit("back");
// this.$emit("back");
if
(
this
.
id
==
1
)
{
if
(
this
.
id
==
1
)
{
let
[
reception
]
=
this
.
$refs
.
media1
let
[
reception
]
=
this
.
$refs
.
media1
if
(
reception
.
currentImgU
rl
)
reception
.
showPicture
(
''
)
if
(
reception
.
detailPicu
rl
)
reception
.
showPicture
(
''
)
else
this
.
$emit
(
"back"
);
else
this
.
$emit
(
"back"
);
}
else
this
.
$emit
(
"back"
);
}
else
this
.
$emit
(
"back"
);
},
},
...
...
pages/boutique/index.vue
View file @
93a5311
...
@@ -237,18 +237,33 @@ export default {
...
@@ -237,18 +237,33 @@ export default {
/**获取车型素材配置 */
/**获取车型素材配置 */
uni
.
$api
.
boutiqueApi
.
getBoutiqueMaterialConfig
({
uni
.
$api
.
boutiqueApi
.
getBoutiqueMaterialConfig
({
merchantId
:
shopMerchantId
merchantId
:
shopMerchantId
}).
then
(
res
=>
{
}).
then
(({
materials
})
=>
{
console
.
log
(
res
,
'==========='
)
let
boutiqueMediaConfig
=
{
})
M5
:
[],
let
boutiqueMediaConfig
=
{
M7
:
[],
M5
:
[
defaultConfig
[
0
],
defaultConfig
[
1
],
defaultConfig
[
2
]],
M9
:
[],
M7
:
[
defaultConfig
[
0
],
defaultConfig
[
1
]],
}
M9
:
[
defaultConfig
[
1
],
defaultConfig
[
2
]]
materials
.
map
(
e
=>
{
}
const
configItems
=
[
this
.
carBannerList
.
map
(
e
=>
{
{
key
:
'packages'
,
configIndex
:
0
},
e
.
configList
=
boutiqueMediaConfig
[
e
.
title
]
{
key
:
'films'
,
configIndex
:
1
},
{
key
:
'products'
,
configIndex
:
2
}
];
configItems
.
map
(
item
=>
{
if
(
e
[
item
.
key
]?.
length
)
{
boutiqueMediaConfig
[
e
.
carModelName
].
push
({
...
defaultConfig
[
item
.
configIndex
],
list
:
e
[
item
.
key
]
})
}
})
})
this
.
carBannerList
.
map
(
e
=>
{
e
.
configList
=
boutiqueMediaConfig
[
e
.
title
]
})
this
.
$store
.
state
.
user
.
boutiqueMediaConfig
=
boutiqueMediaConfig
})
})
this
.
$store
.
state
.
user
.
boutiqueMediaConfig
=
boutiqueMediaConfig
},
},
// 查询素材
// 查询素材
async
getSoure
()
{
async
getSoure
()
{
...
...
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