Commit ae6abc21 by yuzhenWang

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

parent c480ed59
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
import VerifyPopup from "@/components/unipopup/verifyPopup.vue"; import VerifyPopup from "@/components/unipopup/verifyPopup.vue";
import UniShareWx from "@/uni_modules/uni-share-wx/index.vue"; import UniShareWx from "@/uni_modules/uni-share-wx/index.vue";
import dataHandling from "@/util/dataHandling"; import dataHandling from "@/util/dataHandling";
import {hshare} from '@/util/fiveshare'; import {hshare,setWechatShare,initJssdkShare} from '@/util/fiveshare';
import {nanoid} from 'nanoid'; import {nanoid} from 'nanoid';
import common from '../../common/common'; import common from '../../common/common';
import {baseURL,apiURL,cffpURL,companyInfo,shareURL} from "@/environments/environment"; import {baseURL,apiURL,cffpURL,companyInfo,shareURL} from "@/environments/environment";
...@@ -1077,6 +1077,19 @@ ...@@ -1077,6 +1077,19 @@
clearInterval(this.timer) 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> </script>
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
import search from '@/components/search/search.vue'; import search from '@/components/search/search.vue';
import {baseURL,apiURL,cffpURL,companyInfo,shareURL} from "@/environments/environment"; import {baseURL,apiURL,cffpURL,companyInfo,shareURL} from "@/environments/environment";
import dataHandling from "@/util/dataHandling"; 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 UniShareWx from "@/uni_modules/uni-share-wx/index.vue";
import {nanoid} from 'nanoid'; import {nanoid} from 'nanoid';
export default{ export default{
...@@ -310,7 +310,13 @@ ...@@ -310,7 +310,13 @@
url = window.sessionStorage.getItem('firstEntryUrl').split('#')[0]; url = window.sessionStorage.getItem('firstEntryUrl').split('#')[0];
} }
} }
hshare(data, url) setTimeout(()=>{
initJssdkShare(() => {
setWechatShare(data);
}, url);
},500)
// hshare(data, url)
this.submitsuessc(shareCode,jumptime,item) this.submitsuessc(shareCode,jumptime,item)
dataHandling.pocessTracking( dataHandling.pocessTracking(
...@@ -339,6 +345,18 @@ ...@@ -339,6 +345,18 @@
} }
api.userShare(UserShareRequestVO).then(res => { api.userShare(UserShareRequestVO).then(res => {
if (res['success']) { 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({ // uni.showToast({
// title: '分享成功', // title: '分享成功',
// duration: 2000 // duration: 2000
......
...@@ -353,9 +353,10 @@ ...@@ -353,9 +353,10 @@
}; };
initJssdkShare(() => { initJssdkShare(() => {
setWechatShare(shareData); setWechatShare();
}, window.location.href.split('#')[0]); }, window.location.href.split('#')[0]);
// #endif // #endif
}, },
jumpPage(type){ jumpPage(type){
console.log('type',type); console.log('type',type);
...@@ -448,6 +449,7 @@ ...@@ -448,6 +449,7 @@
if(loginType == 'codelogin'){ if(loginType == 'codelogin'){
this.querySystemMessage() this.querySystemMessage()
this.queryInfo() this.queryInfo()
this.courseList()
}else { }else {
this.featureLists =[ this.featureLists =[
{ {
...@@ -607,7 +609,19 @@ ...@@ -607,7 +609,19 @@
return 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){ if(featureItem.isApply&& this.userInfo.partnerType){
dataHandling.pocessTracking( dataHandling.pocessTracking(
'点击', '点击',
......
...@@ -346,6 +346,21 @@ ...@@ -346,6 +346,21 @@
'邀请加盟', '邀请加盟',
'pages/inviteJoin/inviteJoin' '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() { closeShare() {
this.$refs.share.close() this.$refs.share.close()
......
...@@ -224,7 +224,8 @@ ...@@ -224,7 +224,8 @@
], ],
partnerStatistic:{}, //申请加盟统计 partnerStatistic:{}, //申请加盟统计
userInfo:{} ,//用户信息, userInfo:{} ,//用户信息,
shareBtnBottom:false shareBtnBottom:false,
productItem:{}
} }
}, },
components:{ components:{
...@@ -249,6 +250,7 @@ ...@@ -249,6 +250,7 @@
if(this.loginType == 'codelogin'){ if(this.loginType == 'codelogin'){
this.querySystemMessage() this.querySystemMessage()
this.queryInfo(); this.queryInfo();
this.courseList()
}else { }else {
this.messageInfo = [] this.messageInfo = []
uni.removeTabBarBadge({ index: 3 }); uni.removeTabBarBadge({ index: 3 });
...@@ -275,6 +277,21 @@ ...@@ -275,6 +277,21 @@
}, },
methods: { 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(){ gotoPoster(){
if(!uni.getStorageSync('loginType') || uni.getStorageSync('loginType')=='visitor'){ if(!uni.getStorageSync('loginType') || uni.getStorageSync('loginType')=='visitor'){
uni.setStorageSync('loginType','visitor') uni.setStorageSync('loginType','visitor')
...@@ -460,7 +477,7 @@ ...@@ -460,7 +477,7 @@
return 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() this.$refs.PartnerTipPopup.open()
return return
} }
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// import $H from '@/api/request.js' //封装好的接口请求 // import $H from '@/api/request.js' //封装好的接口请求
// import wx from 'weixin-js-sdk' // import wx from 'weixin-js-sdk'
import { log } from "console";
import api from "../api/api"; import api from "../api/api";
...@@ -69,7 +68,7 @@ export function setWechatShare(data) { ...@@ -69,7 +68,7 @@ export function setWechatShare(data) {
console.error('微信SDK未初始化'); console.error('微信SDK未初始化');
return; return;
} }
console.log('data',data);
jWeixin.ready(() => { jWeixin.ready(() => {
// 新API(推荐) // 新API(推荐)
jWeixin.updateAppMessageShareData({ 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