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 48020d94
authored
Sep 12, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V4.45' of
http://192.168.3.233:8090/glsx/gl_tape
into SAAS+V4.45
2 parents
6cacf1d0
93a53115
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 @
48020d9
...
...
@@ -82,6 +82,7 @@ export default {
methods
:
{
autoSelect
(
index
=
0
)
{
const
{
carBrandList
}
=
this
if
(
index
<
0
)
index
=
0
if
(
carBrandList
.
length
)
this
.
selectCar
(
carBrandList
[
0
],
true
,
index
)
},
open
()
{
...
...
pages/boutique/components/Reception.vue
View file @
48020d9
...
...
@@ -19,14 +19,14 @@
<view
class=
"sprite-icon icon-info_shield"
></view>
</view>
<view
class=
"content-box flex"
>
<
template
v-if=
"currentItem.
poster
"
>
<
template
v-if=
"currentItem.
modelDisplayPicurl
"
>
<view
class=
"left-content"
:key=
"updateViewKey"
@
click=
"showPicture(currentItem.detail
ImgU
rl)"
@
click=
"showPicture(currentItem.detail
Picu
rl)"
>
<image
:src=
"currentItem.
poster
"
:src=
"currentItem.
modelDisplayPicurl
"
class=
"poster"
/>
<view
class=
"tips"
>
* 点击图片查看详情
>
</view>
...
...
pages/boutique/components/SkuBox.vue
View file @
48020d9
...
...
@@ -19,12 +19,12 @@
enable-flex
>
<view
class=
"second-type-box flex"
>
<
template
v-for=
"(i,index) in
20
"
>
<
template
v-for=
"(i,index) in
secondList
"
>
<view
:class=
"['second-type-item flex',secondIndex == index ? 'active' : '']"
:key=
"index"
@
click=
"secondClick(index)"
>
{{
i
}}
一二三四五一二三四
</view>
>
{{
i
.
category
}}
</view>
</
template
>
<view
class=
"padding-right"
></view>
</view>
...
...
@@ -37,12 +37,12 @@
enable-flex
>
<view
class=
"thirdly-type-box flex"
>
<template
v-for=
"(i,index) in
3
"
>
<template
v-for=
"(i,index) in
brandList
"
>
<view
:class=
"['thirdly-type-item flex',thirdlyIndex == index ? 'active' : '']"
:key=
"index"
@
click=
"thirdlyClick(index)"
>
{{
i
}}
</view>
>
{{
i
.
brandName
}}
</view>
</
template
>
<view
class=
"padding-right"
></view>
</view>
...
...
@@ -59,13 +59,13 @@
>
<template
v-for=
"(i,index) in goodsList"
>
<view
:class=
"['goods-item',goodsI
d
== index ? 'active' : '']"
:class=
"['goods-item',goodsI
ndex
== index ? 'active' : '']"
: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"
>
<rich-text
:nodes=
"i.
t
ext"
></rich-text>
<rich-text
:nodes=
"i.
descriptionT
ext"
></rich-text>
</view>
</view>
</
template
>
...
...
@@ -99,17 +99,15 @@ export default {
blockIndex
:
0
,
secondIndex
:
0
,
thirdlyIndex
:
0
,
goodsI
d
:
''
,
goodsI
ndex
:
0
,
contentHeight
:
'0'
,
requested
:
false
,
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'
},
currentItem
:
{},
goodsList
:
[],
flagObject
:
{
goodsFlag
:
false
},
secondList
:
[],
}
},
watch
:
{
...
...
@@ -166,9 +164,11 @@ export default {
if
(
filter
&&
tabId
==
this
.
tabId
&&
index
==
this
.
blockIndex
)
return
this
.
tabId
=
tabId
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
)
},
setScrollHeight
()
{
...
...
@@ -184,35 +184,74 @@ export default {
this
.
secondIndex
=
index
if
(
this
.
tabId
==
2
)
{
/**获取品牌 */
this
.
thirdlyIndex
=
0
this
.
getGoodsList
()
if
(
index
==
0
)
{
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
()
},
thirdlyClick
(
index
)
{
if
(
this
.
thirdlyIndex
==
index
)
return
thirdlyClick
(
index
,
filter
=
true
)
{
if
(
filter
&&
this
.
thirdlyIndex
==
index
)
return
this
.
thirdlyIndex
=
index
this
.
getGoodsList
()
},
changeGoods
(
index
)
{
this
.
goodsId
=
index
changeGoods
(
item
,
index
)
{
this
.
goodsIndex
=
index
this
.
currentItem
=
item
this
.
changePreView
()
},
getGoodsList
()
{
// console.log('获取商品列表')
this
.
goodsList
=
[]
this
.
flagObject
.
goodsFlag
=
false
uni
.
showLoading
({
mask
:
true
})
setTimeout
(()
=>
{
uni
.
hideLoading
()
this
.
goodsList
=
new
Array
(
Math
.
floor
(
Math
.
random
()
*
21
)).
fill
({
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>'
)
let
{
secondIndex
,
secondList
,
tabId
,
brandList
,
thirdlyIndex
}
=
this
,
target
=
{
1
:
'packageInfoList'
,
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
this
.
setScrollHeight
()
this
.
changeGoods
(
0
)
},
100
)
}
else
{
secondList
[
secondIndex
][
target
].
map
(
e
=>
{
e
.
goodsName
=
e
[
goodsNameKey
]
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
()
{
...
...
pages/boutique/detail.vue
View file @
48020d9
...
...
@@ -134,7 +134,7 @@ export default {
// this.$emit("back");
if
(
this
.
id
==
1
)
{
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"
);
},
...
...
pages/boutique/index.vue
View file @
48020d9
...
...
@@ -237,18 +237,33 @@ export default {
/**获取车型素材配置 */
uni
.
$api
.
boutiqueApi
.
getBoutiqueMaterialConfig
({
merchantId
:
shopMerchantId
}).
then
(
res
=>
{
console
.
log
(
res
,
'==========='
)
})
let
boutiqueMediaConfig
=
{
M5
:
[
defaultConfig
[
0
],
defaultConfig
[
1
],
defaultConfig
[
2
]],
M7
:
[
defaultConfig
[
0
],
defaultConfig
[
1
]],
M9
:
[
defaultConfig
[
1
],
defaultConfig
[
2
]]
}
this
.
carBannerList
.
map
(
e
=>
{
e
.
configList
=
boutiqueMediaConfig
[
e
.
title
]
}).
then
(({
materials
})
=>
{
let
boutiqueMediaConfig
=
{
M5
:
[],
M7
:
[],
M9
:
[],
}
materials
.
map
(
e
=>
{
const
configItems
=
[
{
key
:
'packages'
,
configIndex
:
0
},
{
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
()
{
...
...
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