Skip to content

Commit

Permalink
“my”页面添加未读计数提示
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxuanqiang committed Sep 27, 2016
1 parent 8486860 commit 88a51a4
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
Binary file modified images/screenshots/screenshorts-04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions pages/my/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@ Page( {
projectSource: 'https://github.com/liuxuanqiang/wechat-weapp-mall',
userListInfo: [ {
icon: '../../images/iconfont-dingdan.png',
text: '我的订单'
text: '我的订单',
isunread: true,
unreadNum: 2
}, {
icon: '../../images/iconfont-card.png',
text: '我的代金券'
text: '我的代金券',
isunread: false,
unreadNum: 2
}, {
icon: '../../images/iconfont-icontuan.png',
text: '我的拼团'
text: '我的拼团',
isunread: true,
unreadNum: 1
}, {
icon: '../../images/iconfont-shouhuodizhi.png',
text: '收货地址管理'
Expand Down
1 change: 1 addition & 0 deletions pages/my/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<view class="weui_cell_bd">
<view class="weui_cell_bd_p"> {{item.text}} </view>
</view>
<view wx:if="{{item.isunread}}" class="badge">{{item.unreadNum}}</view>
<view class="with_arrow"></view>
</view>
</block>
Expand Down
12 changes: 12 additions & 0 deletions pages/my/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@
font-size: 14px;
color: #939393;
}
.badge{
position: absolute;
top: 18px;
right: 40px;
width: 15px;
height: 15px;
background: #ff0000;
color: #fff;
border-radius: 50%;
text-align: center;
font-size: 8px;
}
.with_arrow{
position: absolute;
top: 18px;
Expand Down

0 comments on commit 88a51a4

Please sign in to comment.