小程序优化

This commit is contained in:
Devil 2019-10-07 22:23:06 +08:00
parent 2774d9b71a
commit 768a687b13
2 changed files with 6 additions and 2 deletions

View File

@ -740,10 +740,12 @@ Page({
// 自定义分享
onShareAppMessage() {
var user = app.get_user_info(this, 'onShareAppMessage') || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title +'-'+ this.data.goods.title,
desc: app.data.application_describe,
path: '/pages/goods-detail/goods-detail?share=goods-detail&goods_id='+this.data.goods.id
path: '/pages/goods-detail/goods-detail?goods_id='+this.data.goods.id +'&referrer='+user_id
};
},

View File

@ -647,10 +647,12 @@ Page({
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info(this, 'onShareAppMessage') || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title + '-' + this.data.goods.title,
desc: app.data.application_describe,
path: '/pages/goods-detail/goods-detail?share=goods-detail&goods_id=' + this.data.goods.id
path: '/pages/goods-detail/goods-detail?goods_id=' +this.data.goods.id +'&referrer='+user_id
};
},