Commit 0637eb278665b510c94938e99e84ed56b397d27e
1 parent
1eb56660
app is_overdue的报错
Showing
2 changed files
with
4 additions
and
4 deletions
app.js
@@ -129,9 +129,9 @@ App({ | @@ -129,9 +129,9 @@ App({ | ||
129 | th.promiseGet(turl,{}).then(res=>{ | 129 | th.promiseGet(turl,{}).then(res=>{ |
130 | var o=res; | 130 | var o=res; |
131 | if(o.data.code==0){ | 131 | if(o.data.code==0){ |
132 | - th.globalData.config2 = o.data.data; | 132 | + th.globalData.config2 = o.data.data; |
133 | //有配置成要验证过期,因为过期的小程序没有办法审核 | 133 | //有配置成要验证过期,因为过期的小程序没有办法审核 |
134 | - if(th.globalData.config2.is_overdue){ | 134 | + if(th.globalData.config2 && th.globalData.config2.is_overdue){ |
135 | 135 | ||
136 | //要开始验证,小程序有没有购买和过期 | 136 | //要开始验证,小程序有没有购买和过期 |
137 | if(!currentPage || currentPage.route.indexOf('error/error')==-1 || currentPage.route.indexOf('index/index')==-1){ | 137 | if(!currentPage || currentPage.route.indexOf('error/error')==-1 || currentPage.route.indexOf('index/index')==-1){ |
pages/index/index/index.js
@@ -109,8 +109,8 @@ Page({ | @@ -109,8 +109,8 @@ Page({ | ||
109 | 109 | ||
110 | var th = this; | 110 | var th = this; |
111 | 111 | ||
112 | - getApp().getConfig2(function(){ | ||
113 | - if(getApp().globalData.config2.is_overdue==1){ | 112 | + getApp().getConfig2(function(config2){ |
113 | + if(config2 && config2.is_overdue==1){ | ||
114 | getApp().promiseGet("/store/storemoduleendtime/page?store_id=" +os.stoid + "&type=5",{}).then(res=>{ | 114 | getApp().promiseGet("/store/storemoduleendtime/page?store_id=" +os.stoid + "&type=5",{}).then(res=>{ |
115 | var o=res; | 115 | var o=res; |
116 | if (o.data.code == 0) { | 116 | if (o.data.code == 0) { |