浏览代码

[tabbar][修改]:[tabbar小红点显示与隐藏]

tags/江西版6.1.0
meo 6 年前
父节点
当前提交
9911656a9c
共有 4 个文件被更改,包括 28 次插入54 次删除
  1. +1
    -1
      pages/cardorder/index/index.js
  2. +15
    -16
      pages/coupon/detail/index.js
  3. +5
    -4
      pages/main/index.js
  4. +7
    -33
      pages/user/index.js

+ 1
- 1
pages/cardorder/index/index.js 查看文件

@@ -51,7 +51,7 @@ Page({
data: "couponNum3",
})
wx.hideTabBarRedDot({
index: 2
index: 3
})
},
userule: function() {


+ 15
- 16
pages/coupon/detail/index.js 查看文件

@@ -74,11 +74,11 @@ Page({
min02: "00",
sec02: "00",
countdown: "",
showbutton1:false
showbutton1: false
},
/**
* 跳转到门店列表的详情页面
*/
* 跳转到门店列表的详情页面
*/
gotoDetail(e) {
wx.navigateTo({
url: `/pages/index/detail/index?id=${e.currentTarget.dataset.id}`
@@ -332,7 +332,7 @@ Page({
})
//如果倒计时结束,需要重新查询一下券的状态
// 给getDetail一个标识
that.getDetail(that.data.couponChannelId,'endclock');
that.getDetail(that.data.couponChannelId, 'endclock');
}
total_micro_second -= 1000;
},
@@ -373,9 +373,9 @@ Page({
title: "加载中..."
});
that.setData({
onshow:false
onshow: false
})
that.getDetail(options.couponChannelId,'notendclock');
that.getDetail(options.couponChannelId, 'notendclock');
/**
* 转赠判断
*/
@@ -396,7 +396,7 @@ Page({
})
}
},
getDetail: function (couponChannelId, flag) {
getDetail: function(couponChannelId, flag) {
let that = this;
var parmer = {
url: config.api.couponDetail,
@@ -433,9 +433,9 @@ Page({
// flag == endclock 说明倒计时已经结束
if (res.data.activityStatus == 0 && flag != 'endclock') {
that.countdown(res.data.beginTime);
} else if (res.data.activityStatus != 0 && flag != 'endclock'){
} else if (res.data.activityStatus != 0 && flag != 'endclock') {
that.countdown(res.data.endTime);
}else{
} else {
clearInterval(that.data.setInterval)
}
if (res.data.activityStatus == 0) {
@@ -762,7 +762,7 @@ Page({
key: 'couponNum2',
data: "couponNum2"
})
} else if (that.data.data.type != 5) {
} else if (that.data.data.type != 5 && that.data.cardType != 100) {
wx.setStorage({
key: 'couponNum',
data: "couponNum"
@@ -793,7 +793,6 @@ Page({
});
})
} else {
console.log(that.data.type)
// 免费券
that.payOrderUpdate(orderId, "0", 1, '', 'free');
if (that.data.cardType == 100) {
@@ -801,7 +800,7 @@ Page({
key: 'couponNum2',
data: "couponNum2"
})
} else if (that.data.data.type != "5") {
} else if (that.data.data.type != "5" && that.data.cardType != 100) {
wx.setStorage({
key: 'couponNum',
data: "couponNum"
@@ -821,17 +820,17 @@ Page({
onShow() {
this.setData({
showbutton: false,
showbutton1:false
showbutton1: false
})
if(this.data.end_time){
if (this.data.end_time) {
this.countdown(this.data.end_time)
}
},
onUnload:function(){
onUnload: function() {
let that = this;
clearInterval(that.data.setInterval)
},
onHide: function () {
onHide: function() {
let that = this;
clearInterval(that.data.setInterval)
},


+ 5
- 4
pages/main/index.js 查看文件

@@ -225,29 +225,30 @@ Page({
let num1 = wx.getStorageSync('couponNum2');
if (num == 'couponNum') {
wx.showTabBarRedDot({
index: 2
index: 3
})
that.setData({
display: "block"
})
}else{
wx.hideTabBarRedDot({
index: 2
index: 3
})
that.setData({
display: "none"
})
}
if (num1 == 'couponNum2') {
wx.showTabBarRedDot({
index: 2
index: 3
})
that.setData({
display1: "block"
})
} else {
wx.hideTabBarRedDot({
index: 2
index: 3
})
that.setData({
display1: "none"


+ 7
- 33
pages/user/index.js 查看文件

@@ -36,7 +36,7 @@ Page({
imagePath: '',
appVersion:"",
showmemberqrcode: false,
placeholder: ''//默认二维码生成文本
placeholder: ''
},
/**
* 跳转到成长值的页面
@@ -46,36 +46,6 @@ Page({
url: '/pages/czdetail/czdetail',
})
},
// getrun:function(){
// let that = this;
// wx.getWeRunData({
// success: function (res) {
// Http.post({
// url: config.api.getWeRunData,
// data: {
// encryptedData: res.encryptedData,
// iv: res.iv
// }
// }).then(res => {
// that.setData({
// step: res.data.stepInfoList[30].step
// })
// })
// }
// })
// },
/**
*
*/
// getxinghao:function(){
// wx.getSystemInfo({
// success:function(res){
// wx.showModal({
// content: res.brand,
// })
// }
// })
// },
navigateTo() {
wx.navigateTo({
url: `/pages/main/index`
@@ -105,10 +75,14 @@ Page({
that.setData({
appVersion: extConfig.appVersion
})
let num = wx.getStorageSync('couponNum');
/**
* couponNum
* couponNum2
*/
let num = wx.getStorageSync('couponNum');
let num1 = wx.getStorageSync('couponNum2');
wx.hideTabBarRedDot({
index: 2
index: 3
});
wx.hideTabBarRedDot({
index: 3


正在加载...
取消
保存