Commit 1729af8e9c917dd17bf4e58ba11b81d7a6c740f0
1 parent
fae48d13
分享的修改
Showing
2 changed files
with
30 additions
and
4 deletions
pages/goods/categoryList/categoryList.js
... | ... | @@ -91,8 +91,15 @@ Page({ |
91 | 91 | |
92 | 92 | onLoad: function(tt) { |
93 | 93 | var that = this; |
94 | + var first_leader=tt.first_leader; | |
95 | + if(first_leader){ | |
96 | + //-- user_id代过来免登录 -- | |
97 | + getApp().globalData.first_leader=first_leader; | |
98 | + } | |
99 | + | |
100 | + | |
94 | 101 | that.get_brand(); |
95 | - | |
102 | + | |
96 | 103 | clearInterval(that.data.timer); |
97 | 104 | that.setData({ countDownNum: 3, stylePage: 1 }); |
98 | 105 | |
... | ... | @@ -570,8 +577,19 @@ Page({ |
570 | 577 | }, |
571 | 578 | //---------分享配置-------- |
572 | 579 | onShareAppMessage: function (e) { |
580 | + | |
581 | + url="pages/goods/categoryList/categoryList"; | |
582 | + var userInfo=getApp().globalData.userInfo; | |
583 | + //是分销商才带 | |
584 | + if(userInfo){ | |
585 | + url+="?first_leader="+userInfo.user_id; | |
586 | + } | |
587 | + console.log("--分类分享---分享--"); | |
588 | + console.log(url); | |
589 | + | |
573 | 590 | return { |
574 | - title: "商品分类", | |
591 | + title: "商品分类", | |
592 | + path:url, | |
575 | 593 | } |
576 | 594 | }, |
577 | 595 | //图片失败,默认图片 | ... | ... |
pages/index/index/index.js
... | ... | @@ -592,11 +592,19 @@ Page({ |
592 | 592 | url+="?first_leader="+userInfo.user_id; |
593 | 593 | } |
594 | 594 | console.log("---首页---分享--"); |
595 | - console.log(url); | |
595 | + var title="商城首页" | |
596 | + //分享 | |
597 | + if(getApp().globalData.config.store_name){ | |
598 | + title=getApp().globalData.config.store_name; | |
599 | + }else if(getApp().globalData.setting.appName){ | |
600 | + title=getApp().globalData.setting.appName; | |
601 | + } | |
602 | + | |
596 | 603 | var ob={ |
597 | 604 | title: getApp().globalData.config.store_name, |
598 | 605 | path:url, |
599 | - }; | |
606 | + }; | |
607 | + console.log(ob); | |
600 | 608 | return ob; |
601 | 609 | }, |
602 | 610 | ... | ... |