From 73e5c2b9aef8c2edc0cd03e42ed9024ccce6c837 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Tue, 27 Apr 2021 18:13:47 +0800 Subject: [PATCH] 修改代码 --- pages/index/index/index.js | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/pages/index/index/index.js b/pages/index/index/index.js index da34677..10510df 100644 --- a/pages/index/index/index.js +++ b/pages/index/index/index.js @@ -92,6 +92,28 @@ Page({ if(!first_leader && tt.scene){ first_leader= decodeURIComponent(tt.scene); } + + getApp().getConfig(function(e){ + //--首页的问题-- + if (getApp().globalData.config && getApp().globalData.config.store_name != undefined && getApp().globalData.config.store_name != null) { + wx.setNavigationBarTitle({ + title: getApp().globalData.config.store_name, + }); + } else { + wx.setNavigationBarTitle({ + title: getApp().globalData.setting.appName, + }); + }; + }); + + + var th = this; + if(getApp().globalData.config2.is_overdue==1){ + await getApp().get_isbuy(); + this.setappdata(getApp().globalData.wxapp_buy_obj); + } + + if(first_leader){ //-- user_id代过来免登录 -- @@ -292,20 +314,11 @@ Page({ clearInterval(i); } - }, //同步初始加载 async init_load() { - await getApp().getConfig_ays(); - var th = this; - if(getApp().globalData.config2.is_overdue==1){ - await getApp().get_isbuy(); - this.setappdata(getApp().globalData.wxapp_buy_obj); - } - - //因为营销版本的功能包含了自定义模板的功能,是同时的 //读取全局是否有弄自定义模板 await api.get_template_fir(o.stoid).then(res => { @@ -332,16 +345,7 @@ Page({ - //--首页的问题-- - if (getApp().globalData.config && getApp().globalData.config.store_name != undefined && getApp().globalData.config.store_name != null) { - wx.setNavigationBarTitle({ - title: getApp().globalData.config.store_name, - }); - } else { - wx.setNavigationBarTitle({ - title: getApp().globalData.setting.appName, - }); - }; + -- libgit2 0.21.4