Commit 21086680 by yuzhenWang

Merge branch 'wyz' into 'test'

Wyz

See merge request !122
parents 52e7c894 cc6d6067
......@@ -89,13 +89,25 @@
controls ref="myVideo"></video>
</view>
</view>
<view class="gapBox">
<!-- 动态渲染:全球经验 ~ 合规保障 -->
<view class="gapBox" v-for="(section, idx) in sectionList" :key="idx">
<view class="tabTitle">{{ section.title }}</view>
<view v-if="section.descriptions && section.descriptions.length">
<view class="destxt" v-for="(desc, dIdx) in section.descriptions" :key="dIdx">{{ desc }}
</view>
</view>
<view class="boxImage">
<image v-for="(img, imgIdx) in section.images" :key="imgIdx" :src="img" mode="widthFix"
@click="previewGroup(section.images, imgIdx,idx)" />
</view>
</view>
<!-- <view class="gapBox">
<view class="tabTitle">
全球经验
</view>
<view class="boxImage">
<image src="/myPackageA/assets/images/quanqiu1.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/quanqiu2.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/quanqiu1.webp" mode="widthFix" @click="previewGroup('quanqiu1',0)"></image>
<image src="/myPackageA/assets/images/quanqiu2.webp" mode="widthFix" @click="previewGroup('quanqiu2',0)"></image>
</view>
</view>
......@@ -104,8 +116,8 @@
十余载本土深耕
</view>
<view class="boxImage">
<image src="/myPackageA/assets/images/shiyu1.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/shiyu2.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/shiyu1.webp" mode="widthFix" @click="previewGroup('shiyu1',0)"></image>
<image src="/myPackageA/assets/images/shiyu2.webp" mode="widthFix" @click="previewGroup('shiyu2',0)"></image>
</view>
</view>
......@@ -114,8 +126,8 @@
AI智能硬核支撑
</view>
<view class="boxImage">
<image src="/myPackageA/assets/images/ai1.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/ai2.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/ai1.webp" mode="widthFix" @click="previewGroup('ai1',0)"></image>
<image src="/myPackageA/assets/images/ai2.webp" mode="widthFix" @click="previewGroup('ai2',0)"></image>
</view>
</view>
......@@ -124,8 +136,8 @@
生态资源
</view>
<view class="boxImage">
<image src="/myPackageA/assets/images/shengtai1.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/shengtai2.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/shengtai1.webp" mode="widthFix" @click="previewGroup('shengtai1',0)"></image>
<image src="/myPackageA/assets/images/shengtai2.webp" mode="widthFix" @click="previewGroup('shengtai2',0)"></image>
</view>
</view>
......@@ -140,8 +152,8 @@
<view class="destxt">-被行业权威机构评为"家庭财事治理标杆机构"</view>
<view class="destxt">-十年服务零投诉,积累极高市场美誉度,成为客户信赖的财事治理首选品牌</view>
<view class="boxImage" style="margin-top: 15rpx;">
<image src="/myPackageA/assets/images/pinpai1.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/pinpai2.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/pinpai1.webp" mode="widthFix" @click="previewGroup('pinpai1',0)"></image>
<image src="/myPackageA/assets/images/pinpai2.webp" mode="widthFix" @click="previewGroup('pinpai2',0)"></image>
</view>
</view>
<view class="gapBox">
......@@ -149,32 +161,48 @@
合规保障 国际认证
</view>
<view class="boxImage">
<image src="/myPackageA/assets/images/hegui1.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/hegui2.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/hegui1.webp" mode="widthFix" @click="previewGroup('hegui1',0)"></image>
<image src="/myPackageA/assets/images/hegui2.webp" mode="widthFix" @click="previewGroup('hegui2',0)"></image>
</view>
</view>
</view> -->
<view class="tipTxt">
—— 已经到底部了 ——
</view>
</view>
<view v-show="current === 1" class="tabcontent">
<view class="tabTitle">合作模式</view>
<view class="boxImage">
<image class="imgItem" v-for="(img, index) in cooperationImages" :key="index" :src="img"
mode="widthFix" @click="previewGroup(cooperationImages, index,6)" />
</view>
<view class="tipTxt">
—— 已经到底部了 ——
</view>
</view>
<!-- <view v-show="current === 1" class="tabcontent">
<view class="tabTitle">
合作模式
</view>
<view class="boxImage">
<image class="imgItem" src="/myPackageA/assets/images/hezuo1.webp" mode="widthFix"></image>
<image class="imgItem" src="/myPackageA/assets/images/hezuo2.webp" mode="widthFix"></image>
<image class="imgItem" src="/myPackageA/assets/images/hezuo3.webp" mode="widthFix"></image>
<image class="imgItem" src="/myPackageA/assets/images/hezuo4.webp" mode="widthFix"></image>
<image class="imgItem" src="/myPackageA/assets/images/hezuo5.webp" mode="widthFix"></image>
<image class="imgItem" src="/myPackageA/assets/images/hezuo6.webp" mode="widthFix"></image>
<image class="imgItem" src="/myPackageA/assets/images/hezuo1.webp" mode="widthFix"
@click="previewGroup('hezuo1',0)"></image>
<image class="imgItem" src="/myPackageA/assets/images/hezuo2.webp" mode="widthFix"
@click="previewGroup('hezuo2',0)"></image>
<image class="imgItem" src="/myPackageA/assets/images/hezuo3.webp" mode="widthFix"
@click="previewGroup('hezuo3',0)"></image>
<image class="imgItem" src="/myPackageA/assets/images/hezuo4.webp" mode="widthFix"
@click="previewGroup('hezuo4',0)"></image>
<image class="imgItem" src="/myPackageA/assets/images/hezuo5.webp" mode="widthFix"
@click="previewGroup('hezuo5',0)"></image>
<image class="imgItem" src="/myPackageA/assets/images/hezuo6.webp" mode="widthFix"
@click="previewGroup('hezuo6',0)"></image>
</view>
<view class="tipTxt">
—— 已经到底部了 ——
</view>
</view>
</view> -->
<view v-show="current === 2" class="tabcontent">
<view class="tabTitle">
关注官微
......@@ -241,6 +269,45 @@
</template>
<script>
import quanqiu1 from '@/myPackageA/assets/images/quanqiu1.webp';
import quanqiu2 from '@/myPackageA/assets/images/quanqiu2.webp';
import shiyu1 from '@/myPackageA/assets/images/shiyu1.webp';
import shiyu2 from '@/myPackageA/assets/images/shiyu2.webp';
import ai1 from '@/myPackageA/assets/images/ai1.webp';
import ai2 from '@/myPackageA/assets/images/ai2.webp';
import shengtai1 from '@/myPackageA/assets/images/shengtai1.webp';
import shengtai2 from '@/myPackageA/assets/images/shengtai2.webp';
import pinpai1 from '@/myPackageA/assets/images/pinpai1.webp';
import pinpai2 from '@/myPackageA/assets/images/pinpai2.webp';
import hegui1 from '@/myPackageA/assets/images/hegui1.webp';
import hegui2 from '@/myPackageA/assets/images/hegui2.webp';
import hezuo1 from '@/myPackageA/assets/images/hezuo1.webp';
import hezuo2 from '@/myPackageA/assets/images/hezuo2.webp';
import hezuo5 from '@/myPackageA/assets/images/hezuo5.webp';
import hezuo3 from '@/myPackageA/assets/images/hezuo3.webp';
import hezuo4 from '@/myPackageA/assets/images/hezuo4.webp';
import hezuo6 from '@/myPackageA/assets/images/hezuo6.webp';
// 新增:图片映射
const imageMap = {
quanqiu1,
quanqiu2,
shiyu1,
shiyu2,
ai1,
ai2,
shengtai1,
shengtai2,
pinpai1,
pinpai2,
hegui1,
hegui2,
hezuo1,
hezuo2,
hezuo3,
hezuo4,
hezuo5,
hezuo6
};
import { initJssdkShare, setWechatShare, hshare } from '@/util/fiveshare';
import { shareURL, companyInfo } from "@/environments/environment";
import api from "@/api/api";
......@@ -248,6 +315,8 @@
import dataHandling from "@/util/dataHandling";
import customSegmentedControl from '@/components/customSegmentedControl/customSegmentedControl.vue';
import wx from 'weixin-js-sdk'
import { previewImages } from '@/util/previewImage.js';
export default {
name: 'businessCard',
components: {
......@@ -255,7 +324,7 @@
},
data() {
return {
visitorUuid:'',
visitorUuid: '',
sharelogin: false, //是否需要登录
isLogin: true, //登录状态
shareTipsFlag: false,
......@@ -286,7 +355,107 @@
description1: '银盾家办(Supguard Family Office)由BHL(Budget Holdings Limited)全资控股,来自英国拥有半个世纪的历史。依托BHL亚太区核心平台—Auto&General(A&G)集团专业能力,打造中国首个AI普惠型新家办。它带着国际先进的家庭财事治理经验来到中国,致力于成为中国领先的家事治理与风险管理解决方案供应商,为家庭提供全生命周期的风险管理、财产保值增值以及财富传承规划方案。',
description2: '银盾家办以“去风险、增确定、传家业”为使命,秉持“纯粹中立、系统赋能、长期陪伴”核心理念,打破传统家办精英壁垒,覆盖中产家庭、中小企业主、高净值家族全客层,银盾家办以千万家庭的“韧性架构师”自居,守护万家灯火,助力家业长青。'
}]
}],
ImagesPreviewList: [
[quanqiu1, quanqiu2],
[shiyu1, shiyu2],
[ai1, ai2],
[shengtai1, shengtai2],
[pinpai1, pinpai2],
[hegui1, hegui2],
[hezuo1, hezuo2, hezuo3, hezuo4, hezuo5, hezuo6]
],
sectionList: [
{
title: '全球经验',
images: [quanqiu1, quanqiu2] // 直接使用导入的变量
},
{
title: '十余载本土深耕',
images: [shiyu1, shiyu2]
},
{
title: 'AI智能硬核支撑',
images: [ai1, ai2]
},
{
title: '生态资源',
images: [shengtai1, shengtai2]
},
{
title: '企业荣誉',
descriptions: [
'-品牌入选"中国金融品牌价值 100 强"候选名单',
'-获得澳大利亚投资与财务规划师协会(AIOFP)中国地区独家授权资质',
'-被行业权威机构评为"家庭财事治理标杆机构"',
'-十年服务零投诉,积累极高市场美誉度,成为客户信赖的财事治理首选品牌'
],
images: [pinpai1, pinpai2]
},
{
title: '合规保障 国际认证',
images: [hegui1, hegui2]
}
],
cooperationImages: [hezuo1, hezuo2, hezuo3, hezuo4, hezuo5, hezuo6]
// cooperationImages: [
// '/myPackageA/assets/images/hezuo1.webp',
// '/myPackageA/assets/images/hezuo2.webp',
// '/myPackageA/assets/images/hezuo3.webp',
// '/myPackageA/assets/images/hezuo4.webp',
// '/myPackageA/assets/images/hezuo5.webp',
// '/myPackageA/assets/images/hezuo6.webp'
// ],
// sectionList: [{
// title: '全球经验',
// images: [
// '/myPackageA/assets/images/quanqiu1.webp',
// '/myPackageA/assets/images/quanqiu2.webp'
// ]
// },
// {
// title: '十余载本土深耕',
// images: [
// '/myPackageA/assets/images/shiyu1.webp',
// '/myPackageA/assets/images/shiyu2.webp'
// ]
// },
// {
// title: 'AI智能硬核支撑',
// images: [
// '/myPackageA/assets/images/ai1.webp',
// '/myPackageA/assets/images/ai2.webp'
// ]
// },
// {
// title: '生态资源',
// images: [
// '/myPackageA/assets/images/shengtai1.webp',
// '/myPackageA/assets/images/shengtai2.webp'
// ]
// },
// {
// title: '企业荣誉',
// descriptions: [
// '-品牌入选"中国金融品牌价值 100 强"候选名单',
// '-获得澳大利亚投资与财务规划师协会(AIOFP)中国地区独家授权资质',
// '-被行业权威机构评为"家庭财事治理标杆机构"',
// '-十年服务零投诉,积累极高市场美誉度,成为客户信赖的财事治理首选品牌'
// ],
// images: [
// '/myPackageA/assets/images/pinpai1.webp',
// '/myPackageA/assets/images/pinpai2.webp'
// ]
// },
// {
// title: '合规保障 国际认证',
// images: [
// '/myPackageA/assets/images/hegui1.webp',
// '/myPackageA/assets/images/hegui2.webp'
// ]
// }
// ]
}
},
computed: {
......@@ -363,7 +532,7 @@
},
onShow() {
if(uni.getStorageSync('visitorUuid')){
if (uni.getStorageSync('visitorUuid')) {
this.visitorUuid = uni.getStorageSync('visitorUuid')
}
if (this.companyType == '1') {
......@@ -398,8 +567,21 @@
// #endif
},
methods: {
previewGroup(images, current, idx) {
// let urls = this.ImagesPreviewList[idx]
// console.log('urls', urls);
// return
if (!images || images.length === 0) return;
previewImages(images, current, { indicator: 'number', loop: false });
},
// previewGroup(type, current) {
// const urls = imageMap[type];
// if (!urls || urls.length === 0) return;
// previewImages(urls, current, { indicator: 'number', loop: false });
// },
// 新增方法:设置真实 meta 并初始化分享
setRealPageMetaAndShare() {
const data = {
title: `${this.cardInfo.userName}| ${this.cardInfo.companyInfoList[0].position} - ${this.cardInfo.companyInfoList[0].companyName}`,
desc: 'AI普惠型新家办领创家庭财事治理蓝海生态',
......@@ -476,21 +658,21 @@
if (dataHandling.h5RuntimeEnv() !== 'miniprogram') {
this.setRealPageMetaAndShare()
}
if(dataHandling.h5RuntimeEnv() == 'wechat-miniprogram'){
if (dataHandling.h5RuntimeEnv() == 'wechat-miniprogram') {
let shareInfo = {
title: ` ${this.cardInfo.userName}| ${this.cardInfo.companyInfoList[0].position} - ${this.cardInfo.companyInfoList[0].companyName}`,
desc: '​AI普惠型新家办领创家庭财事治理蓝海生态',
link: `${shareURL}/pages/lanch/index?userId=${this.userId}&cardId=${this.cardId}&isShareCard=1&landingPage=businessCard&miniShare=1`,
imgUrl: `${shareURL}/myPackageA/static/images/logo3.png`, //图片
sharePage:'businessCard',//分享的哪个页面
userId:this.userId,
cardId:this.cardId,
commonId:this.cardId
sharePage: 'businessCard', //分享的哪个页面
userId: this.userId,
cardId: this.cardId,
commonId: this.cardId
}
wx.miniProgram.postMessage({
data:{
type:'share',
shareData:JSON.stringify(shareInfo)
data: {
type: 'share',
shareData: JSON.stringify(shareInfo)
}
})
......@@ -529,21 +711,21 @@
this.setRealPageMetaAndShare()
}
if(dataHandling.h5RuntimeEnv() == 'wechat-miniprogram'){
if (dataHandling.h5RuntimeEnv() == 'wechat-miniprogram') {
let shareInfo = {
title: ` ${this.cardInfo.userName}| ${this.cardInfo.companyInfoList[0].position} - ${this.cardInfo.companyInfoList[0].companyName}`,
desc: '​AI普惠型新家办领创家庭财事治理蓝海生态',
link: `${shareURL}/pages/lanch/index?userId=${this.userId}&cardId=${this.cardId}&isShareCard=1&landingPage=businessCard&miniShare=1`,
imgUrl: `${shareURL}/myPackageA/static/images/logo3.png`, //图片
sharePage:'businessCard',//分享的哪个页面
userId:this.userId,
cardId:this.cardId,
commonId:this.cardId
sharePage: 'businessCard', //分享的哪个页面
userId: this.userId,
cardId: this.cardId,
commonId: this.cardId
}
wx.miniProgram.postMessage({
data:{
type:'share',
shareData:JSON.stringify(shareInfo)
data: {
type: 'share',
shareData: JSON.stringify(shareInfo)
}
})
......@@ -578,7 +760,7 @@
},
// 统计名片查看次数
businessCradStatic() {
api.statusBusinessCard({ visitorUuid:this.visitorUuid,cardId:this.cardId }).then(res => {
api.statusBusinessCard({ visitorUuid: this.visitorUuid, cardId: this.cardId }).then(res => {
if (res['success']) {
......@@ -637,22 +819,22 @@
}
// 如果是移动端
this.shareTipsFlag = true; //提示用户点击小程序的右上角胶囊进行分享
if(dataHandling.h5RuntimeEnv() == 'wechat-miniprogram'){
if (dataHandling.h5RuntimeEnv() == 'wechat-miniprogram') {
let shareInfo = {
title: ` ${this.cardInfo.userName}| ${this.cardInfo.companyInfoList[0].position} - ${this.cardInfo.companyInfoList[0].companyName}`,
desc: '​AI普惠型新家办领创家庭财事治理蓝海生态',
link: `${shareURL}/pages/lanch/index?userId=${this.userId}&cardId=${this.cardId}&isShareCard=1&landingPage=businessCard&miniShare=1`,
// link: `${shareURL}/myPackageA/businessCard/businessCard?userId=${this.userId}&cardId=${this.cardId}&isShareCard=1`, //分享链接
imgUrl: `${shareURL}/myPackageA/static/images/logo3.png`, //图片
sharePage:'businessCard',//分享的哪个页面
userId:this.userId,
cardId:this.cardId,
commonId:this.userId
sharePage: 'businessCard', //分享的哪个页面
userId: this.userId,
cardId: this.cardId,
commonId: this.userId
}
wx.miniProgram.postMessage({
data:{
type:'share',
shareData:JSON.stringify(shareInfo)
data: {
type: 'share',
shareData: JSON.stringify(shareInfo)
}
})
......
......@@ -643,7 +643,7 @@
return data.map(item => {
// 创建 remarkName
const remarkName = item.name ?
(item.name.length > 3 ? item.name.substring(0, 3) + '...' : item.name) :
(item.name.length > 5 ? item.name.substring(0, 5) + '...' : item.name) :
'';
// 创建新对象,保持原数据不变
......@@ -966,12 +966,12 @@
justify-content: space-between;
margin-top: 20rpx;
.left{
width: 76%;
width: 100%;
display: flex;
align-items: center;
justify-content: flex-start;
.line{
width: 20%;
width: 18%;
display: flex;
justify-content: flex-end;
margin-top: -40rpx;
......
......@@ -378,7 +378,7 @@ export default {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
align-items: flex-start;
overflow: hidden;
.preview-image {
......@@ -493,7 +493,7 @@ export default {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
align-items: flex-start;
overflow: hidden;
.preview-image {
......
......@@ -91,7 +91,10 @@
<view class="tabContent">
<!-- 课程介绍 -->
<view class="courseIntroContent" v-if="tabType===1" style="margin-top: 20rpx;">
<view v-html="courseInfo.fileIntroduce" class="richTextContent"></view>
<!-- <view v-html="courseInfo.fileIntroduce" class="richTextContent"></view> -->
<image class="imageStyle" v-for="(item,index) in imagesList" :key="index" style="width: 100%"
:src="item" mode="widthFix" @click="previewImage(index)">
</image>
</view>
<!-- 服务流程 -->
<view class="courseIntroContent" v-if="tabType===4" style="margin-top: 20rpx;">
......@@ -265,6 +268,7 @@
import loadingIcon from '@/components/loading/loading.vue';
import ShareGuide from '@/components/ShareGuide/ShareGuide.vue';
import wx from 'weixin-js-sdk'
import { previewImages } from '@/util/previewImage.js';
export default {
components: {
UniShareWx,
......@@ -357,10 +361,22 @@
isOrderLoading: false,
posterShareTxt: '长按图片分享给朋友',
orderCodeUrl: '',
posterImgType: 'sharePoster'
posterImgType: 'sharePoster',
imagesList:[]
};
},
methods: {
previewImage (index) {
// 过滤掉无效的图片地址(空字符串或非http开头)
const validUrls = this.imagesList.filter(url => url && url.trim() !== '');
if (validUrls.length === 0) {
uni.showToast({ title: '暂无图片', icon: 'none' });
return;
}
// 确保索引有效
const idx = Math.min(index, validUrls.length - 1);
previewImages(validUrls, idx);
},
gotoJoinPartner() {
dataHandling.pocessTracking(
'加盟',
......@@ -782,6 +798,16 @@
}
})
},
extractImageUrls(htmlString) {
if (!htmlString) return [];
const imgRegex = /<img[^>]+src=["']([^"']+)["']/g;
const urls = [];
let match;
while ((match = imgRegex.exec(htmlString)) !== null) {
urls.push(match[1]);
}
return urls;
},
// 课程详情页面
courseDetail() {
this.userId = uni.getStorageSync('cffp_userId')
......@@ -798,6 +824,10 @@
this.bannerViewType = "2";
this.getBanner(Number(this.courseInfo.filePathOss));
}
if(this.courseInfo.fileIntroduce){
this.imagesList = this.extractImageUrls(this.courseInfo.fileIntroduce)
console.log(' this.imagesList', this.imagesList);
}
//this.courseInfo.serviceContent = res['data']['data']['filePathOss'];
this.lecturerId = res['data']['data']['fileLecturerId'];
// this.lecturerQuery();
......@@ -1501,6 +1531,14 @@
</script>
<style lang="scss" scoped>
.imageStyle {
display: block;
/* 将图像转为块级元素以去除底部空白 */
width: 100%;
/* 确保图像宽度适应容器 */
margin-top: -1rpx;
}
.container {
width: 100%;
height: auto;
......
......@@ -263,6 +263,7 @@
};
const initPdfAfterPermission = () => {
console.log('initPdfAfterPermission执行了');
loading.value = true;
const filteredTabs = filteredCurrentTabs.value;
if (currentType.value >= 2 && currentType.value <= 4) {
......
......@@ -484,6 +484,9 @@
},
gotoPoster() {
if (!uni.getStorageSync('loginType') || uni.getStorageSync('loginType') == 'visitor') {
uni.redirectTo({
url:'/myPackageA/login/login'
})
uni.setStorageSync('loginType', 'visitor')
uni.setStorageSync('islogin', '1')
}
......
......@@ -138,6 +138,8 @@
console.log(e)
// error
}
console.log('退出登录');
uni.clearStorageSync();
uni.redirectTo({
url:'/myPackageA/login/login'
})
......
/**
* 图片预览
* @param {String|Array} images - 图片列表,可以是字符串URL数组,或对象数组(需指定urlKey)
* @param {Number} current - 当前显示图片的索引(从0开始)
* @param {Object} options - 其他配置
* @param {String} options.urlKey - 当images为对象数组时,指定url字段名,默认 'url'
* @param {String} options.indicator - 指示器样式,可选 'default'、'number'、'none'
* @param {Boolean} options.loop - 是否循环播放,默认 false
*/
export function previewImages(images, current = 0, options = {}) {
const { urlKey = 'url', indicator = 'default', loop = false } = options;
// 统一转换为字符串数组
let urls = [];
if (Array.isArray(images)) {
if (typeof images[0] === 'string') {
urls = images;
} else if (typeof images[0] === 'object') {
urls = images.map(item => item[urlKey]);
}
} else if (typeof images === 'string') {
urls = [images];
}
if (urls.length === 0) {
console.warn('预览图片列表为空');
return;
}
// 确保 current 在有效范围
const index = Math.min(Math.max(current, 0), urls.length - 1);
console.log('urls',urls);
uni.previewImage({
urls,
current: index,
indicator,
loop,
// 长按可自定义菜单,但一般使用默认
// 支持 success/fail/complete 回调
});
}
\ 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