Commit ae6abc21 by yuzhenWang

提交测试,全局分享还要改

parent c480ed59
......@@ -190,7 +190,7 @@
import VerifyPopup from "@/components/unipopup/verifyPopup.vue";
import UniShareWx from "@/uni_modules/uni-share-wx/index.vue";
import dataHandling from "@/util/dataHandling";
import {hshare} from '@/util/fiveshare';
import {hshare,setWechatShare,initJssdkShare} from '@/util/fiveshare';
import {nanoid} from 'nanoid';
import common from '../../common/common';
import {baseURL,apiURL,cffpURL,companyInfo,shareURL} from "@/environments/environment";
......@@ -1077,6 +1077,19 @@
clearInterval(this.timer)
}
}
// #ifdef H5
const currentUrl = `${shareURL}/pages/index/index`;
const shareData = {
title: '银盾家办家庭财务策划师联盟邀您加入',
desc: `${this.userInfo.name || ''}邀您加入【家庭财策师联盟】,资源+伙伴,共赢未来!`,
link: currentUrl,
imgUrl: `${shareURL}/static/images/shareBg.png`
};
initJssdkShare(() => {
setWechatShare(shareData);
}, window.location.href.split('#')[0]);
// #endif
}
}
</script>
......
......@@ -111,7 +111,7 @@
import search from '@/components/search/search.vue';
import {baseURL,apiURL,cffpURL,companyInfo,shareURL} from "@/environments/environment";
import dataHandling from "@/util/dataHandling";
import {hshare} from '@/util/fiveshare';
import {hshare,setWechatShare,initJssdkShare} from '@/util/fiveshare';
import UniShareWx from "@/uni_modules/uni-share-wx/index.vue";
import {nanoid} from 'nanoid';
export default{
......@@ -310,7 +310,13 @@
url = window.sessionStorage.getItem('firstEntryUrl').split('#')[0];
}
}
hshare(data, url)
setTimeout(()=>{
initJssdkShare(() => {
setWechatShare(data);
}, url);
},500)
// hshare(data, url)
this.submitsuessc(shareCode,jumptime,item)
dataHandling.pocessTracking(
......@@ -339,6 +345,18 @@
}
api.userShare(UserShareRequestVO).then(res => {
if (res['success']) {
// #ifdef H5
const currentUrl = `${shareURL}/pages/index/index`;
const shareData = {
title: '银盾家办家庭财务策划师联盟邀您加入',
desc: `${this.userInfo.name || ''}邀您加入【家庭财策师联盟】,资源+伙伴,共赢未来!`,
link: currentUrl,
imgUrl: `${shareURL}/static/images/shareBg.png`
};
initJssdkShare(() => {
setWechatShare(shareData);
}, window.location.href.split('#')[0]);
// #endif
// uni.showToast({
// title: '分享成功',
// duration: 2000
......
......@@ -353,9 +353,10 @@
};
initJssdkShare(() => {
setWechatShare(shareData);
setWechatShare();
}, window.location.href.split('#')[0]);
// #endif
},
jumpPage(type){
console.log('type',type);
......@@ -448,6 +449,7 @@
if(loginType == 'codelogin'){
this.querySystemMessage()
this.queryInfo()
this.courseList()
}else {
this.featureLists =[
{
......@@ -607,7 +609,19 @@
return
}
// 未登录状态,不允许未登录状态跳转的,直接去登录页
if(!this.loginType||this.loginType=='visitor'){
if (featureItem.key == '07') {
uni.switchTab({
url: featureItem.link
})
}else {
uni.navigateTo({
url:'/myPackageA/login/login'
})
}
return
}
if(featureItem.isApply&& this.userInfo.partnerType){
dataHandling.pocessTracking(
'点击',
......
......@@ -346,6 +346,21 @@
'邀请加盟',
'pages/inviteJoin/inviteJoin'
)
setTimeout(()=>{
// #ifdef H5
const currentUrl = `${shareURL}/pages/index/index`;
const shareData = {
title: '银盾家办家庭财务策划师联盟邀您加入',
desc: `${this.userInfo.name || ''}邀您加入【家庭财策师联盟】,资源+伙伴,共赢未来!`,
link: currentUrl,
imgUrl: `${shareURL}/static/images/shareBg.png`
};
initJssdkShare(() => {
setWechatShare(shareData);
}, window.location.href.split('#')[0]);
// #endif
},500)
},
closeShare() {
this.$refs.share.close()
......
......@@ -224,7 +224,8 @@
],
partnerStatistic:{}, //申请加盟统计
userInfo:{} ,//用户信息,
shareBtnBottom:false
shareBtnBottom:false,
productItem:{}
}
},
components:{
......@@ -249,6 +250,7 @@
if(this.loginType == 'codelogin'){
this.querySystemMessage()
this.queryInfo();
this.courseList()
}else {
this.messageInfo = []
uni.removeTabBarBadge({ index: 3 });
......@@ -275,6 +277,21 @@
},
methods: {
courseList() {
api.courseList().then(res => {
if (res['success']) {
let cffpCourseInfos = res['data']['data'];
if(cffpCourseInfos.length>0){
cffpCourseInfos.forEach(item=>{
if(item.productCode&&item.productCode=='C09'){
this.productItem = item
uni.setStorageSync('productItem',this.productItem );
}
})
}
}
})
},
gotoPoster(){
if(!uni.getStorageSync('loginType') || uni.getStorageSync('loginType')=='visitor'){
uni.setStorageSync('loginType','visitor')
......@@ -460,7 +477,7 @@
return
}
//当为见习合伙人的时候,弹出框提示
if(item.key == '06'&& this.userInfo.levelCode == 'P1'){
if(item.key == '06'&& this.userInfo.levelCode == 'P1' && uni.getStorageSync('loginType') == 'codelogin'){
this.$refs.PartnerTipPopup.open()
return
}
......
......@@ -2,7 +2,6 @@
// import $H from '@/api/request.js' //封装好的接口请求
// import wx from 'weixin-js-sdk'
import { log } from "console";
import api from "../api/api";
......@@ -69,7 +68,7 @@ export function setWechatShare(data) {
console.error('微信SDK未初始化');
return;
}
console.log('data',data);
jWeixin.ready(() => {
// 新API(推荐)
jWeixin.updateAppMessageShareData({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment