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 de2d9489
authored
Sep 11, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 增加空状态
1 parent
4401f9de
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
117 additions
and
24 deletions
env.js
pages/boutique/components/Reception.vue
pages/boutique/components/SkuBox.vue
pages/boutique/history.vue
pages/boutique/index.vue
env.js
View file @
de2d948
const
target
=
[
"ip"
,
"dev"
,
"uat"
,
"prod"
,
"beta"
];
const
target
=
[
"ip"
,
"dev"
,
"uat"
,
"prod"
,
"beta"
];
const
index
=
2
;
const
index
=
1
;
/**
/**
*
*
0本地
0本地
...
...
pages/boutique/components/Reception.vue
View file @
de2d948
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
<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"
>
<view
<view
class=
"left-content"
class=
"left-content"
:key=
"updateViewKey"
:key=
"updateViewKey"
...
@@ -33,6 +34,15 @@
...
@@ -33,6 +34,15 @@
/>
/>
<view
class=
"tips"
>
* 点击图片查看详情
>
</view>
<view
class=
"tips"
>
* 点击图片查看详情
>
</view>
</view>
</view>
</
template
>
<
template
v-else
>
<view
class=
"left-content"
>
<image
class=
"default"
:src=
"defaultImg"
/>
</view>
</
template
>
<view
class=
"right-content"
>
<view
class=
"right-content"
>
<view
:class=
"['sku-box',isPreview ? 'preview' : '']"
>
<view
:class=
"['sku-box',isPreview ? 'preview' : '']"
>
<sku-box
<sku-box
...
@@ -71,6 +81,9 @@ import CarBrands from '@/components/CarBrands.vue'
...
@@ -71,6 +81,9 @@ import CarBrands from '@/components/CarBrands.vue'
import
CouponPop
from
'./CouponPop.vue'
import
CouponPop
from
'./CouponPop.vue'
import
PictureBox
from
'./Picture.vue'
import
PictureBox
from
'./Picture.vue'
import
RiskInformedBox
from
'./RiskInformedBox.vue'
import
RiskInformedBox
from
'./RiskInformedBox.vue'
const
m5
=
require
(
"@/assets/images/boutique/index/m5.webp"
)
const
m7
=
require
(
"@/assets/images/boutique/index/m7.webp"
)
const
m9
=
require
(
"@/assets/images/boutique/index/m9.webp"
)
export
default
{
export
default
{
name
:
'Reception'
,
name
:
'Reception'
,
components
:
{
SkuBox
,
CarBrands
,
CouponPop
,
PictureBox
,
RiskInformedBox
},
components
:
{
SkuBox
,
CarBrands
,
CouponPop
,
PictureBox
,
RiskInformedBox
},
...
@@ -115,6 +128,11 @@ export default {
...
@@ -115,6 +128,11 @@ export default {
currentCarString
:
{
currentCarString
:
{
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
this
.
defaultImg
=
{
'M5'
:
m5
,
'M7'
:
m7
,
'M9'
:
m9
,
}[
newval
]
if
(
this
.
show
&&
newval
&&
!
this
.
isPreview
&&
this
.
customerType
==
1
)
this
.
$refs
.
carBrandRef
.
autoSelect
(
this
.
carList
.
findIndex
(
e
=>
e
==
newval
))
if
(
this
.
show
&&
newval
&&
!
this
.
isPreview
&&
this
.
customerType
==
1
)
this
.
$refs
.
carBrandRef
.
autoSelect
(
this
.
carList
.
findIndex
(
e
=>
e
==
newval
))
}
}
}
}
...
@@ -251,6 +269,14 @@ export default {
...
@@ -251,6 +269,14 @@ export default {
transform
:
scale
(
1
);
transform
:
scale
(
1
);
}
}
}
}
.default
{
width
:
100%
;
height
:
664
rpx
;
position
:
absolute
;
left
:
0
;
top
:
50%
;
transform
:
translateY
(
-50%
);
}
}
}
.right-content
{
.right-content
{
width
:
calc
(
100%
-
1362
rpx
);
width
:
calc
(
100%
-
1362
rpx
);
...
...
pages/boutique/components/SkuBox.vue
View file @
de2d948
...
@@ -49,26 +49,38 @@
...
@@ -49,26 +49,38 @@
</scroll-view>
</scroll-view>
<view
class=
"sub-title"
>
部位
</view>
<view
class=
"sub-title"
>
部位
</view>
</template>
</template>
<
template
v-if=
"flagObject.goodsFlag"
>
<template
v-if=
"goodsList.length"
>
<scroll-view
<scroll-view
scroll-y
scroll-y
class=
"content-scroll-box"
class=
"content-scroll-box"
id=
"content-scroll"
id=
"content-scroll"
:style=
"
{height:contentHeight}"
:style=
"
{height:contentHeight}"
>
>
<
template
v-for=
"(i,index) in 20
"
>
<template
v-for=
"(i,index) in goodsList
"
>
<view
<view
:class=
"['goods-item',goodsId == index ? 'active' : '']"
:class=
"['goods-item',goodsId == index ? 'active' : '']"
:key=
"index"
:key=
"index"
@
click=
"changeGoods(index)"
@
click=
"changeGoods(index)"
>
>
<view
class=
"goods-title"
>
一二三四五一二三四五一二三四五一二三四五一二三四五一二三四五一二三四五一二三四五一二三四五一二三四五
</view>
<view
class=
"goods-title"
>
{{
index
}}
</view>
<view
class=
"goods-description"
>
<view
class=
"goods-description"
>
<rich-text
:nodes=
"tes
t"
></rich-text>
<rich-text
:nodes=
"i.tex
t"
></rich-text>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
</scroll-view>
</scroll-view>
</template>
<
template
v-else
>
<view
class=
"nothing flex"
>
<image
src=
"@/assets/images/boutique/nothing.png"
class=
"icon"
/>
暂无产品内容
</view>
</
template
>
</template>
</view>
</view>
</template>
</template>
...
@@ -91,10 +103,13 @@ export default {
...
@@ -91,10 +103,13 @@ export default {
contentHeight
:
'0'
,
contentHeight
:
'0'
,
requested
:
false
,
requested
:
false
,
currentItem
:
{
currentItem
:
{
poster
:
'https://
img02.glsx.com.cn/weapp/resource/app-tape/common/default-cover.webp'
,
// 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'
detailImgUrl
:
'https://wx.glsx.com.cn/upload/biz/d3c64724-3e0c-4401-aabe-56dc0060f6d6.png'
},
},
test
:
'·AITO汽车专享 3M车窗膜(全车)\n·M7专享天窗冰甲\n·AITO汽车专享 挡泥板(适配M7)\n·AITO汽车专享 底盘护板(适配M7)\n·AITO汽车专享 挡泥板(适配M7)\n·AITO汽车专享 M7中控屏钢化保护膜\n·M7专享后备箱垫'
goodsList
:
[],
flagObject
:
{
goodsFlag
:
false
},
}
}
},
},
watch
:
{
watch
:
{
...
@@ -109,8 +124,10 @@ export default {
...
@@ -109,8 +124,10 @@ export default {
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
if
(
this
.
show
&&
this
.
requested
)
{
if
(
this
.
show
&&
this
.
requested
)
{
console
.
log
(
newval
)
let
[
item
]
=
this
.
boutiqueMediaConfig
[
newval
]
let
[
item
]
=
this
.
boutiqueMediaConfig
[
newval
]
this
.
changeTabId
(
item
.
tabId
,
0
)
console
.
log
(
item
)
this
.
changeTabId
(
item
.
tabId
,
0
,
false
)
}
}
}
}
},
},
...
@@ -118,7 +135,8 @@ export default {
...
@@ -118,7 +135,8 @@ export default {
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
if
(
newval
&&
!
this
.
requested
)
{
if
(
newval
&&
!
this
.
requested
)
{
this
.
changeTabId
(
this
.
tabId
,
this
.
boutiqueMediaConfig
[
this
.
currentCar
].
findIndex
(
e
=>
e
.
tabId
==
this
.
tabId
))
let
index
=
this
.
boutiqueMediaConfig
[
this
.
currentCar
].
findIndex
(
e
=>
e
.
tabId
==
this
.
tabId
)
this
.
changeTabId
(
this
.
tabId
,
index
,
false
)
this
.
requested
=
true
this
.
requested
=
true
}
}
}
}
...
@@ -144,15 +162,14 @@ export default {
...
@@ -144,15 +162,14 @@ export default {
mounted
()
{
mounted
()
{
},
},
methods
:
{
methods
:
{
changeTabId
(
tabId
,
index
)
{
changeTabId
(
tabId
,
index
,
filter
=
true
)
{
if
(
filter
&&
tabId
==
this
.
tabId
&&
index
==
this
.
blockIndex
)
return
this
.
tabId
=
tabId
this
.
tabId
=
tabId
this
.
blockIndex
=
index
this
.
blockIndex
=
index
this
.
getSkuConfig
()
this
.
getSkuConfig
()
},
},
async
getSkuConfig
()
{
async
getSkuConfig
()
{
this
.
test
=
this
.
test
.
replace
(
/<
\/?
br
\s
*
\/?
>|
\n
/g
,
'<br>'
)
this
.
secondClick
(
0
,
false
)
// this.$forceUpdate()
this
.
secondClick
(
0
)
},
},
setScrollHeight
()
{
setScrollHeight
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
...
@@ -162,7 +179,8 @@ export default {
...
@@ -162,7 +179,8 @@ export default {
}).
exec
()
}).
exec
()
})
})
},
},
secondClick
(
index
)
{
secondClick
(
index
,
filter
=
true
)
{
if
(
filter
&&
this
.
secondIndex
==
index
)
return
this
.
secondIndex
=
index
this
.
secondIndex
=
index
if
(
this
.
tabId
==
2
)
{
if
(
this
.
tabId
==
2
)
{
/**获取品牌 */
/**获取品牌 */
...
@@ -171,6 +189,7 @@ export default {
...
@@ -171,6 +189,7 @@ export default {
}
else
this
.
getGoodsList
()
}
else
this
.
getGoodsList
()
},
},
thirdlyClick
(
index
)
{
thirdlyClick
(
index
)
{
if
(
this
.
thirdlyIndex
==
index
)
return
this
.
thirdlyIndex
=
index
this
.
thirdlyIndex
=
index
this
.
getGoodsList
()
this
.
getGoodsList
()
},
},
...
@@ -179,9 +198,22 @@ export default {
...
@@ -179,9 +198,22 @@ export default {
this
.
changePreView
()
this
.
changePreView
()
},
},
getGoodsList
()
{
getGoodsList
()
{
console
.
log
(
'获取商品列表'
)
// 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>'
)
})
this
.
flagObject
.
goodsFlag
=
true
this
.
setScrollHeight
()
this
.
setScrollHeight
()
this
.
changeGoods
(
0
)
this
.
changeGoods
(
0
)
},
100
)
},
},
changePreView
()
{
changePreView
()
{
this
.
$emit
(
'changePreView'
,
this
.
currentItem
)
this
.
$emit
(
'changePreView'
,
this
.
currentItem
)
...
@@ -247,6 +279,7 @@ export default {
...
@@ -247,6 +279,7 @@ export default {
}
}
.second-type-scroll
{
.second-type-scroll
{
width
:
100%
;
width
:
100%
;
animation
:
show-view-opacity
0.15s
forwards
;
.second-type-box
{
.second-type-box
{
width
:
100%
;
width
:
100%
;
gap
:
24
rpx
;
gap
:
24
rpx
;
...
@@ -274,6 +307,7 @@ export default {
...
@@ -274,6 +307,7 @@ export default {
}
}
.thirdly-type-scroll
{
.thirdly-type-scroll
{
width
:
100%
;
width
:
100%
;
animation
:
show-view-opacity
0.15s
forwards
;
.thirdly-type-box
{
.thirdly-type-box
{
width
:
100%
;
width
:
100%
;
...
@@ -336,5 +370,26 @@ export default {
...
@@ -336,5 +370,26 @@ export default {
}
}
}
}
}
}
.nothing
{
flex-direction
:
column
;
padding-top
:
136
rpx
;
font-size
:
28
rpx
;
color
:
#999999
;
line-height
:
40
rpx
;
.icon
{
width
:
676
rpx
;
height
:
284
rpx
;
margin-bottom
:
24
rpx
;
}
}
}
@keyframes
show-view-opacity
{
0
%
{
opacity
:
0
;
}
100
%
{
opacity
:
1
;
}
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
pages/boutique/history.vue
View file @
de2d948
...
@@ -141,7 +141,6 @@ export default {
...
@@ -141,7 +141,6 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
imageUrl
:
require
(
'@/assets/images/noviceGuide/step1-1.webp'
),
groupIndex
:
1
,
groupIndex
:
1
,
goodsList
:[],
goodsList
:[],
name
:
''
,
name
:
''
,
...
...
pages/boutique/index.vue
View file @
de2d948
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<swiper
<swiper
class=
"swiper"
class=
"swiper"
circular
circular
:autoplay=
"bannerAutoplay"
:autoplay=
"bannerAutoplay
&& !previewOff
"
interval=
"3000"
interval=
"3000"
previous-margin=
"380rpx"
previous-margin=
"380rpx"
next-margin=
"448rpx"
next-margin=
"448rpx"
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
</template>
</template>
</swiper>
</swiper>
<view
class=
"tips"
>
<view
class=
"tips"
>
*
窗膜精品,更有整车搭配套餐火爆售卖。
窗膜精品,更有整车搭配套餐火爆售卖。
<view>
点击了解更多
>
</view>
<view>
点击了解更多
>
</view>
</view>
</view>
</view>
</view>
...
@@ -171,6 +171,7 @@ export default {
...
@@ -171,6 +171,7 @@ export default {
currentCar
:
''
,
currentCar
:
''
,
currentIndex
:
0
,
currentIndex
:
0
,
bannerAutoplay
:
true
,
bannerAutoplay
:
true
,
previewOff
:
false
,
mediaConfigList
:
[]
mediaConfigList
:
[]
}
}
},
},
...
@@ -253,11 +254,11 @@ export default {
...
@@ -253,11 +254,11 @@ export default {
toDetail
(
item
)
{
toDetail
(
item
)
{
this
.
chooseItem
=
item
this
.
chooseItem
=
item
this
.
$refs
.
home
.
previewRef
.
open
();
this
.
$refs
.
home
.
previewRef
.
open
();
this
.
bannerAutoplay
=
fals
e
this
.
previewOff
=
tru
e
},
},
cancel
()
{
cancel
()
{
this
.
$refs
.
home
.
previewRef
.
close
();
this
.
$refs
.
home
.
previewRef
.
close
();
this
.
bannerAutoplay
=
tru
e
this
.
previewOff
=
fals
e
},
},
preview
()
{
preview
()
{
let
{
id
,
tabId
}
=
this
.
chooseItem
;
let
{
id
,
tabId
}
=
this
.
chooseItem
;
...
@@ -345,6 +346,12 @@ export default {
...
@@ -345,6 +346,12 @@ export default {
this
.
customerType
=
0
this
.
customerType
=
0
this
.
jumpPage
()
this
.
jumpPage
()
this
.
$nextTick
(()
=>
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
customer
))
this
.
$nextTick
(()
=>
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
customer
))
let
{
carBannerList
}
=
this
,
currentCar
=
carBannerList
[
1
].
title
carBannerList
.
map
(
i
=>
{
if
(
customer
.
carModel
.
includes
(
i
.
title
))
currentCar
=
i
.
title
})
this
.
currentCar
=
currentCar
},
},
swiperChange
(
e
)
{
swiperChange
(
e
)
{
this
.
currentIndex
=
e
.
detail
.
current
this
.
currentIndex
=
e
.
detail
.
current
...
@@ -387,13 +394,13 @@ export default {
...
@@ -387,13 +394,13 @@ export default {
border
:
2
rpx
solid
#ffffff
;
border
:
2
rpx
solid
#ffffff
;
border-radius
:
8
rpx
;
border-radius
:
8
rpx
;
backdrop-filter
:
blur
(
4
rpx
);
backdrop-filter
:
blur
(
4
rpx
);
padding
:
0
20
rpx
;
padding
:
0
20
rpx
0
8
rpx
;
font-weight
:
500
;
font-weight
:
500
;
font-size
:
32
rpx
;
font-size
:
32
rpx
;
color
:
#333333
;
color
:
#333333
;
line-height
:
40
rpx
;
line-height
:
40
rpx
;
.icon
{
.icon
{
margin-right
:
8
rpx
;
margin-right
:
4
rpx
;
flex-shrink
:
0
;
flex-shrink
:
0
;
width
:
56
rpx
;
width
:
56
rpx
;
height
:
56
rpx
;
height
:
56
rpx
;
...
@@ -510,7 +517,6 @@ export default {
...
@@ -510,7 +517,6 @@ export default {
}
}
.config-name
{
.config-name
{
position
:
relative
;
position
:
relative
;
width
:
fit-content
;
height
:
56
rpx
;
height
:
56
rpx
;
background
:
#ffffff66
;
background
:
#ffffff66
;
border
:
2
rpx
solid
#ffffff
;
border
:
2
rpx
solid
#ffffff
;
...
@@ -595,11 +601,18 @@ export default {
...
@@ -595,11 +601,18 @@ export default {
.tips
{
.tips
{
position
:
absolute
;
position
:
absolute
;
left
:
32
rpx
;
left
:
32
rpx
;
bottom
:
1
44
rpx
;
bottom
:
1
28
rpx
;
font-size
:
24
rpx
;
font-size
:
24
rpx
;
color
:
#999999
;
color
:
#999999
;
line-height
:
36
rpx
;
line-height
:
36
rpx
;
z-index
:
2
;
z-index
:
2
;
padding-left
:
16
rpx
;
&::after
{
content
:
'* '
;
position
:
absolute
;
top
:
4
rpx
;
left
:
0
;
}
}
}
}
}
</
style
>
</
style
>
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