Commit 9152106f by 高淑倩

vip-plus

parent b41c62be
...@@ -8,6 +8,7 @@ var cityJson = require('utils/city.js') ...@@ -8,6 +8,7 @@ var cityJson = require('utils/city.js')
var wxService = require('utils/wxService') var wxService = require('utils/wxService')
let config = require('./configScreen/configScreen'); let config = require('./configScreen/configScreen');
const envInfo = require('config/index').envInfo const envInfo = require('config/index').envInfo
let isPlusVip = false
App({ App({
onLaunch: function (e) { onLaunch: function (e) {
...@@ -38,8 +39,14 @@ App({ ...@@ -38,8 +39,14 @@ App({
}, },
onShow: function (options = {}) { onShow: function (options = {}) {
console.log('app-onshow', options) console.log('app-onshow', options)
const baseUserInfo = wx.getStorageSync('_baseUserInfo') const baseUserInfo = wx.getStorageSync('_baseUserInfo')
const { registerTime ='' } = baseUserInfo.member
// ios 兼容 是不是plus vip
let currentEndTime = (new Date(registerTime.replace(/-/g, '/'))).getTime(); // 过期时间
let currentTime = (new Date()).getTime(); // 现在时间
this.globalData.isPlusVip = currentTime >= currentEndTime ? true : false
if (options.referrerInfo && options.referrerInfo.extraData!=null){ if (options.referrerInfo && options.referrerInfo.extraData!=null){
const { activate_ticket, card_id, code, errCode, wx_activate_after_submit_url } = options.referrerInfo.extraData const { activate_ticket, card_id, code, errCode, wx_activate_after_submit_url } = options.referrerInfo.extraData
let urlData = wx_activate_after_submit_url.split("?"); let urlData = wx_activate_after_submit_url.split("?");
...@@ -114,7 +121,7 @@ App({ ...@@ -114,7 +121,7 @@ App({
isFullSucreen: false, // 当前设备是否为 FullSucreen isFullSucreen: false, // 当前设备是否为 FullSucreen
commonFunc: commonFunc, commonFunc: commonFunc,
contants: contants, contants: contants,
isPlusVip: isPlusVip,
cityJson: cityJson, cityJson: cityJson,
// brandId: 2711, // brandId: 2711,
// brandId: 2005, // brandId: 2005,
......
...@@ -54,7 +54,8 @@ Component({ ...@@ -54,7 +54,8 @@ Component({
_token: '', _token: '',
currentMobile: '', currentMobile: '',
baseImgUrl: '', baseImgUrl: '',
storgeUserInfo: wx.getStorageSync('_baseUserInfo') storgeUserInfo: wx.getStorageSync('_baseUserInfo'),
isPlusVip: false
}, },
observers: { observers: {
'**': function(e) { '**': function(e) {
...@@ -64,13 +65,9 @@ Component({ ...@@ -64,13 +65,9 @@ Component({
attached() { attached() {
this.setData({ this.setData({
personCenter: this.data.personData, personCenter: this.data.personData,
baseImgUrl: app.globalData.imageUrl baseImgUrl: app.globalData.imageUrl,
isPlusVip: app.globalData.isPlusVip
}) })
// let base64 = wx.getFileSystemManager().readFileSync(this.data.baseUrl, "base64");
// this.setData({
// baseUrl: "data:image/png;base64," + base64
// })
}, },
methods: { methods: {
_getUserInfo(res = {}) { _getUserInfo(res = {}) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment