From 786267f0369e0763ad9603e3b2a235f2031ce4b0 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Tue, 21 Nov 2023 18:06:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E6=9E=81=E5=A4=A7?= =?UTF-8?q?=E9=83=A8=E5=88=86=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=88=86=E4=BA=AB=E7=BB=99=E5=A5=BD=E5=8F=8B=E5=92=8C?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E6=9C=8B=E5=8F=8B=E5=9C=88=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/activity/assist/index.vue | 39 ++++++---- pages/activity/assist_detail/index.vue | 12 ++++ pages/activity/collect_coupons/index.vue | 38 +++++++++- pages/activity/combination/index.vue | 38 ++++++---- pages/activity/goods_seckill/index.vue | 38 ++++++---- pages/activity/lifeService/index.vue | 39 +++++++++- pages/activity/liveBroadcast/index.vue | 38 ++++++---- pages/activity/presell/index.vue | 39 ++++++---- pages/activity/rank/index.vue | 34 ++++++++- pages/activity/topic/index.vue | 37 +++++++++- pages/activity/topic_detail/index.vue | 38 +++++++++- pages/annex/vip_center/index.vue | 37 +++++++++- pages/annex/vip_grade/index.vue | 38 +++++++++- pages/annex/vip_paid/index.vue | 38 +++++++++- pages/columnGoods/goods_coupon_list/index.vue | 36 ++++++++-- pages/columnGoods/goods_list/index.vue | 38 ++++++++-- pages/columnGoods/goods_search/index.vue | 33 ++++++++- pages/columnGoods/goods_search_con/index.vue | 44 ++++++++++-- pages/goods_cate/goods_cate.vue | 40 ++++++++--- pages/news_details/index.vue | 37 +++++++++- pages/news_list/index.vue | 38 +++++++++- pages/order_addcart/order_addcart.vue | 35 ++++++++- pages/plantGrass/plant_detail/index.vue | 38 +++++++++- pages/plantGrass/plant_featured/index.vue | 40 ++++++++++- pages/plantGrass/plant_show/index.vue | 37 +++++++++- pages/plantGrass/plant_topic/index.vue | 39 +++++++++- pages/plantGrass/plant_user/index.vue | 71 ++++++++++++++----- pages/points_mall/goods_selection.vue | 38 ++++++---- pages/points_mall/index.vue | 35 ++++++++- pages/points_mall/integral_goods_list.vue | 35 ++++++++- pages/store/detail/index.vue | 37 +++++++++- pages/store/list/index.vue | 32 +++++++++ pages/store/settled/index.vue | 35 ++++++++- pages/store/shopStreet/index.vue | 37 ++++++++-- pages/user/index.vue | 38 +++++++++- pages/users/agreement_rules/index.vue | 35 ++++++++- pages/users/browsingHistory/index.vue | 37 +++++++++- pages/users/commission_rank/index.vue | 36 +++++++++- pages/users/distributor/index.vue | 37 +++++++++- pages/users/feedback/index.vue | 41 +++++++++-- pages/users/feedback/list.vue | 37 +++++++++- pages/users/goods_details_store/index.vue | 36 +++++++++- pages/users/order_list/index.vue | 40 ++++++++++- pages/users/presell_order_list/index.vue | 40 ++++++++++- pages/users/promoter-list/index.vue | 37 +++++++++- pages/users/promoter-order/index.vue | 36 +++++++++- pages/users/promoter_rank/index.vue | 36 +++++++++- pages/users/retrievePassword/index.vue | 40 ++++++++++- pages/users/user_about/index.vue | 35 ++++++++- pages/users/user_address/index.vue | 34 ++++++++- pages/users/user_address_list/index.vue | 46 +++++++++++- pages/users/user_bill/index.vue | 34 ++++++++- pages/users/user_brokerage/index.vue | 36 +++++++++- pages/users/user_cash/index.vue | 34 ++++++++- pages/users/user_coupon/index.vue | 39 ++++++++-- pages/users/user_get_coupon/index.vue | 35 ++++++++- pages/users/user_grade/index.vue | 34 ++++++++- pages/users/user_grade_list/index.vue | 36 +++++++++- pages/users/user_info/index.vue | 36 +++++++++- pages/users/user_integral/index.vue | 34 ++++++++- pages/users/user_invoice_list/index.vue | 36 +++++++++- pages/users/user_modify_phone/index.vue | 36 +++++++++- pages/users/user_modify_pwd/index.vue | 36 +++++++++- pages/users/user_money/index.vue | 39 ++++++++-- pages/users/user_nickname/index.vue | 35 ++++++++- pages/users/user_payment/index.vue | 37 +++++++++- pages/users/user_phone/index.vue | 36 +++++++++- pages/users/user_pwd_edit/index.vue | 36 +++++++++- pages/users/user_setting/index.vue | 40 ++++++++++- pages/users/user_sgin/index.vue | 36 +++++++++- pages/users/user_sgin_list/index.vue | 36 +++++++++- pages/users/user_spread_code/index.vue | 46 ++++++++++-- pages/users/user_spread_money/index.vue | 40 ++++++++++- pages/users/user_spread_user/index.vue | 36 +++++++++- 74 files changed, 2481 insertions(+), 281 deletions(-) diff --git a/pages/activity/assist/index.vue b/pages/activity/assist/index.vue index ef7d1de..c717d19 100644 --- a/pages/activity/assist/index.vue +++ b/pages/activity/assist/index.vue @@ -50,6 +50,7 @@ import authorize from '@/components/Authorize'; // #ifndef H5 import passwordPopup from '@/components/passwordPopup'; + import spread from "../../../libs/spread"; // #endif export default { components: { @@ -88,22 +89,31 @@ withShareTicket: true, menus: ['shareAppMessage', 'shareTimeline'] }) - return { - title: '助力活动', - path: 'pages/activity/assist/index', - } + + + let pages = getCurrentPages(); + let page = pages[pages.length - 1] + let shareData = { + title: '助力活动', + path: page.$page.fullPath || '/' + page.route, + }; + // 判断:用户是否登录 已经登录则添加分享人信息,未登录则正常分享 + if (this.isLogin) shareData.path = shareData.path + '?spread=' + this.uid; + // 返回最终的分享配置信息 + return shareData }, onShareTimeline: function() { - return { - title: '助力活动', - query: { - key: '' - }, - imageUrl: '' - } + let shareData = { + title: '助力活动', + query: {}, + }; + // 判断:用户是否登录 已经登录则添加分享人信息,未登录则正常分享 + if (this.isLogin) shareData.query.spread = this.uid; + // 返回最终的分享配置信息 + return shareData }, // #endif - computed: configMap({statusBarHeight:0},mapGetters(['isLogin','viewColor','keyColor'])), + computed: configMap({statusBarHeight:0},mapGetters(['isLogin','uid','viewColor','keyColor'])), watch:{ isLogin:{ handler:function(newV,oldV){ @@ -115,11 +125,14 @@ deep:true } }, - onLoad() { + onLoad(options) { this.getAssistProductList(); if (this.isLogin) { this.getUserInfo(); } + + // 关系处理 + if(options.spread) spread(options.spread, this.isLogin) }, methods: { goBack: function() { diff --git a/pages/activity/assist_detail/index.vue b/pages/activity/assist_detail/index.vue index d3123c3..2129f3c 100644 --- a/pages/activity/assist_detail/index.vue +++ b/pages/activity/assist_detail/index.vue @@ -743,6 +743,18 @@ that.addShareAssist(); return share; }, + onShareTimeline: function() { + let that = this; + let shareData = { + title: '您的好友' + that.userInfo.nickname + '邀请您帮他助力' + that.bargainInfo.product.store_name + ' 快去帮忙吧!', + }; + // 判断:用户是否登录 已经登录则添加分享人信息,未登录则正常分享 + if (this.isLogin) shareData.query.spread = this.uid; + // 返回最终的分享配置信息 + shareData.query.id = this.id; + + return shareData + }, //#endif } diff --git a/pages/activity/collect_coupons/index.vue b/pages/activity/collect_coupons/index.vue index cfc6e9e..de2dbfe 100644 --- a/pages/activity/collect_coupons/index.vue +++ b/pages/activity/collect_coupons/index.vue @@ -84,8 +84,9 @@ import { mapGetters } from "vuex"; import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'; import { HTTP_REQUEST_URL } from '@/config/app'; + import spread from "../../../libs/spread"; export default { - computed: mapGetters(['viewColor']), + computed: mapGetters(['isLogin','uid','viewColor']), components: { easyLoadimage }, @@ -100,8 +101,11 @@ limit: 15, } }, - onLoad: function() { + onLoad: function(options) { this.statusClick(-1) + + // 关系处理 + if(options.spread) spread(options.spread, this.isLogin) }, methods: { parsePrice(price){ @@ -160,7 +164,35 @@ }, onReachBottom: function() { this.getList(); - } + }, + + // #ifdef MP + // 分享给好友 + onShareAppMessage () { + let pages = getCurrentPages(); + let page = pages[pages.length - 1] + let shareData = { + title: '领劵中心', + path: page.$page.fullPath || '/' + page.route, + }; + // 判断:用户是否登录 已经登录则添加分享人信息,未登录则正常分享 + if (this.isLogin) shareData.path = shareData.path + '?spread=' + this.uid; + // 返回最终的分享配置信息 + return shareData + }, + // 分享到朋友圈 + onShareTimeline() { + let shareData = { + title: '领劵中心', + query: {}, + }; + // 判断:用户是否登录 已经登录则添加分享人信息,未登录则正常分享 + if (this.isLogin) shareData.query.spread = this.uid; + // 返回最终的分享配置信息 + return shareData + }, + // #endif + } diff --git a/pages/activity/combination/index.vue b/pages/activity/combination/index.vue index 6a26846..694c0ff 100644 --- a/pages/activity/combination/index.vue +++ b/pages/activity/combination/index.vue @@ -75,6 +75,7 @@ import passwordPopup from '@/components/passwordPopup'; // #endif import { mapGetters } from "vuex"; + import spread from "../../../libs/spread"; let app = getApp(); export default { components: { @@ -85,7 +86,7 @@ tabNav, userNameSwiper }, - computed: configMap({statusBarHeight:0},mapGetters(['viewColor','keyColor'])), + computed: configMap({statusBarHeight:0},mapGetters(['isLogin','uid','viewColor','keyColor'])), data() { return { domain: HTTP_REQUEST_URL, @@ -123,22 +124,30 @@ withShareTicket: true, menus: ['shareAppMessage', 'shareTimeline'] }) - return { - title: '拼团', - path: 'pages/activity/combination/index', - } + + let pages = getCurrentPages(); + let page = pages[pages.length - 1] + let shareData = { + title: '拼团活动', + path: page.$page.fullPath || '/' + page.route, + }; + // 判断:用户是否登录 已经登录则添加分享人信息,未登录则正常分享 + if (this.isLogin) shareData.path = shareData.path + '?spread=' + this.uid; + // 返回最终的分享配置信息 + return shareData }, onShareTimeline: function() { - return { - title: '拼团活动', - query: { - key: '' - }, - imageUrl: '' - } + let shareData = { + title: '拼团活动', + query: {}, + }; + // 判断:用户是否登录 已经登录则添加分享人信息,未登录则正常分享 + if (this.isLogin) shareData.query.spread = this.uid; + // 返回最终的分享配置信息 + return shareData }, // #endif - onLoad() { + onLoad(options) { var pages = getCurrentPages(); uni.setNavigationBarTitle({ title: "拼团列表" @@ -147,6 +156,9 @@ this.getCombinationProductList(''); this.getIndexConfig(); this.getCombinationUser(); + + // 关系处理 + if(options.spread) spread(options.spread, this.isLogin) }, methods: { goBack: function() { diff --git a/pages/activity/goods_seckill/index.vue b/pages/activity/goods_seckill/index.vue index 4b8e61d..a01bc0c 100644 --- a/pages/activity/goods_seckill/index.vue +++ b/pages/activity/goods_seckill/index.vue @@ -79,6 +79,7 @@ import { mapGetters } from "vuex"; import { configMap } from "@/utils"; import { HTTP_REQUEST_URL } from '@/config/app'; + import spread from "../../../libs/spread"; export default { components: { // #ifndef H5 @@ -86,7 +87,7 @@ // #endif home }, - computed: configMap({statusBarHeight:0},mapGetters(['viewColor','keyColor'])), + computed: configMap({statusBarHeight:0},mapGetters(['isLogin','uid','viewColor','keyColor'])), data() { return { domain: HTTP_REQUEST_URL, @@ -115,23 +116,34 @@ withShareTicket: true, menus: ['shareAppMessage', 'shareTimeline'] }) - return { - title: '秒杀活动', - path: 'pages/activity/goods_seckill/index', - } + + let pages = getCurrentPages(); + let page = pages[pages.length - 1] + let shareData = { + title: '秒杀活动', + path: page.$page.fullPath || '/' + page.route, + }; + // 判断:用户是否登录 已经登录则添加分享人信息,未登录则正常分享 + if (this.isLogin) shareData.path = shareData.path + '?spread=' + this.uid; + // 返回最终的分享配置信息 + return shareData }, onShareTimeline: function() { - return { - title: '秒杀活动', - query: { - key: '' - }, - imageUrl: '' - } + let shareData = { + title: '秒杀活动', + query: {}, + }; + // 判断:用户是否登录 已经登录则添加分享人信息,未登录则正常分享 + if (this.isLogin) shareData.query.spread = this.uid; + // 返回最终的分享配置信息 + return shareData }, // #endif - onLoad() { + onLoad(options) { this.getSeckillConfig(); + + // 关系处理 + if(options.spread) spread(options.spread, this.isLogin) }, methods: { goBack: function() { diff --git a/pages/activity/lifeService/index.vue b/pages/activity/lifeService/index.vue index 7a05f55..fe4d9c6 100644 --- a/pages/activity/lifeService/index.vue +++ b/pages/activity/lifeService/index.vue @@ -93,6 +93,7 @@ import { mapGetters } from "vuex"; import { goShopDetail } from '@/libs/order.js' import { HTTP_REQUEST_URL } from '@/config/app'; + import spread from "../../../libs/spread"; const app = getApp(); export default { data() { @@ -174,7 +175,7 @@ } }) }, - ...mapGetters(['viewColor']), + ...mapGetters(['isLogin','uid','viewColor']), }, onLoad: function(options) { this.mer_id = options.mer_id; @@ -192,6 +193,9 @@ } } }); + + // 关系处理 + if(options.spread) spread(options.spread, this.isLogin) }, methods: { // 打开地图 @@ -356,7 +360,38 @@ this.sotreParam.page += 1 this.getServiceList() } - } + }, + + + // #ifdef MP + // 分享给好友 + onShareAppMessage () { + let pages = getCurrentPages(); + let page = pages[pages.length - 1] + let shareData = { + title: '本地服务', + path: page.$page.fullPath || '/' + page.route, + }; + shareData.path = shareData.path + '?mer_id=' + this.mer_id; + // 判断:用户是否登录 已经登录则添加分享人信息,未登录则正常分享 + if (this.isLogin) shareData.path = shareData.path + '&spread=' + this.uid; + // 返回最终的分享配置信息 + return shareData + }, + // 分享到朋友圈 + onShareTimeline() { + let shareData = { + title: '本地服务', + query: {}, + }; + // 判断:用户是否登录 已经登录则添加分享人信息,未登录则正常分享 + if (this.isLogin) shareData.query.spread = this.uid; + // 返回最终的分享配置信息 + shareData.query.mer_id = this.mer_id; + + return shareData + }, + // #endif }