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 84d3c6a7
authored
Jun 03, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
746181f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
39 deletions
assets/images/boutique/nothing.png
pages/boutique/membranes.vue
assets/images/boutique/nothing.png
0 → 100644
View file @
84d3c6a
131 KB
pages/boutique/membranes.vue
View file @
84d3c6a
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-05-30 14:40:39
* @LastEditors: huyue
* @LastEditTime: 2024-0
5-31 18:06:10
* @LastEditTime: 2024-0
6-03 14:49:06
-->
<
template
>
<view
style=
"position: relative;"
>
...
...
@@ -19,22 +19,22 @@
<view
class=
"first-tab"
>
<view
class=
"tab-item"
v-for=
"(i, index) in
firstNav
"
v-for=
"(i, index) in
views
"
:key=
"index"
@
click=
"changeIndex(index, 'firstIndex')"
>
<view
class=
"sprite-icon"
:class=
"[firstIndex == index ? `icon-$
{
i.class
} active` : '']"
:style="{ left:
i.left
}"
:class=
"[firstIndex == index ? `icon-$
{
firstClass[index]
} active` : '']"
:style="{ left:
firstLeft[index]
}"
>
</view>
{{
i
.
name
}}
<view
class=
"text"
:class=
"[firstIndex == index ? `active` : '']"
>
{{
i
.
tabName
}}
</view>
</view>
</view>
<view
class=
"content"
>
<view
class=
"second-tab"
>
<view
class=
"content"
id=
"content"
>
<view
class=
"second-tab"
ref=
"secondTab"
v-if=
"views[firstIndex].receptionSourceDetailInfoList"
>
<view
v-for=
"(item, ind) in
secondNav
"
v-for=
"(item, ind) in
views[firstIndex].receptionSourceDetailInfoList
"
:key=
"ind"
class=
"tab-item"
@
click=
"changeIndex(ind, 'secondIndex')"
...
...
@@ -42,11 +42,12 @@
<view
class=
"text"
:class=
"[secondIndex == ind ? 'active' : '']"
>
{{
item
}}
</view
>
{{
item
.
tabName
}}
</view
>
</view>
</view>
<view
class=
"product-list"
>
<template
v-if=
"views[firstIndex].receptionSourceDetailInfoList && views[firstIndex].receptionSourceDetailInfoList[secondIndex].receptionSourceDetailInfoList"
>
<view
class=
"product-list"
:style=
"
{height: views[firstIndex].receptionSourceDetailInfoList ? '908rpx' : '1040rpx'}">
<view
class=
"product-item"
>
<image
:src=
"require('@/assets/images/boutique/product.png')"
...
...
@@ -88,6 +89,16 @@
<view
class=
"product-name"
>
AITO问界 3M车窗膜(M5)
</view>
</view>
</view>
</
template
>
<
template
v-else
>
<view
class=
"nothing flex"
>
<image
class=
"icon"
src=
"../../assets/images/boutique/nothing.png"
/>
<view>
暂无产品内容
</view>
</view>
</
template
>
</view>
</view>
</view>
...
...
@@ -103,29 +114,22 @@
<
script
type=
"text/ecmascript-6"
>
export
default
{
name
:
'Membranes'
,
props
:
{
views
:
{
type
:
Array
,
default
:
()
=>
[]
},
madiaId
:
{
type
:
Number
,
default
:
0
}
},
data
()
{
return
{
firstIndex
:
0
,
firstNav
:
[
{
name
:
'问界M5'
,
left
:
'0rpx'
,
class
:
'first-nav'
},
{
name
:
'问界M7'
,
left
:
'352rpx'
,
class
:
'second-nav'
},
{
name
:
'问界M9'
,
left
:
'756rpx'
,
class
:
'second-nav'
}
],
firstLeft
:
[
'0rpx'
,
'352rpx'
,
'756rpx'
],
firstClass
:
[
'first-nav'
,
'second-nav'
,
'second-nav'
],
secondIndex
:
0
,
secondNav
:
[
'车窗膜'
,
'改色膜'
,
'车衣'
,
'天窗冰甲'
],
// animationList: ['m5', 'm7', 'm9']
animationList
:
[
require
(
'@/assets/images/boutique/animation-m5.png'
),
require
(
'@/assets/images/boutique/animation-m7.png'
),
require
(
'@/assets/images/boutique/animation-m9.png'
)]
}
},
...
...
@@ -139,21 +143,19 @@ export default {
this
.
firstIndex
=
0
}
},
mounted
()
{
},
methods
:
{
changeIndex
(
index
,
name
)
{
changeIndex
(
index
,
name
)
{
console
.
log
(
index
,
name
)
this
[
name
]
=
index
if
(
name
===
'fristIndex'
)
{
this
.
secondIndex
=
0
}
},
async
findSoureList
()
{
console
.
log
(
1111
)
const
data
=
await
uni
.
$api
.
boutiqueApi
.
findSoureList
({})
console
.
log
(
data
)
},
back
()
{
console
.
log
(
'back'
)
}
}
}
</
script
>
...
...
@@ -219,10 +221,29 @@ export default {
font-weight
:
500
;
font-size
:
40
rpx
;
color
:
#1f2133
;
.text
{
position
:
relative
;
text-align
:
center
;
width
:
400
rpx
;
}
.active
{
position
:
absolute
;
top
:
0
;
z-index
:
-1
;
font-weight
:
700
;
font-size
:
40
rpx
;
color
:
#2C66F7
;
&::after
{
content
:
""
;
position
:
absolute
;
bottom
:
0
;
left
:
50%
;
transform
:
translateX
(
-50%
);
width
:
48
rpx
;
height
:
8
rpx
;
background-color
:
#2C66F7
;
border-radius
:
16
rpx
;
}
}
}
}
...
...
@@ -233,6 +254,7 @@ export default {
padding
:
64
rpx
0
;
margin-top
:
-48
rpx
;
border-radius
:
48
rpx
;
height
:
calc
(
100%
-
128
rpx
);
.second-tab
{
display
:
inline-flex
;
background
:
#f2f2f2
;
...
...
@@ -240,6 +262,7 @@ export default {
height
:
84
rpx
;
align-items
:
center
;
margin-left
:
64
rpx
;
margin-bottom
:
48
rpx
;
.tab-item
{
display
:
inline-block
;
height
:
100%
;
...
...
@@ -263,10 +286,8 @@ export default {
display
:
grid
;
grid-template-columns
:
repeat
(
4
,
1
fr
);
gap
:
48
rpx
;
margin-top
:
48
rpx
;
height
:
908
rpx
;
//
height
:
908
rpx
;
padding
:
0
64
rpx
;
//
height
:
998
rpx
;
overflow-y
:
auto
;
.product-item
{
text-align
:
center
;
...
...
@@ -284,6 +305,19 @@ export default {
}
}
}
.nothing
{
width
:
100%
;
flex-direction
:
column
;
font-size
:
14px
;
color
:
#999999
;
position
:
absolute
;
top
:
50%
;
transform
:
translateY
(
-50%
);
.icon
{
width
:
676
rpx
;
height
:
284
rpx
;
margin-bottom
:
24
rpx
;
}
}
@keyframes
moveAndFade
{
0
%
{
transform
:
translate
(
100%
,
-100%
)
scale
(
0.2
);
/* 移动到右上角并缩小 */
...
...
@@ -302,5 +336,7 @@ export default {
position
:
absolute
;
/* 确保图片可以移动 */
top
:
0
;
right
:
0
;
width
:
600
rpx
;
height
:
400
rpx
;
}
</
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