diff --git a/app.js b/app.js index c4c2913..6bf4b20 100644 --- a/app.js +++ b/app.js @@ -51,7 +51,7 @@ App({ config: null, //门店参数 config2: null, //门店配置 code: null, - user_id:null,//6520119 qa 4687 6519901 zs 10153869 + user_id:null,// 6520210,//6520119 qa 4687 6519901 zs 10153869 buy_now: null, picklist: null, //门店列表 wuliuprice: null, //物流价格表 @@ -428,7 +428,7 @@ App({ "function" == typeof func && func(th.globalData.picklist); } }) - } + } }, //同步化,在调用的时候要await @@ -988,8 +988,15 @@ App({ //检验能不能分享 check_can_share() { - if (!this.globalData.user_id) wx.hideShareMenu(); - else wx.showShareMenu(); + + var userinfo=wx.getStorageSync("userinfo"); + if (!this.globalData.user_id && !userinfo) wx.hideShareMenu(); + else{ + wx.showShareMenu({ + withShareTicket: true, + menus: ["shareAppMessage", "shareTimeline"], + }); + } }, //--- 判断是不是皮肤的商品的公共函数 --- diff --git a/pages/index/index/index.js b/pages/index/index/index.js index eb378ac..bb4b06f 100644 --- a/pages/index/index/index.js +++ b/pages/index/index/index.js @@ -106,6 +106,9 @@ Page({ } } + console.log("first_leader:"+first_leader,"onload"); + + getApp().getConfig(function (e) { //--首页的问题-- if (getApp().globalData.config && getApp().globalData.config.store_name != undefined && getApp().globalData.config.store_name != null) { @@ -1185,8 +1188,11 @@ Page({ if (!store_name){ store_name = getApp().globalData.setting.appName; } + var user_id=getApp().globalData.user_id; + if(!user_id) user_id=0; return { title: '首页-' + '-' + store_name, + query: 'first_leader='+user_id } }, diff --git a/pages/template/index.js b/pages/template/index.js index c45a195..546906d 100644 --- a/pages/template/index.js +++ b/pages/template/index.js @@ -142,7 +142,7 @@ Page({ }) }.bind(this)) var {share_title,temp_id,store_config} = this.data; - var url= `pages/template/index?sence=${temp_id}`; + var url= `sence=${temp_id}`; var userInfo = getApp().globalData.userInfo; //是分销商才带 @@ -152,8 +152,8 @@ Page({ var ob = { title:share_title, - path: url, - //query:`sence=${temp_id}`, + //path: url, + query:url, imageUrl:this.data.url+store_config.store_logo, }; console.log(ob);