Commit 9152106f by 高淑倩

vip-plus

parent b41c62be
......@@ -8,6 +8,7 @@ var cityJson = require('utils/city.js')
var wxService = require('utils/wxService')
let config = require('./configScreen/configScreen');
const envInfo = require('config/index').envInfo
let isPlusVip = false
App({
onLaunch: function (e) {
......@@ -38,8 +39,14 @@ App({
},
onShow: function (options = {}) {
console.log('app-onshow', options)
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){
const { activate_ticket, card_id, code, errCode, wx_activate_after_submit_url } = options.referrerInfo.extraData
let urlData = wx_activate_after_submit_url.split("?");
......@@ -114,7 +121,7 @@ App({
isFullSucreen: false, // 当前设备是否为 FullSucreen
commonFunc: commonFunc,
contants: contants,
isPlusVip: isPlusVip,
cityJson: cityJson,
// brandId: 2711,
// brandId: 2005,
......
......@@ -54,7 +54,8 @@ Component({
_token: '',
currentMobile: '',
baseImgUrl: '',
storgeUserInfo: wx.getStorageSync('_baseUserInfo')
storgeUserInfo: wx.getStorageSync('_baseUserInfo'),
isPlusVip: false
},
observers: {
'**': function(e) {
......@@ -64,13 +65,9 @@ Component({
attached() {
this.setData({
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: {
_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