diff --git a/app.js b/app.js index 8bd28a0..f489216 100644 --- a/app.js +++ b/app.js @@ -129,9 +129,9 @@ App({ th.promiseGet(turl,{}).then(res=>{ var o=res; if(o.data.code==0){ - th.globalData.config2 = o.data.data; + th.globalData.config2 = o.data.data; //有配置成要验证过期,因为过期的小程序没有办法审核 - if(th.globalData.config2.is_overdue){ + if(th.globalData.config2 && th.globalData.config2.is_overdue){ //要开始验证,小程序有没有购买和过期 if(!currentPage || currentPage.route.indexOf('error/error')==-1 || currentPage.route.indexOf('index/index')==-1){ diff --git a/pages/index/index/index.js b/pages/index/index/index.js index eca2909..3032a36 100644 --- a/pages/index/index/index.js +++ b/pages/index/index/index.js @@ -109,8 +109,8 @@ Page({ var th = this; - getApp().getConfig2(function(){ - if(getApp().globalData.config2.is_overdue==1){ + getApp().getConfig2(function(config2){ + if(config2 && config2.is_overdue==1){ getApp().promiseGet("/store/storemoduleendtime/page?store_id=" +os.stoid + "&type=5",{}).then(res=>{ var o=res; if (o.data.code == 0) {