Commit e65a4457 by yuzhenWang

Merge branch 'feature-20260203-解决外部跳转页面登录问题' into 'dev'

Feature 20260203 解决外部跳转页面登录问题

See merge request !97
parents dcd16369 a99d0b80
...@@ -38,11 +38,11 @@ ...@@ -38,11 +38,11 @@
<view v-for="item in infoList" :key="item.id" class="infoCon" @click="handleInfo(item)"> <view v-for="item in infoList" :key="item.id" class="infoCon" @click="handleInfo(item)">
<template v-if="item.value"> <template v-if="item.value">
<view class="iconfont infoIcon" :class="`${item.icon}`"></view> <view class="iconfont infoIcon" :class="`${item.icon}`"></view>
<view class="infoTxt" > <view class="infoTxt">
{{item.value}} {{item.value}}
</view> </view>
</template> </template>
</view> </view>
</view> </view>
</view> </view>
...@@ -71,10 +71,11 @@ ...@@ -71,10 +71,11 @@
<view class="content"> <view class="content">
<view v-show="current === 0" class="tabcontent"> <view v-show="current === 0" class="tabcontent">
<view class="gapBox"> <view class="gapBox">
<view class="tabTitle" > <view class="tabTitle">
品牌简介 品牌简介
</view> </view>
<view class="insTxt" style="letter-spacing: 3rpx;">银盾家办(Supguard Family Office)由BHL(Budget Holdings <view class="insTxt" style="letter-spacing: 3rpx;">银盾家办(Supguard Family Office)由BHL(Budget
Holdings
Limited)全资控股,来自英国拥有半个世纪的历史。依托BHL亚太区核心平台—Auto&General(A&G)集团专业能力,打造中国首个AI普惠型新家办。它带着国际先进的家庭财事治理经验来到中国,致力于成为中国领先的家事治理与风险管理解决方案供应商,为家庭提供全生命周期的风险管理、财产保值增值以及财富传承规划方案。 Limited)全资控股,来自英国拥有半个世纪的历史。依托BHL亚太区核心平台—Auto&General(A&G)集团专业能力,打造中国首个AI普惠型新家办。它带着国际先进的家庭财事治理经验来到中国,致力于成为中国领先的家事治理与风险管理解决方案供应商,为家庭提供全生命周期的风险管理、财产保值增值以及财富传承规划方案。
</view> </view>
<view class="insTxt" style="margin-top: 20rpx;letter-spacing: 1.5rpx;"> <view class="insTxt" style="margin-top: 20rpx;letter-spacing: 1.5rpx;">
...@@ -266,7 +267,7 @@ ...@@ -266,7 +267,7 @@
{ value: '暂无', icon: 'icon-youxiang', id: '2', key: 'email' }, { value: '暂无', icon: 'icon-youxiang', id: '2', key: 'email' },
{ value: '暂无', icon: 'icon-dingwei', id: '3', key: 'address' }, { value: '暂无', icon: 'icon-dingwei', id: '3', key: 'address' },
], ],
items: ["关于我们", "合作模式", "关注官微"], items: ["关于我们", "合作模式", "关注官微"],
current: 0, current: 0,
systemInfo: {}, systemInfo: {},
cardInfo: {}, //名片信息 cardInfo: {}, //名片信息
...@@ -357,7 +358,7 @@ ...@@ -357,7 +358,7 @@
} }
this.systemInfo = uni.getSystemInfoSync(); this.systemInfo = uni.getSystemInfoSync();
const { platform, deviceType, screenWidth, screenHeight } = this.systemInfo; const { platform, deviceType, screenWidth, screenHeight } = this.systemInfo;
}, },
onShow() { onShow() {
...@@ -371,7 +372,14 @@ ...@@ -371,7 +372,14 @@
} else { } else {
this.getCard() this.getCard()
} }
// #ifdef H5
if (dataHandling.h5RuntimeEnv() !== 'miniprogram') {
initJssdkShare(() => {
setWechatShare();
}, window.location.href);
}
// #endif
}, },
onUnload() { onUnload() {
// #ifdef H5 // #ifdef H5
...@@ -384,6 +392,33 @@ ...@@ -384,6 +392,33 @@
// #endif // #endif
}, },
methods: { methods: {
// 新增方法:设置真实 meta 并初始化分享
setRealPageMetaAndShare() {
const data = {
title: `${this.cardInfo.userName}| ${this.cardInfo.companyInfoList[0].position} - ${this.cardInfo.companyInfoList[0].companyName}`,
desc: 'AI普惠型新家办领创家庭财事治理蓝海生态',
link: `${shareURL}/myPackageA/businessCard/businessCard?userId=${this.userId}&cardId=${this.cardId}&isShareCard=1`,
imgUrl: `${shareURL}/static/suplogo.png`
};
// #ifdef H5
// 分享的时候一定要加这段代码,否则ios首次分享会使用系统默认分享
//安卓机型获取当前页面路径
let url = window.location.href.split('#')[0];
//ios机型获取当前页面路径
let ua = navigator.userAgent.toLowerCase();
let isWeixin = ua.indexOf('micromessenger') !== -1;
if (isWeixin) {
let isiOS = /(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent); //ios终端
if (isiOS && window.sessionStorage.getItem('firstEntryUrl')) {
url = window.sessionStorage.getItem('firstEntryUrl').split('#')[0];
}
}
hshare(data, url);
// #endif
},
handleInfo(item) { handleInfo(item) {
if (item.key == 'phone') { if (item.key == 'phone') {
if (item.value) { if (item.value) {
...@@ -432,7 +467,7 @@ ...@@ -432,7 +467,7 @@
this.cardId this.cardId
).then(res => { ).then(res => {
if (res['success']) { if (res['success']) {
this.cardInfo = res.data.data this.cardInfo = res.data.data
this.cardId = res.data.data.id this.cardId = res.data.data.id
// this.infoList[0].value = this.cardInfo.phone || '暂无' // this.infoList[0].value = this.cardInfo.phone || '暂无'
...@@ -445,9 +480,10 @@ ...@@ -445,9 +480,10 @@
this.infoList[1].value = this.cardInfo.email || null this.infoList[1].value = this.cardInfo.email || null
this.infoList[2].value = this.cardInfo.address || '暂无' this.infoList[2].value = this.cardInfo.address || '暂无'
if (dataHandling.h5RuntimeEnv() !== 'miniprogram') { if (dataHandling.h5RuntimeEnv() !== 'miniprogram') {
this.getshareData() // this.getshareData()
this.setRealPageMetaAndShare()
} }
console.log('cardInfo',this.cardInfo); console.log('cardInfo', this.cardInfo);
} else { } else {
uni.showToast({ uni.showToast({
title: res['message'], title: res['message'],
...@@ -481,7 +517,8 @@ ...@@ -481,7 +517,8 @@
// {companyName:'上海律宝科技有限公司',position:'CEO'}, // {companyName:'上海律宝科技有限公司',position:'CEO'},
// ] // ]
if (dataHandling.h5RuntimeEnv() !== 'miniprogram') { if (dataHandling.h5RuntimeEnv() !== 'miniprogram') {
this.getshareData() this.setRealPageMetaAndShare()
// this.getshareData()
} }
this.getCardStatic() this.getCardStatic()
...@@ -554,7 +591,7 @@ ...@@ -554,7 +591,7 @@
return return
} }
// 如果是移动端 // 如果是移动端
this.shareTipsFlag = true;//提示用户点击小程序的右上角胶囊进行分享 this.shareTipsFlag = true; //提示用户点击小程序的右上角胶囊进行分享
if (dataHandling.h5RuntimeEnv() !== 'miniprogram') { if (dataHandling.h5RuntimeEnv() !== 'miniprogram') {
this.getshareData() this.getshareData()
} }
...@@ -568,7 +605,7 @@ ...@@ -568,7 +605,7 @@
// // 这里应该给小程序的webview发消息,不知道该怎样发送?此时 // // 这里应该给小程序的webview发消息,不知道该怎样发送?此时
// wx.miniProgram.navigateTo({ // wx.miniProgram.navigateTo({
// url: `/myPackageA/h5Pay/appYdhomeofficePay?param=${encodeURIComponent(JSON.stringify(param))}` // url: `/myPackageA/h5Pay/appYdhomeofficePay?param=${encodeURIComponent(JSON.stringify(param))}`
// }) // })
// } // }
} }
...@@ -605,9 +642,11 @@ ...@@ -605,9 +642,11 @@
height: auto; height: auto;
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx; padding: 20rpx;
.insTxt{
.insTxt {
padding: 0rpx 6rpx; padding: 0rpx 6rpx;
} }
.gapBox { .gapBox {
margin-bottom: 10rpx; margin-bottom: 10rpx;
letter-spacing: 3rpx; letter-spacing: 3rpx;
...@@ -620,17 +659,19 @@ ...@@ -620,17 +659,19 @@
box-sizing: border-box; box-sizing: border-box;
font-size: 0; font-size: 0;
margin: 0; margin: 0;
padding: 0; padding: 0;
image { image {
display: block; display: block;
/* 将图像转为块级元素以去除底部空白 */ /* 将图像转为块级元素以去除底部空白 */
width: 100%; width: 100%;
/* 确保图像宽度适应容器 */ /* 确保图像宽度适应容器 */
margin-top: -1rpx; margin-top: -1rpx;
} }
} }
.tipTxt{
.tipTxt {
width: 100%; width: 100%;
font-size: 24rpx; font-size: 24rpx;
display: flex; display: flex;
...@@ -639,6 +680,7 @@ ...@@ -639,6 +680,7 @@
color: #585858; color: #585858;
margin-top: 20rpx; margin-top: 20rpx;
} }
.loginTip { .loginTip {
width: 100%; width: 100%;
height: 50vh; height: 50vh;
......
...@@ -48,16 +48,19 @@ ...@@ -48,16 +48,19 @@
link: window.location.href, //分享链接 link: window.location.href, //分享链接
imgUrl: this.WXdata.imageUrl, //图片 imgUrl: this.WXdata.imageUrl, //图片
} }
// let url; //安卓机型获取当前页面路径
// if (navigator.userAgent.indexOf('iPhone') !== -1) { let url = window.location.href.split('#')[0];
// // IOS 记录微信菜单打开时的url
// url = uni.getStorageSync('entryUrl'); //ios机型获取当前页面路径
// } else { let ua = navigator.userAgent.toLowerCase();
// // 安卓 记录当前使用SDK的页面的url let isWeixin = ua.indexOf('micromessenger') !== -1;
// const { href } = window.location; if (isWeixin) {
// url = href.split('#')[0]; let isiOS = /(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent); //ios终端
// } if (isiOS && window.sessionStorage.getItem('firstEntryUrl')) {
var url = window.location.href.split('#')[0] url = window.sessionStorage.getItem('firstEntryUrl').split('#')[0];
}
}
hshare(data, url) hshare(data, url)
}, },
open(option) { open(option) {
...@@ -94,7 +97,7 @@ ...@@ -94,7 +97,7 @@
}); });
// #endif // #endif
// #ifdef H5 // #ifdef H5
this.getshareData() this.getshareData()
// #endif // #endif
// if (type === 1) { // if (type === 1) {
// let that = this; // let that = this;
...@@ -121,11 +124,11 @@ ...@@ -121,11 +124,11 @@
// }) // })
// } // }
}, },
submitsuessc(type){ submitsuessc(type) {
let platform = uni.getSystemInfoSync().platform let platform = uni.getSystemInfoSync().platform
let that = this let that = this
let UserShareRequestVO = { let UserShareRequestVO = {
systemType: platform == 'ios'? '1': '0', systemType: platform == 'ios' ? '1' : '0',
userId: uni.getStorageSync('cffp_userId'), userId: uni.getStorageSync('cffp_userId'),
businessType: '1', // 分享类型 businessType: '1', // 分享类型
businessId: that.WXdata.fileId, // 课程Id businessId: that.WXdata.fileId, // 课程Id
...@@ -183,4 +186,4 @@ ...@@ -183,4 +186,4 @@
} }
} }
</style> </style>
\ No newline at end of file
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