Commit 1912caa40d7026575d84f4e87a84134911f69a3a
1 parent
f8d339cc
拼团普通购买,等级卡过期的优化
Showing
1 changed file
with
9 additions
and
1 deletions
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -1959,6 +1959,7 @@ Page({ |
1959 | 1959 | var end = new Date(str); |
1960 | 1960 | end = Date.parse(end) / 1000; |
1961 | 1961 | |
1962 | + | |
1962 | 1963 | //--如果后台有开启等级价的功能,而且会员的等级没有过期的情况下-- |
1963 | 1964 | if (parseInt(s_list.rank_switch) == 2 && end > now) { |
1964 | 1965 | var card_price = o[getApp().globalData.userInfo['card_field']]; |
... | ... | @@ -5186,8 +5187,15 @@ Page({ |
5186 | 5187 | var conf = th.data.bconfig; |
5187 | 5188 | if (conf.switch_list) { |
5188 | 5189 | var s_list = JSON.parse(conf.switch_list); |
5190 | + | |
5191 | + var str = getApp().globalData.userInfo['card_expiredate'].replace(/-/g, '/'); | |
5192 | + var end = new Date(str); | |
5193 | + end = Date.parse(end) / 1000; | |
5194 | + | |
5195 | + var now = ut.gettimestamp(); | |
5196 | + | |
5189 | 5197 | //如果后台有开启等级价的功能 |
5190 | - if (parseInt(s_list.rank_switch) == 2) { | |
5198 | + if (parseInt(s_list.rank_switch) == 2 && end > now) { | |
5191 | 5199 | var card_price = o[getApp().globalData.userInfo['card_field']]; |
5192 | 5200 | //如果会员有等级价 |
5193 | 5201 | if (getApp().globalData.userInfo['card_field'] != undefined && getApp().globalData.userInfo['card_field'] != null && | ... | ... |