Commit 73e5c2b9aef8c2edc0cd03e42ed9024ccce6c837
1 parent
df002435
修改代码
Showing
1 changed file
with
23 additions
and
19 deletions
pages/index/index/index.js
| @@ -92,6 +92,28 @@ Page({ | @@ -92,6 +92,28 @@ Page({ | ||
| 92 | if(!first_leader && tt.scene){ | 92 | if(!first_leader && tt.scene){ |
| 93 | first_leader= decodeURIComponent(tt.scene); | 93 | first_leader= decodeURIComponent(tt.scene); |
| 94 | } | 94 | } |
| 95 | + | ||
| 96 | + getApp().getConfig(function(e){ | ||
| 97 | + //--首页的问题-- | ||
| 98 | + if (getApp().globalData.config && getApp().globalData.config.store_name != undefined && getApp().globalData.config.store_name != null) { | ||
| 99 | + wx.setNavigationBarTitle({ | ||
| 100 | + title: getApp().globalData.config.store_name, | ||
| 101 | + }); | ||
| 102 | + } else { | ||
| 103 | + wx.setNavigationBarTitle({ | ||
| 104 | + title: getApp().globalData.setting.appName, | ||
| 105 | + }); | ||
| 106 | + }; | ||
| 107 | + }); | ||
| 108 | + | ||
| 109 | + | ||
| 110 | + var th = this; | ||
| 111 | + if(getApp().globalData.config2.is_overdue==1){ | ||
| 112 | + await getApp().get_isbuy(); | ||
| 113 | + this.setappdata(getApp().globalData.wxapp_buy_obj); | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + | ||
| 95 | 117 | ||
| 96 | if(first_leader){ | 118 | if(first_leader){ |
| 97 | //-- user_id代过来免登录 -- | 119 | //-- user_id代过来免登录 -- |
| @@ -292,20 +314,11 @@ Page({ | @@ -292,20 +314,11 @@ Page({ | ||
| 292 | clearInterval(i); | 314 | clearInterval(i); |
| 293 | } | 315 | } |
| 294 | 316 | ||
| 295 | - | ||
| 296 | }, | 317 | }, |
| 297 | 318 | ||
| 298 | //同步初始加载 | 319 | //同步初始加载 |
| 299 | async init_load() { | 320 | async init_load() { |
| 300 | - await getApp().getConfig_ays(); | ||
| 301 | - var th = this; | ||
| 302 | - if(getApp().globalData.config2.is_overdue==1){ | ||
| 303 | - await getApp().get_isbuy(); | ||
| 304 | - this.setappdata(getApp().globalData.wxapp_buy_obj); | ||
| 305 | - } | ||
| 306 | 321 | ||
| 307 | - | ||
| 308 | - | ||
| 309 | //因为营销版本的功能包含了自定义模板的功能,是同时的 | 322 | //因为营销版本的功能包含了自定义模板的功能,是同时的 |
| 310 | //读取全局是否有弄自定义模板 | 323 | //读取全局是否有弄自定义模板 |
| 311 | await api.get_template_fir(o.stoid).then(res => { | 324 | await api.get_template_fir(o.stoid).then(res => { |
| @@ -332,16 +345,7 @@ Page({ | @@ -332,16 +345,7 @@ Page({ | ||
| 332 | 345 | ||
| 333 | 346 | ||
| 334 | 347 | ||
| 335 | - //--首页的问题-- | ||
| 336 | - if (getApp().globalData.config && getApp().globalData.config.store_name != undefined && getApp().globalData.config.store_name != null) { | ||
| 337 | - wx.setNavigationBarTitle({ | ||
| 338 | - title: getApp().globalData.config.store_name, | ||
| 339 | - }); | ||
| 340 | - } else { | ||
| 341 | - wx.setNavigationBarTitle({ | ||
| 342 | - title: getApp().globalData.setting.appName, | ||
| 343 | - }); | ||
| 344 | - }; | 348 | + |
| 345 | 349 | ||
| 346 | 350 | ||
| 347 | 351 |