-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7e49bf
commit 5addccd
Showing
14 changed files
with
195 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// miniprogram/pages/rank/rank.js | ||
Page({ | ||
|
||
/** | ||
* 页面的初始数据 | ||
*/ | ||
data: { | ||
rankList:null | ||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面加载 | ||
*/ | ||
onLoad: function (options) { | ||
var that=this;//进入云函数中this发生了变化,使用this.setData({})无效 | ||
wx.cloud.callFunction({ | ||
// 云函数名称 | ||
name: 'get_rank_list', | ||
//成功后执行 | ||
success: function (res) { | ||
//提取数据--返回的数据为res.result.云函数处定义的字段名.data | ||
var data = res.result.rankList.data | ||
//此处为了简略代码,删去了else情况的操作 | ||
that.setData({ | ||
rankList: data | ||
}) | ||
}, | ||
fail: console.error | ||
}) | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面初次渲染完成 | ||
*/ | ||
onReady: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面显示 | ||
*/ | ||
onShow: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面隐藏 | ||
*/ | ||
onHide: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面卸载 | ||
*/ | ||
onUnload: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 页面相关事件处理函数--监听用户下拉动作 | ||
*/ | ||
onPullDownRefresh: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 页面上拉触底事件的处理函数 | ||
*/ | ||
onReachBottom: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 用户点击右上角分享 | ||
*/ | ||
onShareAppMessage: function () { | ||
|
||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"usingComponents": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<view> | ||
<view class="padding bg-white"> | ||
<view class="solid-bottom text-xl padding text-center bg-gradual-green" style="border-radius: 15rpx;"> | ||
<text class="text-white ">店铺信息贡献者(前十位)</text> | ||
</view> | ||
</view> | ||
<view class="cu-timeline bg-white"> | ||
<view class="cu-item cuIcon-evaluate_fill text-blue" wx:for-items="{{rankList}}" wx:for-item="item" wx:key="*this"> | ||
<view class="rankitem bg-gradual-green "> | ||
<view class="cu-avatar round lg" style="background-image:url({{item.avatarUrl}});"> | ||
</view> | ||
<view class="content"> | ||
<view class="text-white">{{item.nickName}}</view> | ||
<view class="text-white text-sm flex"> | ||
<text > | ||
<text class="margin-right "></text> 贡献店铺数目 | ||
</text> | ||
</view> | ||
</view> | ||
<view class="ranknum text-white"> | ||
{{item.nums}}家 | ||
</view> | ||
|
||
</view> | ||
</view> | ||
</view> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* miniprogram/pages/rank/rank.wxss */ | ||
.rankitem{ | ||
border-radius: 16rpx; | ||
position: relative; | ||
display: flex; | ||
padding: 30rpx,30rpx,30rpx,120rpx; | ||
height: 140rpx; | ||
justify-content: flex-end; | ||
align-items: center; | ||
} | ||
.rankitem>.cu-avatar { | ||
position: absolute; | ||
left: 20rpx | ||
} | ||
.rankitem>.content { | ||
position: absolute; | ||
left: 126rpx; | ||
width: calc(100% - 96rpx - 60rpx - 120rpx - 20rpx); | ||
line-height: 1.6em;} | ||
.ranknum{ | ||
letter-spacing:2px; | ||
padding-right: 30rpx | ||
} |