From 1729af8e9c917dd17bf4e58ba11b81d7a6c740f0 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Sat, 17 Apr 2021 14:37:52 +0800 Subject: [PATCH] 分享的修改 --- pages/goods/categoryList/categoryList.js | 22 ++++++++++++++++++++-- pages/index/index/index.js | 12 ++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js index b593a25..8c42c13 100644 --- a/pages/goods/categoryList/categoryList.js +++ b/pages/goods/categoryList/categoryList.js @@ -91,8 +91,15 @@ Page({ onLoad: function(tt) { var that = this; + var first_leader=tt.first_leader; + if(first_leader){ + //-- user_id代过来免登录 -- + getApp().globalData.first_leader=first_leader; + } + + that.get_brand(); - + clearInterval(that.data.timer); that.setData({ countDownNum: 3, stylePage: 1 }); @@ -570,8 +577,19 @@ Page({ }, //---------分享配置-------- onShareAppMessage: function (e) { + + url="pages/goods/categoryList/categoryList"; + var userInfo=getApp().globalData.userInfo; + //是分销商才带 + if(userInfo){ + url+="?first_leader="+userInfo.user_id; + } + console.log("--分类分享---分享--"); + console.log(url); + return { - title: "商品分类", + title: "商品分类", + path:url, } }, //图片失败,默认图片 diff --git a/pages/index/index/index.js b/pages/index/index/index.js index 71cfa5b..dbf40df 100644 --- a/pages/index/index/index.js +++ b/pages/index/index/index.js @@ -592,11 +592,19 @@ Page({ url+="?first_leader="+userInfo.user_id; } console.log("---首页---分享--"); - console.log(url); + var title="商城首页" + //分享 + if(getApp().globalData.config.store_name){ + title=getApp().globalData.config.store_name; + }else if(getApp().globalData.setting.appName){ + title=getApp().globalData.setting.appName; + } + var ob={ title: getApp().globalData.config.store_name, path:url, - }; + }; + console.log(ob); return ob; }, -- libgit2 0.21.4