Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
buildingAgricultureSharing-miniapp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭佳妮(贵阳日报)
buildingAgricultureSharing-miniapp
Commits
7eaaa614
Commit
7eaaa614
authored
Aug 05, 2024
by
张娇(东信)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预售页面样式优化
parent
6514e445
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
204 additions
and
2 deletions
+204
-2
OtherSearch.vue
src/components/index/OtherSearch.vue
+0
-1
presale.vue
src/pages/index/presale.vue
+204
-1
presale.png
src/static/preSale/presale.png
+0
-0
preview.png
src/static/preSale/preview.png
+0
-0
No files found.
src/components/index/OtherSearch.vue
View file @
7eaaa614
...
@@ -36,7 +36,6 @@ function back() {
...
@@ -36,7 +36,6 @@ function back() {
border-radius
:
16rpx
16rpx
16rpx
16rpx
;
border-radius
:
16rpx
16rpx
16rpx
16rpx
;
opacity
:
0
.8
;
opacity
:
0
.8
;
margin
:
0
auto
;
margin
:
0
auto
;
margin-top
:
44rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
padding-left
:
20rpx
;
padding-left
:
20rpx
;
...
...
src/pages/index/presale.vue
View file @
7eaaa614
...
@@ -58,11 +58,79 @@
...
@@ -58,11 +58,79 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"waterfall"
>
<view
class=
"wt-left wt-list"
>
<view
class=
"wt-item"
v-for=
"(good, index) in LeftList"
:key=
"index"
@
click=
"ToDetail(good.id)"
>
<view
class=
"item-img"
>
<image
:src=
"good.image"
mode=
"widthFix"
></image>
<image
class=
"presale-img"
src=
"/static/presale/presale.png"
style=
"width: 132rpx; height: 64rpx"
/>
<image
class=
"preview-img"
src=
"/static/presale/preview.png"
style=
"width: 264rpx; height: 40rpx"
/>
<text
class=
"pre-text"
>
预计9月15日发货
</text>
</view>
<!-- 介绍部分 -->
<view
class=
"introduce-section"
>
<text
class=
"title"
>
{{
good
.
name
}}
</text>
<view
class=
"tags-box"
>
<text
class=
"good-detail"
>
{{
good
.
detail
}}
</text>
<text
class=
"introduction"
>
{{
good
.
introduction
}}
</text>
<text
class=
"good-price"
>
¥
{{
good
.
price
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"vt-right wt-list"
>
<view
class=
"wt-item"
v-for=
"(good, index) in RightList"
:key=
"index"
@
click=
"ToDetail(good.id)"
>
<view
class=
"item-img"
>
<image
:src=
"good.image"
mode=
"widthFix"
></image>
<image
class=
"presale-img"
src=
"/static/presale/presale.png"
style=
"width: 132rpx; height: 64rpx"
/>
<image
class=
"preview-img"
src=
"/static/presale/preview.png"
style=
"width: 264rpx; height: 40rpx"
/>
<text
class=
"pre-text"
>
预计9月15日发货
</text>
</view>
<!-- 介绍部分 -->
<view
class=
"introduce-section"
>
<text
class=
"title"
>
{{
good
.
name
}}
</text>
<view
class=
"tags-box"
>
<text
class=
"good-detail"
>
{{
good
.
detail
}}
</text>
<text
class=
"introduction"
>
{{
good
.
introduction
}}
</text>
<text
class=
"good-price"
>
¥
{{
good
.
price
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
OtherSearch
from
'../../components/index/OtherSearch.vue'
;
import
OtherSearch
from
'../../components/index/OtherSearch.vue'
;
import
{
ref
}
from
'vue'
;
const
current
=
ref
(
0
);
const
current
=
ref
(
0
);
const
light
=
ref
(
0
);
const
light
=
ref
(
0
);
const
sortList
=
ref
([
const
sortList
=
ref
([
...
@@ -101,6 +169,71 @@ const shopList = ref([
...
@@ -101,6 +169,71 @@ const shopList = ref([
{
img
:
'/static/presale/img7.png'
,
price
:
'29.9'
,
text
:
'应季好物'
},
{
img
:
'/static/presale/img7.png'
,
price
:
'29.9'
,
text
:
'应季好物'
},
{
img
:
'/static/presale/img7.png'
,
price
:
'29.9'
,
text
:
'应季好物'
},
{
img
:
'/static/presale/img7.png'
,
price
:
'29.9'
,
text
:
'应季好物'
},
]);
]);
// 声明需要的数据
const
data
=
reactive
({
leftList
:
[],
// 左边列图片
rightList
:
[],
// 右边列图片
leftHeight
:
0
,
// 左边列高度
rightHeight
:
0
,
// 右边列高度
columnWidth
:
0
,
// 列宽度
});
// 总商品数据列表
const
goodList
=
ref
([
{
id
:
1
,
name
:
'这是一个商品'
,
image
:
'/static/presale/buy.png'
,
introduction
:
'商品简介商品简介'
,
price
:
69.9
,
},
{
id
:
2
,
name
:
'商品二'
,
image
:
'/static/presale/img7.png'
,
introduction
:
'商品简介商品简介'
,
price
:
69.9
,
},
{
id
:
3
,
name
:
'商品三'
,
image
:
'/static/assets/fruit.png'
,
introduction
:
'商品简介商品简介'
,
price
:
69.9
,
},
{
id
:
4
,
name
:
'商品四'
,
image
:
'/static/presale/buy.png'
,
introduction
:
'商品简介商品简介'
,
price
:
69.9
,
},
{
id
:
5
,
name
:
'商品五'
,
image
:
'/static/presale/buy.png'
,
introduction
:
'商品简介商品简介'
,
price
:
69.9
,
},
]);
// 左侧数据列表
const
LeftList
=
ref
([]);
// 右侧数据列表
const
RightList
=
ref
([]);
// 将商品信息列表分为左侧右侧两个部分
for
(
let
i
=
0
;
i
<
goodList
.
value
.
length
;
i
++
)
{
if
(
i
%
2
===
0
)
{
LeftList
.
value
.
push
(
goodList
.
value
[
i
]);
}
else
{
RightList
.
value
.
push
(
goodList
.
value
[
i
]);
}
}
// 点击商品 跳转详情
function
ToDetail
(
id
)
{
console
.
log
(
'点击了商品'
,
id
);
}
function
handleClick
(
e
)
{
function
handleClick
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
}
}
...
@@ -128,7 +261,7 @@ page {
...
@@ -128,7 +261,7 @@ page {
.nav
{
.nav
{
width
:
710rpx
;
width
:
710rpx
;
margin-left
:
18rpx
;
margin-left
:
18rpx
;
margin-top
:
-
27
0rpx
;
margin-top
:
-
30
0rpx
;
}
}
.nav-img
{
.nav-img
{
width
:
710rpx
;
width
:
710rpx
;
...
@@ -232,4 +365,74 @@ page {
...
@@ -232,4 +365,74 @@ page {
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#ffffff
;
color
:
#ffffff
;
}
}
.waterfall
{
display
:
flex
;
flex-direction
:
row
;
width
:
710rpx
;
justify-content
:
center
;
overflow
:
hidden
;
margin-top
:
10rpx
;
margin-left
:
30rpx
;
}
.wt-list
{
width
:
360rpx
;
display
:
flex
;
flex-direction
:
column
;
margin-right
:
10rpx
;
}
.wt-item
{
border-radius
:
8px
8px
8px
8px
;
margin-bottom
:
15rpx
;
background-color
:
#ffffff
;
}
.item-img
image
{
width
:
100%
;
}
/* 商品介绍 */
.introduce-section
{
background
:
#ffffff
;
padding
:
20rpx
30rpx
;
border-radius
:
0
0
08px
8px
;
margin-top
:
-20rpx
;
height
:
110rpx
;
}
.introduce-section
.title
{
font-size
:
32rpx
;
color
:
#303133
;
height
:
50rpx
;
line-height
:
50rpx
;
}
.introduce-section
.tags-box
{
display
:
flex
;
align-items
:
center
;
height
:
30rpx
;
font-size
:
24rpx
;
color
:
#909399
;
}
.good-price
{
position
:
relative
;
margin-top
:
70rpx
;
margin-left
:
-200rpx
;
color
:
#fa5151
;
font-size
:
28rpx
;
}
.preview-img
{
margin-left
:
100rpx
;
display
:
block
;
margin-top
:
-48rpx
;
}
.pre-text
{
float
:
right
;
margin-top
:
-40rpx
;
font-size
:
11px
;
font-weight
:
normal
;
line-height
:
14px
;
color
:
#ffffff
;
}
</
style
>
</
style
>
src/static/preSale/presale.png
0 → 100644
View file @
7eaaa614
970 Bytes
src/static/preSale/preview.png
0 → 100644
View file @
7eaaa614
306 Bytes
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