Skip to content

Commit c52f0bc

Browse files
committed
增加商品购买页导航icon
1 parent e0b4153 commit c52f0bc

File tree

5 files changed

+66
-18
lines changed

5 files changed

+66
-18
lines changed

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ func main() {
6363
})
6464

6565
app.Listen(":" + strconv.Itoa(config.ServerConfig.Port))
66-
}
66+
}

wexin/pages/index/index.wxss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
page {
2-
height:100%;
2+
height: 100%;
33
}
44

55
.home-box {

wexin/pages/product/product.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Page({
22
data: {
3-
name: 'test'
3+
name: 'test',
4+
url: "../../images/1.jpg"
45
},
56
onLoad: function () {
67
this.setData({

wexin/pages/product/product.wxml

+16-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
<!--商品详情页-->
22
<view class="product-container">
3-
<view></view>
4-
<ul class="tabbar">
5-
<li class="tabbar-item tabbar-home">x</li>
6-
<li class="tabbar-item tabbar-cart">y</li>
7-
<li class="tabbar-item tabbar-add-cart">加入购物车</li>
8-
<li class="tabbar-item tabbar-buy-now">立即购买</li>
9-
</ul>
3+
<view class="tabbar">
4+
<view class="tabbar-item tabbar-home">
5+
<view>
6+
<image class="home-icon" mode="aspectFit" src="../../icons/home.png"></image>
7+
</view>
8+
<text class="home-text">首页</text>
9+
</view>
10+
<view class="tabbar-item tabbar-cart">
11+
<view>
12+
<image class="cart-icon" mode="aspectFit" src="../../icons/cart.png"></image>
13+
</view>
14+
<text class="cart-text">购物车</text>
15+
</view>
16+
<view class="tabbar-item tabbar-add-cart"><text>加入购物车</text></view>
17+
<view class="tabbar-item tabbar-buy-now"><text>立即购买</text></view>
18+
</view>
1019
</view>

wexin/pages/product/product.wxss

+46-8
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,78 @@
1+
page {
2+
width: 100%;
3+
height: 100%;
4+
}
5+
16
.product-container {
27
position: relative;
8+
font-size: 0;
9+
width: 100%;
10+
height: 100%;
311
}
412

513
.tabbar {
614
width: 100%;
715
display: flex;
816
position: fixed;
9-
bottom: 0;
17+
bottom: -1rpx;
18+
font-size: 0;
1019
}
1120

1221
.tabbar-item {
13-
height: 100rpx;
22+
height: 120rpx;
1423
}
1524

1625
.tabbar-home {
17-
width: 200rpx;
26+
width: 200px;
27+
text-align: center;
28+
border-right: 1rpx #e6e6e6 solid;
29+
}
30+
31+
.home-icon {
32+
margin-top: 15rpx;
33+
width: 50rpx;
34+
height: 50rpx;
35+
}
36+
37+
.home-text {
38+
vertical-align: top;
39+
font-size: 24rpx;
40+
line-height: 40rpx;
41+
color: #444;
1842
}
1943

2044
.tabbar-cart {
21-
width: 200rpx;
45+
width: 200px;
46+
text-align: center;
47+
}
48+
49+
.cart-icon {
50+
margin-top: 15rpx;
51+
width: 50rpx;
52+
height: 50rpx;
53+
}
54+
55+
.cart-text {
56+
vertical-align: top;
57+
font-size: 24rpx;
58+
line-height: 40rpx;
59+
color: #444;
2260
}
2361

2462
.tabbar-add-cart {
2563
color: #fff;
2664
background-color: #fd885b;
27-
line-height: 100rpx;
65+
line-height: 120rpx;
2866
width: 100%;
2967
text-align: center;
30-
font-size: 36rpx;
68+
font-size: 38rpx;
3169
}
3270

3371
.tabbar-buy-now {
3472
color: #fff;
3573
background-color: #fc464a;
36-
line-height: 100rpx;
74+
line-height: 120rpx;
3775
width: 100%;
3876
text-align: center;
39-
font-size: 36rpx;
77+
font-size: 38rpx;
4078
}

0 commit comments

Comments
 (0)