Skip to content

Commit 502c5ea

Browse files
committed
首页完成
1 parent 22d6818 commit 502c5ea

File tree

23 files changed

+331
-10
lines changed

23 files changed

+331
-10
lines changed

assets/common/arrow-right.png

2.15 KB
Loading

assets/common/favor.png

13.7 KB
Loading

assets/common/top.png

2.6 KB
Loading

components/w-back-top/w-back-top.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// components/w-back-top/w-back-top.js
2+
Component({
3+
/**
4+
* 组件的属性列表
5+
*/
6+
properties: {
7+
8+
},
9+
10+
/**
11+
* 组件的初始数据
12+
*/
13+
data: {
14+
15+
},
16+
17+
/**
18+
* 组件的方法列表
19+
*/
20+
methods: {
21+
handleBackTop() {
22+
wx.pageScrollTo({
23+
scrollTop: 0,
24+
})
25+
}
26+
}
27+
})

components/w-back-top/w-back-top.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"component": true,
3+
"usingComponents": {}
4+
}

components/w-back-top/w-back-top.wxml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<!--components/w-back-top/w-back-top.wxml-->
2+
<view class='back-top' bind:tap="handleBackTop">
3+
<image src="/assets/common/top.png"/>
4+
</view>

components/w-back-top/w-back-top.wxss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* components/w-back-top/w-back-top.wxss */
2+
.back-top {
3+
position: fixed;
4+
right: 10rpx;
5+
bottom: 10rpx;
6+
}
7+
8+
.back-top image {
9+
width: 100rpx;
10+
height: 100rpx;
11+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// components/w-goods-item/w-goods-item.js
2+
Component({
3+
/**
4+
* 组件的属性列表
5+
*/
6+
properties: {
7+
item: {
8+
type: Object,
9+
value: {}
10+
}
11+
},
12+
13+
/**
14+
* 组件的初始数据
15+
*/
16+
data: {
17+
18+
},
19+
20+
/**
21+
* 组件的方法列表
22+
*/
23+
methods: {
24+
25+
}
26+
})
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"component": true,
3+
"usingComponents": {}
4+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!--components/w-goods-item/w-goods-item.wxml-->
2+
<view class='goods-item'>
3+
<image class='image' src="{{item.show.img}}" mode="widthFix"/>
4+
<view class='desc-info'>
5+
<view class='title'>{{item.title}}</view>
6+
<view class='info'>
7+
<text class='price'>¥{{item.price}}</text>
8+
<image class='icon' src="/assets/common/favor.png"/>
9+
<text class='cfav'>{{item.cfav}}</text>
10+
</view>
11+
</view>
12+
</view>

0 commit comments

Comments
 (0)