Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uni-app-wy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
单欣鑫
uni-app-wy
Commits
770786fa
Commit
770786fa
authored
Oct 26, 2026
by
zhipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页添加按钮跳转
parent
b751c738
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
41 deletions
+66
-41
manifest.json
manifest.json
+1
-1
pages.json
pages.json
+1
-1
homeOne.vue
pages/homeOne.vue
+46
-34
homeTwo.vue
pages/homeTwo.vue
+18
-5
No files found.
manifest.json
View file @
770786fa
{
{
"name"
:
"小神仙妆造预约"
,
"name"
:
"小神仙妆造预约"
,
"appid"
:
"__UNI__
085FC1A
"
,
"appid"
:
"__UNI__
B1817BB
"
,
"description"
:
""
,
"description"
:
""
,
"versionName"
:
"1.0.0"
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"versionCode"
:
"100"
,
...
...
pages.json
View file @
770786fa
...
@@ -278,7 +278,7 @@
...
@@ -278,7 +278,7 @@
"pagePath"
:
"pages/homeTwo"
,
"pagePath"
:
"pages/homeTwo"
,
"iconPath"
:
"/static/tabbar/icon_tab_two.png"
,
"iconPath"
:
"/static/tabbar/icon_tab_two.png"
,
"selectedIconPath"
:
"/static/tabbar/icon_tab_two_s.png"
,
"selectedIconPath"
:
"/static/tabbar/icon_tab_two_s.png"
,
"text"
:
"客片"
"text"
:
"客片
展示
"
},
},
{
{
"pagePath"
:
"pages/homeThree"
,
"pagePath"
:
"pages/homeThree"
,
...
...
pages/homeOne.vue
View file @
770786fa
...
@@ -8,18 +8,18 @@
...
@@ -8,18 +8,18 @@
</swiper-item>
</swiper-item>
</swiper>
</swiper>
<view
class=
"banner__mask"
>
<view
class=
"banner__mask"
>
<view
class=
"banner__title"
v-if=
"
list[bannercurrentIndex] && list[bannercurrentIndex].t
itle"
>
<view
class=
"banner__title"
v-if=
"
bannerT
itle"
>
<text
class=
"banner__title-text"
>
{{
list
[
bannercurrentIndex
].
t
itle
}}
</text>
<text
class=
"banner__title-text"
>
{{
bannerT
itle
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"entry-bar"
>
<view
class=
"entry-bar"
>
<view
class=
"entry-item"
hover-class=
"entry-item-
-hover"
@
click=
"goPhoto('服饰')
"
>
<view
class=
"entry-item"
hover-class=
"entry-item-
hover"
@
click=
"goPhotoCloth
"
>
<text
class=
"entry-item__text"
>
服装展示
</text>
<text
class=
"entry-item__text"
>
服装展示
</text>
<view
class=
"entry-item__line
entry-item__line--red
"
></view>
<view
class=
"entry-item__line"
></view>
</view>
</view>
<view
class=
"entry-item"
hover-class=
"entry-item-
-hover"
@
click=
"goPhoto('作品')
"
>
<view
class=
"entry-item"
hover-class=
"entry-item-
hover"
@
click=
"goPhotoWork
"
>
<text
class=
"entry-item__text"
>
客拍展示
</text>
<text
class=
"entry-item__text"
>
客拍展示
</text>
<view
class=
"entry-item__line
entry-item__line--orange
"
></view>
<view
class=
"entry-item__line"
></view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -42,6 +42,12 @@
...
@@ -42,6 +42,12 @@
this
.
isTrue
=
time1
<
time2
this
.
isTrue
=
time1
<
time2
this
.
getList
()
this
.
getList
()
},
},
computed
:
{
bannerTitle
()
{
const
item
=
this
.
list
[
this
.
bannercurrentIndex
]
return
item
&&
item
.
title
?
item
.
title
:
''
}
},
methods
:
{
methods
:
{
getList
()
{
getList
()
{
const
params
=
{
const
params
=
{
...
@@ -68,6 +74,12 @@
...
@@ -68,6 +74,12 @@
this
.
$wskj
.
redirectTo
(
"
/pages/homeFour
"
)
this
.
$wskj
.
redirectTo
(
"
/pages/homeFour
"
)
}
}
},
},
goPhotoCloth
()
{
this
.
goPhoto
(
'
服装
'
)
},
goPhotoWork
()
{
this
.
goPhoto
(
'
作品
'
)
},
goPhoto
(
className
)
{
goPhoto
(
className
)
{
uni
.
setStorageSync
(
'
photoClassTarget
'
,
className
)
uni
.
setStorageSync
(
'
photoClassTarget
'
,
className
)
uni
.
switchTab
({
uni
.
switchTab
({
...
@@ -113,19 +125,21 @@
...
@@ -113,19 +125,21 @@
right
:
0
;
right
:
0
;
bottom
:
0
;
bottom
:
0
;
z-index
:
2
;
z-index
:
2
;
padding
:
160rpx
4
0rpx
calc
(
48rpx
+
env
(
safe-area-inset-bottom
))
;
padding
:
160rpx
4
8rpx
120rpx
;
background
:
linear-gradient
(
background
:
linear-gradient
(
180deg
,
180deg
,
rgba
(
0
,
0
,
0
,
0
)
0%
,
rgba
(
0
,
0
,
0
,
0
)
0%
,
rgba
(
0
,
0
,
0
,
0
.2
2
)
45
%
,
rgba
(
0
,
0
,
0
,
0
.2
8
)
48
%
,
rgba
(
0
,
0
,
0
,
0
.
58
)
100%
rgba
(
0
,
0
,
0
,
0
.
62
)
100%
);
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
pointer-events
:
none
;
pointer-events
:
none
;
}
}
.banner__title
{
.banner__title
{
padding
:
0
8rpx
;
padding
:
0
4rpx
;
text-align
:
center
;
pointer-events
:
none
;
}
}
.banner__title-text
{
.banner__title-text
{
...
@@ -140,49 +154,47 @@
...
@@ -140,49 +154,47 @@
.entry-bar
{
.entry-bar
{
position
:
absolute
;
position
:
absolute
;
left
:
40rpx
;
left
:
0
;
top
:
50%
;
right
:
0
;
bottom
:
36rpx
;
z-index
:
3
;
z-index
:
3
;
transform
:
translateY
(
-50%
);
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
}
}
.entry-item
{
.entry-item
{
padding
:
1
2rpx
20rpx
12rpx
0
;
padding
:
1
4rpx
28rpx
18rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
flex-start
;
align-items
:
center
;
background
:
rgba
(
255
,
255
,
255
,
0
.1
);
border-radius
:
8rpx
;
}
}
.entry-item
+
.entry-item
{
.entry-item
+
.entry-item
{
margin-
top
:
44
rpx
;
margin-
left
:
32
rpx
;
}
}
.entry-item-
-
hover
{
.entry-item-hover
{
opacity
:
0
.7
;
opacity
:
0
.7
;
}
}
.entry-item__text
{
.entry-item__text
{
color
:
#ffffff
;
color
:
rgba
(
255
,
255
,
255
,
0
.95
)
;
font-size
:
34
rpx
;
font-size
:
28
rpx
;
line-height
:
4
8
rpx
;
line-height
:
4
0
rpx
;
font-weight
:
400
;
font-weight
:
400
;
letter-spacing
:
6
rpx
;
letter-spacing
:
8
rpx
;
text-shadow
:
0
2rpx
1
2rpx
rgba
(
0
,
0
,
0
,
0
.4
5
);
text-shadow
:
0
2rpx
1
0rpx
rgba
(
0
,
0
,
0
,
0
.3
5
);
}
}
.entry-item__line
{
.entry-item__line
{
width
:
64rpx
;
width
:
48rpx
;
height
:
4rpx
;
height
:
3rpx
;
margin-top
:
14rpx
;
margin-top
:
12rpx
;
}
border-radius
:
2rpx
;
background
:
rgba
(
255
,
255
,
255
,
0
.55
);
.entry-item__line--red
{
background
:
#e53935
;
}
.entry-item__line--orange
{
background
:
#ff8a00
;
}
}
</
style
>
</
style
>
pages/homeTwo.vue
View file @
770786fa
<
template
>
<
template
>
<view
class=
'container'
>
<view
class=
'container'
>
<view>
<view>
<u-navbar
leftIconColor=
"#000000"
title=
"客片"
<u-navbar
leftIconColor=
"#000000"
title=
"客片展示"
:titleStyle=
"
{color: '#000000'}"
:titleStyle=
"
{color: '#000000'}"
bgColor="#ffffff"
bgColor="#ffffff"
leftIcon=""
leftIcon=""
placeholder
placeholder
>
>
<template
slot=
"left"
></
template
>
<template
slot=
"left"
></
template
>
</u-navbar>
</u-navbar>
...
@@ -20,7 +19,7 @@
...
@@ -20,7 +19,7 @@
:class=
"{ active: tabIndex === index }"
:class=
"{ active: tabIndex === index }"
@
click=
"onTabClick({ index: index })"
@
click=
"onTabClick({ index: index })"
>
>
<text
class=
"level-text"
>
{{
item.name
}}
</text>
<text
class=
"level-text"
>
{{
displayClassName(item.name)
}}
</text>
<view
class=
"level-line"
></view>
<view
class=
"level-line"
></view>
</view>
</view>
</view>
</view>
...
@@ -103,10 +102,24 @@
...
@@ -103,10 +102,24 @@
uni
.
removeStorageSync
(
'
photoClassTarget
'
)
uni
.
removeStorageSync
(
'
photoClassTarget
'
)
this
.
pendingClassName
=
String
(
target
)
this
.
pendingClassName
=
String
(
target
)
},
},
selectByName
(
name
)
{
displayClassName
(
name
)
{
const
map
=
{
'
服饰
'
:
'
服装
'
}
return
map
[
name
]
||
name
},
resolveClassName
(
name
)
{
const
target
=
String
(
name
||
''
).
trim
()
const
target
=
String
(
name
||
''
).
trim
()
const
alias
=
{
'
服装
'
:
'
服饰
'
,
'
服饰
'
:
'
服饰
'
}
return
alias
[
target
]
||
target
},
selectByName
(
name
)
{
const
target
=
this
.
resolveClassName
(
name
)
if
(
!
target
||
!
this
.
tablist
.
length
)
return
false
if
(
!
target
||
!
this
.
tablist
.
length
)
return
false
const
index
=
this
.
tablist
.
findIndex
(
item
=>
item
.
name
===
target
)
const
index
=
this
.
tablist
.
findIndex
(
item
=>
item
.
name
===
target
||
this
.
displayClassName
(
item
.
name
)
===
String
(
name
||
''
).
trim
()
)
this
.
pendingClassName
=
''
this
.
pendingClassName
=
''
if
(
index
<
0
)
{
if
(
index
<
0
)
{
this
.
applyTab
(
0
,
true
)
this
.
applyTab
(
0
,
true
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment