分享功能完善
parent
760c032abb
commit
3714f3853f
|
@ -176,6 +176,7 @@
|
||||||
timeList:[],
|
timeList:[],
|
||||||
isHot:false,
|
isHot:false,
|
||||||
isAutoPlay:false,
|
isAutoPlay:false,
|
||||||
|
shareData:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -229,6 +230,22 @@
|
||||||
this.$toolAll.tools.plantPoint(7);
|
this.$toolAll.tools.plantPoint(7);
|
||||||
this.checkSwi()
|
this.checkSwi()
|
||||||
},
|
},
|
||||||
|
onShareAppMessage(res) {
|
||||||
|
// 调用tools.js中的种植埋点事件
|
||||||
|
this.$toolAll.tools.plantPoint(6);
|
||||||
|
if(`${this.shareData.archives_share_img}` !== ''){
|
||||||
|
return {
|
||||||
|
title: '', // 默认是小程序的名称(可以写slogan等)
|
||||||
|
path: `/pages/tabbar/cate/cate?invite_code=${uni.getStorageSync('invite_code')}` ,// 默认是当前页面,必须是以‘/’开头的完整路径
|
||||||
|
imageUrl: `${this.$http}${this.shareData.archives_share_img}`//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return {
|
||||||
|
title: '', // 默认是小程序的名称(可以写slogan等)
|
||||||
|
path: `/pages/tabbar/cate/cate?invite_code=${uni.getStorageSync('invite_code')}` ,// 默认是当前页面,必须是以‘/’开头的完整路径
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.isAutoPlay = true;
|
this.isAutoPlay = true;
|
||||||
if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
|
if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
|
||||||
|
@ -237,6 +254,9 @@
|
||||||
if(this.category_id!='') this.checkCate(this.category_id)//调用左侧列表点击事件
|
if(this.category_id!='') this.checkCate(this.category_id)//调用左侧列表点击事件
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.$requst.post('index/base-config').then(res=>{
|
||||||
|
this.shareData = res.data;
|
||||||
|
},error => {})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkSwi(){
|
checkSwi(){
|
||||||
|
|
|
@ -126,7 +126,8 @@
|
||||||
isNewRenderDone:false ,//锁的作用
|
isNewRenderDone:false ,//锁的作用
|
||||||
isQuan:uni.getStorageSync('isQuan'),
|
isQuan:uni.getStorageSync('isQuan'),
|
||||||
quanImg:uni.getStorageSync('quanImg'),
|
quanImg:uni.getStorageSync('quanImg'),
|
||||||
pagePath:''
|
pagePath:'',
|
||||||
|
shareData:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -167,10 +168,17 @@
|
||||||
onShareAppMessage(res) {
|
onShareAppMessage(res) {
|
||||||
// 调用tools.js中的种植埋点事件
|
// 调用tools.js中的种植埋点事件
|
||||||
this.$toolAll.tools.plantPoint(6);
|
this.$toolAll.tools.plantPoint(6);
|
||||||
console.log(`/pages/tabbar/pagehome/pagehome?invite_code=${uni.getStorageSync('invite_code')}`,156);
|
if(`${this.shareData.archives_share_img}` !== ''){
|
||||||
return {
|
return {
|
||||||
title: '', // 默认是小程序的名称(可以写slogan等)
|
title: '', // 默认是小程序的名称(可以写slogan等)
|
||||||
path: `/pages/tabbar/pagehome/pagehome?invite_code=${uni.getStorageSync('invite_code')}` // 默认是当前页面,必须是以‘/’开头的完整路径
|
path: `/pages/tabbar/pagehome/pagehome?invite_code=${uni.getStorageSync('invite_code')}` ,// 默认是当前页面,必须是以‘/’开头的完整路径
|
||||||
|
imageUrl: `${this.$http}${this.shareData.archives_share_img}`//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return {
|
||||||
|
title: '', // 默认是小程序的名称(可以写slogan等)
|
||||||
|
path: `/pages/tabbar/pagehome/pagehome?invite_code=${uni.getStorageSync('invite_code')}` ,// 默认是当前页面,必须是以‘/’开头的完整路径
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
@ -182,6 +190,10 @@
|
||||||
this.isAutoPlay = true;
|
this.isAutoPlay = true;
|
||||||
// 进入首页修改全局判断是否是分享进来的
|
// 进入首页修改全局判断是否是分享进来的
|
||||||
getApp().globalData.outside = false;
|
getApp().globalData.outside = false;
|
||||||
|
|
||||||
|
this.$requst.post('index/base-config').then(res=>{
|
||||||
|
this.shareData = res.data;
|
||||||
|
},error => {})
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// 转发进入:获取页面路径
|
// 转发进入:获取页面路径
|
||||||
|
|
|
@ -202,7 +202,8 @@
|
||||||
isAutoPlay:false,
|
isAutoPlay:false,
|
||||||
optionObj:{},
|
optionObj:{},
|
||||||
positionMode:'sticky',
|
positionMode:'sticky',
|
||||||
gaodu:0
|
gaodu:0,
|
||||||
|
shareData:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -237,11 +238,30 @@
|
||||||
this.gaodu = 0;
|
this.gaodu = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShareAppMessage(res) {
|
||||||
|
// 调用tools.js中的种植埋点事件
|
||||||
|
this.$toolAll.tools.plantPoint(6);
|
||||||
|
if(`${this.shareData.spu_share_img}` !== ''){
|
||||||
|
return {
|
||||||
|
title: '', // 默认是小程序的名称(可以写slogan等)
|
||||||
|
path: `/pages/tabbar/shop/shop?invite_code=${uni.getStorageSync('invite_code')}` ,// 默认是当前页面,必须是以‘/’开头的完整路径
|
||||||
|
imageUrl: `${this.$http}${this.shareData.spu_share_img}`//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return {
|
||||||
|
title: '', // 默认是小程序的名称(可以写slogan等)
|
||||||
|
path: `/pages/tabbar/shop/shop?invite_code=${uni.getStorageSync('invite_code')}` ,// 默认是当前页面,必须是以‘/’开头的完整路径
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if(uni.getStorageSync('phone')!=0 && uni.getStorageSync('is_active')!=0) {
|
if(uni.getStorageSync('phone')!=0 && uni.getStorageSync('is_active')!=0) {
|
||||||
this.cartNumEv();//查询购物车数量
|
this.cartNumEv();//查询购物车数量
|
||||||
}
|
}
|
||||||
this.isAutoPlay = true;
|
this.isAutoPlay = true;
|
||||||
|
this.$requst.post('index/base-config').then(res=>{
|
||||||
|
this.shareData = res.data;
|
||||||
|
},error => {})
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.optionObj = options;
|
this.optionObj = options;
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue