分享功能完善

master
chen 2022-06-14 13:32:53 +08:00
parent 760c032abb
commit 3714f3853f
23 changed files with 78 additions and 26 deletions

View File

@ -176,6 +176,7 @@
timeList:[],
isHot:false,
isAutoPlay:false,
shareData:[]
}
},
computed: {
@ -229,6 +230,22 @@
this.$toolAll.tools.plantPoint(7);
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}`//PNGJPG imageUrl 使 5:4
}
}else{
return {
title: '', // (slogan)
path: `/pages/tabbar/cate/cate?invite_code=${uni.getStorageSync('invite_code')}` ,// /
}
}
},
onShow() {
this.isAutoPlay = true;
if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
@ -237,6 +254,9 @@
if(this.category_id!='') this.checkCate(this.category_id)//
}
}
this.$requst.post('index/base-config').then(res=>{
this.shareData = res.data;
},error => {})
},
methods: {
checkSwi(){

View File

@ -126,7 +126,8 @@
isNewRenderDone:false ,//
isQuan:uni.getStorageSync('isQuan'),
quanImg:uni.getStorageSync('quanImg'),
pagePath:''
pagePath:'',
shareData:[]
}
},
computed: {
@ -167,10 +168,17 @@
onShareAppMessage(res) {
// tools.js
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 {
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}`//PNGJPG imageUrl 使 5:4
}
}else{
return {
title: '', // (slogan)
path: `/pages/tabbar/pagehome/pagehome?invite_code=${uni.getStorageSync('invite_code')}` ,// /
}
}
},
onShow() {
@ -182,6 +190,10 @@
this.isAutoPlay = true;
//
getApp().globalData.outside = false;
this.$requst.post('index/base-config').then(res=>{
this.shareData = res.data;
},error => {})
},
onLoad(options) {
//

View File

@ -202,7 +202,8 @@
isAutoPlay:false,
optionObj:{},
positionMode:'sticky',
gaodu:0
gaodu:0,
shareData:[]
}
},
computed: {
@ -237,11 +238,30 @@
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}`//PNGJPG imageUrl 使 5:4
}
}else{
return {
title: '', // (slogan)
path: `/pages/tabbar/shop/shop?invite_code=${uni.getStorageSync('invite_code')}` ,// /
}
}
},
onShow() {
if(uni.getStorageSync('phone')!=0 && uni.getStorageSync('is_active')!=0) {
this.cartNumEv();//
}
this.isAutoPlay = true;
this.$requst.post('index/base-config').then(res=>{
this.shareData = res.data;
},error => {})
},
onLoad(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