Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
5f4dbd2f
Commit
5f4dbd2f
authored
Jun 24, 2025
by
yuzhenWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调适配5
parent
fe8a6a77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
22 deletions
+95
-22
pages/index/index.vue
+20
-11
pages/orderStatus/orderStatus.vue
+75
-11
No files found.
pages/index/index.vue
View file @
5f4dbd2f
...
@@ -663,15 +663,19 @@
...
@@ -663,15 +663,19 @@
.productListBox
{
.productListBox
{
padding
:
30
rpx
;
padding
:
30
rpx
;
display
:
grid
;
display
:
grid
;
grid-template-columns
:
repeat
(
2
,
1
fr
);
/* 默认两列 */
/* 默认两列,固定宽度 */
gap
:
30
rpx
;
/* 间隙 */
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
300
rpx
,
1
fr
));
gap
:
30
rpx
;
justify-content
:
center
;
.productListItem
{
.productListItem
{
width
:
100%
;
/* 使用grid布局后宽度自动控制 */
width
:
100%
;
max-width
:
350
rpx
;
/* 设置最大宽度 */
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
overflow
:
hidden
;
overflow
:
hidden
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
margin
:
0
auto
;
/* 居中显示 */
.top
{
.top
{
width
:
100%
;
width
:
100%
;
...
@@ -697,23 +701,29 @@
...
@@ -697,23 +701,29 @@
}
}
.productDesBox
{
.productDesBox
{
box-sizing
:
border-box
;
position
:
absolute
;
position
:
absolute
;
left
:
0
;
left
:
0
;
bottom
:
0
;
bottom
:
0
;
width
:
100%
;
width
:
100%
;
padding
:
5
rpx
10
rpx
10
rpx
10
rpx
;
padding
:
0
15
rpx
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
background
:
rgba
(
0
,
0
,
0
,
0.1
);
background
:
rgba
(
0
,
0
,
0
,
0.1
);
border-radius
:
0
0
20
rpx
20
rpx
;
border-radius
:
0
0
20
rpx
20
rpx
;
font-size
:
24
rpx
;
font-size
:
24
rpx
;
color
:
#fff
;
color
:
#fff
;
display
:
-webkit-box
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
/* 关键修改:显示2行 */
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
-webkit-box-orient
:
vertical
;
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
/* 移除 white-space: nowrap */
/* 关键修改:添加精确的高度计算 */
line-height
:
1.4
;
/* 可选:调整行高,使两行更美观 */
max-height
:
calc
(
2
*
1.4
*
24
rpx
);
/* 2行 × 行高 × 字体大小 */
line-height
:
1.5
;
/* 确保在Firefox等浏览器也有效 */
display
:
-moz-box
;
-moz-box-orient
:
vertical
;
-moz-line-clamp
:
2
;
}
}
}
}
...
@@ -756,16 +766,15 @@
...
@@ -756,16 +766,15 @@
/* iPad竖屏和小屏幕平板 */
/* iPad竖屏和小屏幕平板 */
@media
(
min-width
:
768px
)
and
(
max-width
:
1023px
)
{
@media
(
min-width
:
768px
)
and
(
max-width
:
1023px
)
{
.productList
.productListBox
{
.productList
.productListBox
{
grid-template-columns
:
repeat
(
3
,
1
fr
);
/* 三列 */
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
300
rpx
,
1
fr
));
gap
:
30
rpx
;
gap
:
30
rpx
;
}
}
}
}
/* iPad横屏和大屏幕平板 */
/* iPad横屏和大屏幕平板 */
@media
(
min-width
:
1024px
)
and
(
max-width
:
1279px
)
{
@media
(
min-width
:
1024px
)
and
(
max-width
:
1279px
)
{
.productList
.productListBox
{
.productList
.productListBox
{
grid-template-columns
:
repeat
(
3
,
1
fr
);
/* 三列 */
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
300
rpx
,
1
fr
));
gap
:
30
rpx
;
gap
:
30
rpx
;
}
}
}
}
...
@@ -773,7 +782,7 @@
...
@@ -773,7 +782,7 @@
/* 电脑端 */
/* 电脑端 */
@media
(
min-width
:
1280px
)
{
@media
(
min-width
:
1280px
)
{
.productList
.productListBox
{
.productList
.productListBox
{
grid-template-columns
:
repeat
(
4
,
1
fr
);
/* 四列 */
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
300
rpx
,
1
fr
));
gap
:
30
rpx
;
gap
:
30
rpx
;
}
}
}
}
...
...
pages/orderStatus/orderStatus.vue
View file @
5f4dbd2f
...
@@ -199,15 +199,19 @@
...
@@ -199,15 +199,19 @@
.productListBox
{
.productListBox
{
padding
:
30
rpx
;
padding
:
30
rpx
;
display
:
grid
;
display
:
grid
;
grid-template-columns
:
repeat
(
2
,
1
fr
);
/* 默认两列 */
/* 默认两列,固定宽度 */
gap
:
30
rpx
;
/* 间隙 */
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
300
rpx
,
1
fr
));
gap
:
30
rpx
;
justify-content
:
center
;
.productListItem
{
.productListItem
{
width
:
100%
;
/* 使用grid布局后宽度自动控制 */
width
:
100%
;
max-width
:
350
rpx
;
/* 设置最大宽度 */
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
overflow
:
hidden
;
overflow
:
hidden
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
margin
:
0
auto
;
/* 居中显示 */
.top
{
.top
{
width
:
100%
;
width
:
100%
;
...
@@ -233,23 +237,29 @@
...
@@ -233,23 +237,29 @@
}
}
.productDesBox
{
.productDesBox
{
box-sizing
:
border-box
;
position
:
absolute
;
position
:
absolute
;
left
:
0
;
left
:
0
;
bottom
:
0
;
bottom
:
0
;
width
:
100%
;
width
:
100%
;
padding
:
5
rpx
10
rpx
10
rpx
10
rpx
;
padding
:
0
15
rpx
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
background
:
rgba
(
0
,
0
,
0
,
0.1
);
background
:
rgba
(
0
,
0
,
0
,
0.1
);
border-radius
:
0
0
20
rpx
20
rpx
;
border-radius
:
0
0
20
rpx
20
rpx
;
font-size
:
24
rpx
;
font-size
:
24
rpx
;
color
:
#fff
;
color
:
#fff
;
display
:
-webkit-box
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
/* 关键修改:显示2行 */
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
-webkit-box-orient
:
vertical
;
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
/* 移除 white-space: nowrap */
/* 关键修改:添加精确的高度计算 */
line-height
:
1.4
;
/* 可选:调整行高,使两行更美观 */
max-height
:
calc
(
2
*
1.4
*
24
rpx
);
/* 2行 × 行高 × 字体大小 */
line-height
:
1.5
;
/* 确保在Firefox等浏览器也有效 */
display
:
-moz-box
;
-moz-box-orient
:
vertical
;
-moz-line-clamp
:
2
;
}
}
}
}
...
@@ -292,16 +302,15 @@
...
@@ -292,16 +302,15 @@
/* iPad竖屏和小屏幕平板 */
/* iPad竖屏和小屏幕平板 */
@media
(
min-width
:
768px
)
and
(
max-width
:
1023px
)
{
@media
(
min-width
:
768px
)
and
(
max-width
:
1023px
)
{
.productList
.productListBox
{
.productList
.productListBox
{
grid-template-columns
:
repeat
(
3
,
1
fr
);
/* 三列 */
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
300
rpx
,
1
fr
));
gap
:
30
rpx
;
gap
:
30
rpx
;
}
}
}
}
/* iPad横屏和大屏幕平板 */
/* iPad横屏和大屏幕平板 */
@media
(
min-width
:
1024px
)
and
(
max-width
:
1279px
)
{
@media
(
min-width
:
1024px
)
and
(
max-width
:
1279px
)
{
.productList
.productListBox
{
.productList
.productListBox
{
grid-template-columns
:
repeat
(
3
,
1
fr
);
/* 三列 */
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
300
rpx
,
1
fr
));
gap
:
30
rpx
;
gap
:
30
rpx
;
}
}
}
}
...
@@ -309,7 +318,7 @@
...
@@ -309,7 +318,7 @@
/* 电脑端 */
/* 电脑端 */
@media
(
min-width
:
1280px
)
{
@media
(
min-width
:
1280px
)
{
.productList
.productListBox
{
.productList
.productListBox
{
grid-template-columns
:
repeat
(
4
,
1
fr
);
/* 四列 */
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
300
rpx
,
1
fr
));
gap
:
30
rpx
;
gap
:
30
rpx
;
}
}
}
}
...
@@ -324,6 +333,61 @@
...
@@ -324,6 +333,61 @@
font-size
:
28
rpx
;
font-size
:
28
rpx
;
}
}
}
}
.statusBox
{
padding
:
30
rpx
0
;
background-color
:
#fff
;
margin-bottom
:
10
rpx
;
.successBox{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.statusText{
color
:
#20279B
;
font-size
:
36
rpx
;
}
.viewOrder
{
color
:
#666666
;
font-size
:
30
rpx
;
margin-top
:
30
rpx
;
}
.iconfont
{
margin-bottom
:
30
rpx
;
font-size
:
100
rpx
;
color
:
#20279B
;
}
}
.failBox
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.iconfont{
border
:
1px
solid
#F15A1F
;
padding
:
12
rpx
;
border-radius
:
50%
;
margin-right
:
20
rpx
;
}
.optionBox
{
display
:
flex
;
justify-content
:
center
;
margin-top
:
60
rpx
;
text{
border-radius
:
40
rpx
;
background-color
:
#20279B
;
color
:
#fff
;
font-size
:
30
rpx
;
padding
:
10
rpx
50
rpx
;
margin-right
:
20
rpx
;
&:first-child{
background-color
:
transparent
;
color
:
#20279B
;
border
:
1px
solid
#20279B
;
}
}
}
}
}
}
}
</
style
>
</
style
>
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