From 739faa392bae4890feeb667c7fc361496d34716d Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Sat, 16 Mar 2019 16:40:46 +0800 Subject: [PATCH] =?UTF-8?q?[=E9=A6=96=E9=A1=B5][=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=88=91=E7=9A=84=E5=88=B8=E5=8C=85=E5=92=8C=E6=88=91=E7=9A=84?= =?UTF-8?q?=E5=8D=A1=E5=8C=85=E5=A2=9E=E5=8A=A0=E5=B0=8F=E7=BA=A2=E7=82=B9?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/main/index.js | 30 +++++++++++++++++++++++++++++- pages/main/index.wxml | 14 ++++++++------ pages/main/index.wxss | 14 +++++++++++++- 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/pages/main/index.js b/pages/main/index.js index 8a76e0d..461209d 100644 --- a/pages/main/index.js +++ b/pages/main/index.js @@ -29,6 +29,8 @@ Page({ staticGamedata: {}, showIf: false, showPages: false, + display: 'none', + display1:'none', page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 }, // 我的卡包 @@ -198,11 +200,37 @@ Page({ havePlayEd: app.globalData.havePlayEd ? app.globalData.havePlayEd : false }) let num = wx.getStorageSync('couponNum'); + let num1 = wx.getStorageSync('couponNum2'); if (num == 'couponNum') { wx.showTabBarRedDot({ index: 2 }) - }; + this.setData({ + display: "block" + }) + }else{ + wx.hideTabBarRedDot({ + index: 2 + }) + this.setData({ + display: "none" + }) + } + if (num1 == 'couponNum2') { + wx.showTabBarRedDot({ + index: 2 + }) + this.setData({ + display1: "block" + }) + } else { + wx.hideTabBarRedDot({ + index: 2 + }) + this.setData({ + display1: "none" + }) + } }, // 会员码获取 getmemberId: function(token) { diff --git a/pages/main/index.wxml b/pages/main/index.wxml index 4145a0b..1b80b0e 100644 --- a/pages/main/index.wxml +++ b/pages/main/index.wxml @@ -22,18 +22,20 @@ 品牌门店 - + + + 会员权益 + + + 我的卡包 - + + 我的券包 - - - 会员权益 - diff --git a/pages/main/index.wxss b/pages/main/index.wxss index 9444b6c..e1fea21 100644 --- a/pages/main/index.wxss +++ b/pages/main/index.wxss @@ -12,7 +12,18 @@ line-height: 88rpx; overflow: hidden; } - +.red{ + position:absolute; + width:13rpx; + height:13rpx; + border-radius:50%; + background:red; + right:-50rpx; + top:19rpx; + left:0; + margin:auto; + display: none; +} page { width: 100%; height: auto !important; @@ -43,6 +54,7 @@ page { .section >view{ width: 25%; display: inline-block; + position: relative; } .section >view image { display: block;