Commit 11fb9516 by yuzhenWang

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

我的名片发生产

See merge request !92
parents 54c9d7b1 e9b94162
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
console.log('currentRoute',currentRoute); console.log('currentRoute',currentRoute);
const whiteList = [ const whiteList = [
'/myPackageA/login/login', '/myPackageA/login/login',
'/myPackageA/businessCard/businessCard',
'/pages/invitationRegister/invitationlogin', '/pages/invitationRegister/invitationlogin',
'/myPackageA/applyFranchise/applyFranchise', '/myPackageA/applyFranchise/applyFranchise',
'/pages/applyFranchise/applyFranchise', '/pages/applyFranchise/applyFranchise',
......
...@@ -456,6 +456,10 @@ export default { ...@@ -456,6 +456,10 @@ export default {
getShareBusinessCard(cardId) { getShareBusinessCard(cardId) {
return request(`${apiURL}/business-card/view/${cardId}`, 'GET') return request(`${apiURL}/business-card/view/${cardId}`, 'GET')
}, },
//查询名片状态
checkBusinessCradStatus(businessCardId) {
return request(`${apiURL}/business-card/isEnabled?businessCardId=${businessCardId}`, 'GET')
},
//获取分享名片统计 //获取分享名片统计
getCardStats(data) { getCardStats(data) {
return request(`${apiURL}/business-card/stats/${data.cardId}?userId=${data.userId}`, 'GET') return request(`${apiURL}/business-card/stats/${data.cardId}?userId=${data.userId}`, 'GET')
......
<template> <template>
<view class="container" > <view class="container">
<!-- v-if="isLogin" --> <!-- v-if="isLogin" -->
<view class="" > <view class="">
<view class="cardHeader" > <view class="cardHeader">
<view class="introduct"> <view class="introduct">
<!-- 名片标题 -->
<view class="introductTitle"></view>
<view class="introductHeader"> <view class="introductHeader">
<view class="left"> <view class="left">
<view <view class="shield-bg"></view>
class="avatar" <!-- :style="{backgroundImage: `url(${cardInfo.avatarUrl?cardInfo.avatarUrl:companyLogo})`}" -->
:style="{backgroundImage: 'url(' + (cardInfo.avatarUrl || companyLogo) + ')'}" <view class="avatar">
> <image :src="cardInfo.avatarUrl?cardInfo.avatarUrl:companyLogo" mode="widthFix"
style="width: 120rpx;"></image>
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<view class="top"> <view class="top">
{{cardInfo.userName || '--'}} {{cardInfo.userName || '--'}}
...@@ -26,25 +30,32 @@ ...@@ -26,25 +30,32 @@
{{item.position}} {{item.position}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="introductContent"> <view class="introductContent">
<view v-for="item in infoList" :key="item.id" class="infoCon" > <view v-for="item in infoList" :key="item.id" class="infoCon" @click="handleInfo(item)">
<view class="iconfont infoIcon" :class="`${item.icon}`"></view> <view class="iconfont infoIcon" :class="`${item.icon}`"></view>
<view class=""> <view class="infoTxt">
{{item.value}} {{item.value}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="optionBtn"> <view class="optionBtn">
<view class="btnCon" v-for="item in btnList" :key="item.id" @click="handleBtnClick(item)"> <view class="btnCon" v-for="item in btnList" :key="item.id" @click="handleBtnClick(item)">
<view :class="{'shareStyle':item.id=='1','commonBtn':item.id!=='1'}"> <view style="width: 50rpx;height: 50rpx;">
<view class="iconfont btnIcon" :class="`${item.icon}`" ></view> <image v-if="item.type=='shareCard'" src="/myPackageA/assets/images/share.png"
mode="widthFix" class="optionIcon"></image>
<image v-if="item.type=='phone'" src="/myPackageA/assets/images/phone.png" mode="widthFix"
class="optionIcon"></image>
<image v-if="item.type=='focus'" src="/myPackageA/assets/images/guanzhu.png" mode="widthFix"
class="optionIcon"></image>
<image v-if="item.type=='shareData'" src="/myPackageA/assets/images/shareData.png"
mode="widthFix" class="optionIcon"></image>
</view> </view>
<view class="btnTxt"> <view class="btnTxt">
{{item.name}} {{item.name}}
</view> </view>
...@@ -52,29 +63,128 @@ ...@@ -52,29 +63,128 @@
</view> </view>
</view> </view>
<view class="tabs"> <view class="tabs">
<customSegmentedControl <customSegmentedControl :values="items" :current="current" :fontSize="16" activeTextColor="#CE0E2D"
:values="items" inactiveTextColor="#000" @clickItem="onClickItem" :underlineHeight="'4rpx'"
:current="current" :underlineColor="'#CE0E2D'" :underlineWidth="'30%'" :tabBg="false" />
:fontSize="16" <view class="content">
activeTextColor="#20269B" <view v-show="current === 0" class="tabcontent">
inactiveTextColor="#000" <view class="gapBox">
@clickItem="onClickItem" <view class="tabTitle" >
:underlineHeight="'4rpx'" 品牌简介
:underlineColor="'#20269B'" </view>
:underlineWidth="'30%'" <view class="insTxt" style="letter-spacing: 3rpx;">银盾家办(Supguard Family Office)由BHL(Budget Holdings
:tabBg="false" Limited)全资控股,来自英国拥有半个世纪的历史。依托BHL亚太区核心平台—Auto&General(A&G)集团专业能力,打造中国首个AI普惠型新家办。它带着国际先进的家庭财事治理经验来到中国,致力于成为中国领先的家事治理与风险管理解决方案供应商,为家庭提供全生命周期的风险管理、财产保值增值以及财富传承规划方案。
/> </view>
<view class="content"> <view class="insTxt" style="margin-top: 20rpx;letter-spacing: 1.5rpx;">
<view v-show="current === 0"> 银盾家办以“去风险、增确定、传家业”为使命,秉持“纯粹中立、系统赋能、长期陪伴”核心理念,打破传统家办精英壁垒,覆盖中产家庭、中小企业主、高净值家族全客层,银盾家办以千万家庭的“韧性架构师”自居,守护万家灯火,助力家业长青。
关于我们的内容 </view>
</view> <view class="videoBox">
<view v-show="current === 1"> <video id="myVideo" src="/myPackageA/assets/video/companyVideo4.mp4"
企业荣誉的内容 object-fit="contain" title="公司介绍视频" style="width: 100%;height: 312.5rpx;"
</view> poster="/myPackageA/assets/images/videoPoster.webp" playsinline webkit-playsinline
<view v-show="current === 2"> loop x5-video-player-type="h5" x5-video-player-fullscreen="false" preload="metadata"
关注官微的内容 controls ref="myVideo"></video>
</view> </view>
</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>
</view>
</view>
<view class="gapBox">
<view class="tabTitle">
十余载本土深耕
</view>
<view class="boxImage">
<image src="/myPackageA/assets/images/shiyu1.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/shiyu2.webp" mode="widthFix"></image>
</view>
</view>
<view class="gapBox">
<view class="tabTitle">
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>
</view>
</view>
<view class="gapBox">
<view class="tabTitle">
生态资源
</view>
<view class="boxImage">
<image src="/myPackageA/assets/images/shengtai1.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/shengtai2.webp" mode="widthFix"></image>
</view>
</view>
<view class="gapBox">
<view class="tabTitle">
企业荣誉
</view>
<view class="destxt">
-品牌入选"中国金融品牌价值 100 强"候选名单
</view>
<view class="destxt"> -获得澳大利亚投资与财务规划师协会(AIOFP)中国地区独家授权资质</view>
<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>
</view>
</view>
<view class="gapBox">
<view class="tabTitle" style="margin-top: 15rpx;">
合规保障 国际认证
</view>
<view class="boxImage">
<image src="/myPackageA/assets/images/hegui1.webp" mode="widthFix"></image>
<image src="/myPackageA/assets/images/hegui2.webp" mode="widthFix"></image>
</view>
</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>
</view>
<view class="tipTxt">
—— 已经到底部了 ——
</view>
</view>
<view v-show="current === 2" class="tabcontent">
<view class="tabTitle">
关注官微
</view>
<view class="qrBox">
<image src="/myPackageA/assets/images/gongzhonghao.jpg" mode="widthFix"
style="width:250rpx !important;"></image>
<view class="description">
长按识别二维码
</view>
</view>
</view>
</view>
</view> </view>
</view> </view>
<!-- <view v-if="!isLogin" class="loginTip" @click="sharelogin=true"> <!-- <view v-if="!isLogin" class="loginTip" @click="sharelogin=true">
...@@ -83,34 +193,35 @@ ...@@ -83,34 +193,35 @@
<uni-popup ref="popup" type="center" background-color="#fff"> <uni-popup ref="popup" type="center" background-color="#fff">
<view class="descriptionBox"> <view class="descriptionBox">
<view class="popupClose"> <view class="popupClose">
<text class="iconfont icon-guanbi" @click="$refs.popup.close()"></text> <text class="iconfont icon-guanbi" @click="$refs.popup.close()"></text>
<!-- <view class="popupTit">
{{popupTitle}}
</view> -->
</view> </view>
<view class="" v-if="optionType=='shareData'"> <view class="" v-if="optionType=='shareData'">
<view class="" v-for="item in staticData" :key="item.name"> <view class="" v-for="item in staticData" :key="item.name">
<view class="staticItem"> <view class="staticItem">
<text class="iconfont staticIcon" :class="item.icon" ></text> <text class="iconfont staticIcon" :class="item.icon"></text>
{{item.name}}{{item.value}}{{item.unit}} {{item.name}}{{item.value}}{{item.unit}}
</view> </view>
</view> </view>
</view> </view>
<view class="" v-if="optionType=='focus' || (optionType=='shareCard'&&runEnv=='browser')"> <view class="" v-if="optionType=='focus' || (optionType=='shareCard'&&runEnv=='browser')">
<view class="codeBox"> <view class="codeBox">
<image v-if="cardInfo.qwQrcode" :src="cardInfo.qwQrcode" mode="widthFix" style="width:250rpx !important;"></image> <image v-if="cardInfo.qwQrcode" :src="cardInfo.qwQrcode" mode="widthFix"
<image v-else src="@/static/cffpCode.jpg" mode="widthFix" style="width:250rpx !important;"></image> style="width:250rpx !important;"></image>
<image v-else src="/myPackageA/assets/images/kefu.png" mode="widthFix"
style="width:250rpx !important;">
</image>
</view> </view>
<view class="description"> <view class="description">
长按识别二维码 保存或分享图片 长按识别二维码 保存或分享图片
</view> </view>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<view class="markBox" @click="shareTipsFlag=false" v-if="shareTipsFlag"> <view class="markBox" @click="shareTipsFlag=false" v-if="shareTipsFlag">
<view class="guideImgBox"> <view class="guideImgBox">
...@@ -121,118 +232,182 @@ ...@@ -121,118 +232,182 @@
</view> </view>
</view> </view>
</view> </view>
<boot-page <boot-page loginSource="我的名片" v-if="sharelogin" ref="sharelogin" @close="loginClose()"
loginSource="我的名片" @afterLogin="afterLogin()"></boot-page>
v-if="sharelogin"
ref="sharelogin"
@close="loginClose()"
@afterLogin="afterLogin()"
></boot-page>
</view> </view>
</template> </template>
<script> <script>
import { initJssdkShare, setWechatShare,hshare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare, hshare } from '@/util/fiveshare';
import {shareURL,companyInfo} from "@/environments/environment"; import { shareURL, companyInfo } from "@/environments/environment";
import api from "@/api/api"; import api from "@/api/api";
import BootPage from "@/components/bootpage/bootpage.vue"; import BootPage from "@/components/bootpage/bootpage.vue";
import dataHandling from "@/util/dataHandling"; import dataHandling from "@/util/dataHandling";
import customSegmentedControl from '@/components/customSegmentedControl/customSegmentedControl.vue'; import customSegmentedControl from '@/components/customSegmentedControl/customSegmentedControl.vue';
export default{
name:'businessCard', export default {
components:{ name: 'businessCard',
components: {
BootPage, BootPage,
}, },
data(){ data() {
return{ return {
sharelogin:false,//是否需要登录 sharelogin: false, //是否需要登录
isLogin:true,//登录状态 isLogin: true, //登录状态
shareTipsFlag:false, shareTipsFlag: false,
runEnv:dataHandling.getRuntimeEnv(), //运行的环境 runEnv: dataHandling.getRuntimeEnv(), //运行的环境
companyType : companyInfo.companyType, companyType: companyInfo.companyType,
companyLogo : '../../static/suplogo.png', companyLogo: '../../static/suplogo.png',
sharePictrue:'../static/images/cardLogo.png',
infoList: [
infoList:[ { value: '暂无', icon: 'icon-dianhua', id: '1', key: 'phone' },
{value:'暂无',icon:'icon-dianhua',id:'1'}, { value: '暂无', icon: 'icon-youxiang', id: '2', key: 'email' },
{value:'暂无',icon:'icon-youxiang',id:'2'}, { value: '暂无', icon: 'icon-dingwei', id: '3', key: 'address' },
{value:'暂无',icon:'icon-dingwei',id:'3'}, ],
], items: ["关于我们", "合作模式", "关注官微"],
items: ["关于我们", "企业荣誉", "关注官微"], current: 0,
current: 0, systemInfo: {},
systemInfo:{}, cardInfo: {}, //名片信息
cardInfo:{},//名片信息 isShare: false, //是否通过分享链接进来的
isShare:false,//是否通过分享链接进来的 userId: uni.getStorageSync('cffp_userId'),
userId:uni.getStorageSync('cffp_userId'), cardId: '',
cardId:'', staticData: [
staticData:[ { name: '总访问人数', value: 0, unit: '人', icon: 'icon-zhongdianrenquntongji', color: '#3639A9' },
{name:'总访问人数',value:0,unit:'人',icon:'icon-zhongdianrenquntongji',color:'#3639A9'}, { name: '总访问量', value: 0, unit: '次', icon: 'icon-zongfangwenliang', color: '#3639A9' },
{name:'总访问量',value:0,unit:'次',icon:'icon-zongfangwenliang',color:'#3639A9'}, ],
], optionType: '',
optionType:'', popupTitle: '',
popupTitle:'' tab0List: [{
title: '品牌简介',
description1: '银盾家办(Supguard Family Office)由BHL(Budget Holdings Limited)全资控股,来自英国拥有半个世纪的历史。依托BHL亚太区核心平台—Auto&General(A&G)集团专业能力,打造中国首个AI普惠型新家办。它带着国际先进的家庭财事治理经验来到中国,致力于成为中国领先的家事治理与风险管理解决方案供应商,为家庭提供全生命周期的风险管理、财产保值增值以及财富传承规划方案。',
description2: '银盾家办以“去风险、增确定、传家业”为使命,秉持“纯粹中立、系统赋能、长期陪伴”核心理念,打破传统家办精英壁垒,覆盖中产家庭、中小企业主、高净值家族全客层,银盾家办以千万家庭的“韧性架构师”自居,守护万家灯火,助力家业长青。'
}]
} }
}, },
computed: { computed: {
btnList() { btnList() {
if(this.isShare){ if (this.isShare) {
return [ return [{
{name:'分享名片',icon:'icon-fenxiang',id:'1',color:'#20269B',type:'shareCard'}, name: '分享名片',
{name:'拨打电话',icon:'icon-daohang',id:'2',color:'#fff',phoneNumber:'18918485032',type:'phone'}, imgUrl: '/myPackageA/assets/images/share.png',
{name:'关注我',icon:'icon-guanzhuwode',id:'3',color:'#fff',type:'focus'}, id: '1',
color: '#20269B',
type: 'shareCard'
},
{
name: '拨打电话',
imgUrl: '/myPackageA/assets/images/phone.png',
id: '2',
color: '#fff',
phoneNumber: '18918485032',
type: 'phone'
},
{
name: '关注我',
imgUrl: '/myPackageA/assets/images/guanzhu.png',
id: '3',
color: '#fff',
type: 'focus'
},
]
} else {
return [{
name: '分享名片',
imgUrl: '/myPackageA/assets/images/share.png',
id: '1',
color: '#20269B',
type: 'shareCard'
},
{
name: '拨打电话',
imgUrl: '/myPackageA/assets/images/phone.png',
id: '2',
color: '#fff',
phoneNumber: '18918485032',
type: 'phone'
},
{
name: '关注我',
imgUrl: '/myPackageA/assets/images/guanzhu.png',
id: '3',
color: '#fff',
type: 'focus'
},
{
name: '分享数据',
imgUrl: '/myPackageA/assets/images/shareData.png',
id: '4',
color: '#fff',
type: 'shareData'
},
] ]
}else {
return [
{name:'分享名片',icon:'icon-fenxiang',id:'1',color:'#20269B',type:'shareCard'},
{name:'拨打电话',icon:'icon-daohang',id:'2',color:'#fff',phoneNumber:'18918485032',type:'phone'},
{name:'关注我',icon:'icon-guanzhuwode',id:'3',color:'#fff',type:'focus'},
{name:'分享数据',icon:'icon-fenxiangshuju',id:'4',color:'#fff',type:'shareData'},
]
} }
}
},
onLoad(options) {
if (options.isShareCard) {
this.isShare = true
this.userId = options.userId
this.cardId = options.cardId
} }
this.systemInfo = uni.getSystemInfoSync();
const { platform, deviceType, screenWidth, screenHeight } = this.systemInfo;
}, },
onLoad(options) { onShow() {
if(options.isShareCard){
this.isShare = true if (this.companyType == '1') {
this.userId = options.userId this.companyLogo = '../../static/myteam/Group1633.png';
this.cardId = options.cardId } else if (this.companyType == '2') {
} this.companyLogo = '../../static/suplogo.png';
this.systemInfo = uni.getSystemInfoSync(); }
const { platform, deviceType, screenWidth, screenHeight } = this.systemInfo; if (this.isShare) {
},
onShow() {
// 是通过分享进来的但未登录
// if(this.isShare&&(!uni.getStorageSync('loginType') ||uni.getStorageSync('loginType') == 'visitor')){
// this.sharelogin = true
// this.isLogin = false
// }else {
// this.isLogin = true
// this.getCard()
// }
if(this.companyType == '1'){
this.companyLogo='../../static/myteam/Group1633.png';
}else if(this.companyType == '2'){
this.companyLogo='../../static/suplogo.png';
}
if(this.isShare){
this.getShareCard() this.getShareCard()
}else { } else {
this.getCard() this.getCard()
} }
}, },
onUnload(){ onUnload() {
// #ifdef H5 // #ifdef H5
initJssdkShare(() => { if (dataHandling.h5RuntimeEnv() !== 'miniprogram') {
setWechatShare(); initJssdkShare(() => {
}, window.location.href); setWechatShare();
// #endif }, window.location.href);
}, }
methods:{
afterLogin(){ // #endif
},
methods: {
handleInfo(item) {
if (item.key == 'phone') {
if (item.value) {
uni.makePhoneCall({
phoneNumber: item.value.replace(/\s+/g, ''),
success: () => {
console.log('拨打电话成功');
},
fail: (err) => {
uni.showToast({
title: '拨打电话失败',
icon: 'none'
});
}
});
} else {
uni.showToast({
title: '暂无电话',
duration: 2000,
icon: 'none'
})
}
}
},
afterLogin() {
this.sharelogin = false this.sharelogin = false
this.isLogin = true this.isLogin = true
this.getCard() this.getCard()
...@@ -240,152 +415,171 @@ import customSegmentedControl from '@/components/customSegmentedControl/customSe ...@@ -240,152 +415,171 @@ import customSegmentedControl from '@/components/customSegmentedControl/customSe
// H5 自定义分享 // H5 自定义分享
getshareData() { getshareData() {
let data = { let data = {
title: this.cardInfo.userName?`我是${this.cardInfo.userName}的电子名片`:'电子名片', title: ` ${this.cardInfo.userName}| ${this.cardInfo.companyInfoList[0].position} - ${this.cardInfo.companyInfoList[0].companyName}`,
// desc: '加入我们开启学习之旅', desc: '​AI普惠型新家办领创家庭财事治理蓝海生态',
desc:'专注为家庭提供全资产、全成员、全生命周期的复合型家庭事务治理方案',
link: `${shareURL}/myPackageA/businessCard/businessCard?userId=${this.userId}&cardId=${this.cardId}&isShareCard=1`, //分享链接 link: `${shareURL}/myPackageA/businessCard/businessCard?userId=${this.userId}&cardId=${this.cardId}&isShareCard=1`, //分享链接
imgUrl: `${shareURL}/myPackageA/static/images/cardLogo.png`, //图片 imgUrl: `${shareURL}/myPackageA/static/images/suplogo.png`, //图片
} }
var url = window.location.href.split('#')[0] var url = window.location.href.split('#')[0]
hshare(data, url) hshare(data, url)
}, },
// 分享状态下获取名片信息 // 分享状态下获取名片信息
getShareCard(){ getShareCard() {
api.getShareBusinessCard( api.getShareBusinessCard(
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 || '暂无'
if (this.cardInfo.phone) {
this.infoList[0].value = dataHandling.formatPhone(this.cardInfo.phone)
} else {
this.infoList[0].value = '暂无'
}
this.btnList[1].phoneNumber = this.cardInfo.phone || null this.btnList[1].phoneNumber = this.cardInfo.phone || null
this.infoList[1].value = this.cardInfo.email || '暂无' this.infoList[1].value = this.cardInfo.email || '暂无'
this.infoList[2].value = this.cardInfo.address || '暂无' this.infoList[2].value = this.cardInfo.address || '暂无'
if (dataHandling.h5RuntimeEnv() !== 'miniprogram') {
this.getshareData() this.getshareData()
}else { }
} else {
uni.showToast({ uni.showToast({
title: res['message'], title: res['message'],
duration: 2000, duration: 2000,
icon: 'none' icon: 'none'
}) })
} }
}) })
}, },
// 不是分享状态下获取名片信息 // 不是分享状态下获取名片信息
getCard(){ getCard() {
api.getBusinessCard( api.getBusinessCard(
this.userId this.userId
).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.cardInfo.avatarUrl = 'https://dev-yindun-store.oss-cn-shanghai-finance-1-pub.aliyuncs.com/dealer/undefined/CCQG38H9-切片 2.png'
console.log('卡片信息', this.cardInfo);
// this.infoList[0].value = this.cardInfo.phone || '暂无'
if (this.cardInfo.phone) {
this.infoList[0].value = dataHandling.formatPhone(this.cardInfo.phone)
} else {
this.infoList[0].value = '暂无'
}
this.btnList[1].phoneNumber = this.cardInfo.phone || null this.btnList[1].phoneNumber = this.cardInfo.phone || null
this.infoList[1].value = this.cardInfo.email || '暂无' this.infoList[1].value = this.cardInfo.email || '暂无'
this.infoList[2].value = this.cardInfo.address || '暂无' this.infoList[2].value = this.cardInfo.address || '暂无'
// this.cardInfo.avatarUrl = 'https://dev-yindun-store.oss-cn-shanghai-finance-1-pub.aliyuncs.com/dealerEmployee/4eaf5af32e9c4589aa01c28d0e74e1e8/8fa37642f20a49d5beae7a8002c46c57/registerBg.png' // this.cardInfo.companyInfoList = [
this.getshareData() // {companyName:'上海律宝科技有限公司',position:'副总经理'},
// {companyName:'上海律宝科技有限公司',position:'CEO'},
// ]
if (dataHandling.h5RuntimeEnv() !== 'miniprogram') {
this.getshareData()
}
this.getCardStatic() this.getCardStatic()
}else { } else {
uni.showToast({ uni.showToast({
title: res['message'], title: res['message'],
duration: 2000, duration: 2000,
icon: 'none' icon: 'none'
}) })
} }
}) })
}, },
// 获取名片统计数据 // 获取名片统计数据
getCardStatic(){ getCardStatic() {
api.getCardStats( api.getCardStats({ userId: this.userId, cardId: this.cardId }).then(res => {
{userId:this.userId,cardId:this.cardId} if (res['success']) {
).then(res =>{ if (res.data.data) {
if(res['success']){
if(res.data.data){
this.staticData[0].value = res.data.data.uvNum this.staticData[0].value = res.data.data.uvNum
this.staticData[1].value = res.data.data.pvNum this.staticData[1].value = res.data.data.pvNum
} }
}else { } else {
uni.showToast({ uni.showToast({
title: res['message'], title: res['message'],
duration: 2000, duration: 2000,
icon: 'none' icon: 'none'
}) })
} }
}) })
}, },
onClickItem(index) { onClickItem(index) {
if (this.current !== index) { if (this.current !== index) {
this.current = index; this.current = index;
} }
}, },
// 按钮点击事件 // 按钮点击事件
handleBtnClick(item) { handleBtnClick(item) {
// // 拨打电话按钮 // // 拨打电话按钮
if (item.id === '2') { if (item.id === '2') {
if(item.phoneNumber){ if (item.phoneNumber) {
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: item.phoneNumber.replace(/\s+/g, ''), phoneNumber: item.phoneNumber.replace(/\s+/g, ''),
success: () => { success: () => {
console.log('拨打电话成功'); console.log('拨打电话成功');
}, },
fail: (err) => { fail: (err) => {
uni.showToast({ uni.showToast({
title: '拨打电话失败', title: '拨打电话失败',
icon: 'none' icon: 'none'
}); });
} }
}); });
}else { } else {
uni.showToast({ uni.showToast({
title: '暂无电话', title: '暂无电话',
duration: 2000, duration: 2000,
icon: 'none' icon: 'none'
}) })
} }
} else { } else {
// 其他按钮的处理逻辑 // 其他按钮的处理逻辑
if(item.type!=='shareCard' || (item.type=='shareCard'&&this.runEnv=='browser')){ if (item.type !== 'shareCard' || (item.type == 'shareCard' && this.runEnv == 'browser')) {
this.optionType = item.type this.optionType = item.type
this.popupTitle = item.name this.popupTitle = item.name
this.$refs.popup.open() this.$refs.popup.open()
return return
}
// 如果是移动端
this.shareTipsFlag = true;//提示用户点击小程序的右上角胶囊进行分享
if (dataHandling.h5RuntimeEnv() !== 'miniprogram') {
this.getshareData()
}
} }
// 如果是移动端
this.shareTipsFlag = true;
this.getshareData()
}
}, },
//关闭登录 //关闭登录
loginClose(val,loginTypeSync,type) { loginClose(val, loginTypeSync, type) {
// 直接点击了关闭登录的叉号 // 直接点击了关闭登录的叉号
if(type){ if (type) {
this.sharelogin = false this.sharelogin = false
this.isLogin = false this.isLogin = false
return return
} }
if (val) { if (val) {
this.sharelogin = false this.sharelogin = false
} else { } else {
this.sharelogin = false this.sharelogin = false
} }
}, },
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.container{ .container {
position: relative; position: relative;
background-color: rgba(235, 239, 247, 1); background-color: rgba(235, 239, 247, 1);
display: flex; display: flex;
...@@ -394,7 +588,41 @@ import customSegmentedControl from '@/components/customSegmentedControl/customSe ...@@ -394,7 +588,41 @@ import customSegmentedControl from '@/components/customSegmentedControl/customSe
height: auto; height: auto;
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx; padding: 20rpx;
.loginTip{ .insTxt{
padding: 0rpx 6rpx;
}
.gapBox {
margin-bottom: 10rpx;
letter-spacing: 3rpx;
}
.boxImage {
display: flex;
flex-direction: column;
width: 100%;
box-sizing: border-box;
font-size: 0;
margin: 0;
padding: 0;
image {
display: block;
/* 将图像转为块级元素以去除底部空白 */
width: 100%;
/* 确保图像宽度适应容器 */
margin-top: -1rpx;
}
}
.tipTxt{
width: 100%;
font-size: 24rpx;
display: flex;
align-items: center;
justify-content: center;
color: #585858;
margin-top: 20rpx;
}
.loginTip {
width: 100%; width: 100%;
height: 50vh; height: 50vh;
font-size: 30rpx; font-size: 30rpx;
...@@ -402,146 +630,197 @@ import customSegmentedControl from '@/components/customSegmentedControl/customSe ...@@ -402,146 +630,197 @@ import customSegmentedControl from '@/components/customSegmentedControl/customSe
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.cardHeader{
.cardHeader {
box-sizing: border-box; box-sizing: border-box;
border-radius: 20rpx ; border-radius: 20rpx;
background-color: #fff; background-color: #fff;
.introduct{
.introduct {
box-sizing: border-box; box-sizing: border-box;
background-image: url('/myPackageA/static/images/cardBg.png'); background-image: url('/myPackageA/assets/images/cardBg.webp');
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center center; background-position: center center;
background-size: cover; background-size: cover;
padding: 10rpx 15rpx; padding: 30rpx 20rpx 20rpx 20rpx;
width: 100%; width: 100%;
border-radius: 20rpx; border-radius: 20rpx;
.introductHeader{
.introductTitle {
background-image: url('/myPackageA/assets/images/cardTit.png');
background-repeat: no-repeat;
background-position: left center;
background-size: contain;
height: 40rpx;
width: 100%;
margin-bottom: 10rpx;
}
.introductHeader {
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
margin-bottom: 50rpx; margin-bottom: 20rpx;
.left{
.left {
flex: 1; flex: 1;
display: flex; display: flex;
background-color: #fff;
border-radius: 50%;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border: 8rpx solid #fff; position: relative;
.avatar{
margin-top: -5rpx; /* 装饰性背景(白边盾牌)*/
flex-grow: 0; .shield-bg {
width: 120rpx; position: absolute;
width: 100rpx;
height: 120rpx; height: 120rpx;
border-radius: 50%; background-image: url('/myPackageA/assets/images/touBg4.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
z-index: 1;
}
.avatar {
// margin-top: -5rpx;
flex-grow: 0;
width: 100rpx;
height: 100rpx;
overflow: hidden; overflow: hidden;
// background-image: url('@/static/images/banner.png');
// margin-right: 15rpx; // margin-right: 15rpx;
/* 背景图设置 */ /* 背景图设置 */
background-size: cover; background-size: cover;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
/* 添加以下属性强制硬件加速 */ /* 添加以下属性强制硬件加速 */
transform: translateZ(0); transform: translateZ(0);
-webkit-transform: translateZ(0); -webkit-transform: translateZ(0);
backface-visibility: hidden; backface-visibility: hidden;
-webkit-backface-visibility: hidden; -webkit-backface-visibility: hidden;
/* 关键:使用实心 mask */
image{ -webkit-mask: url('/myPackageA/assets/images/touBg4.png') no-repeat center;
width: 100%; mask: url('/myPackageA/assets/images/touBg4.png') no-repeat center;
border-radius: 50%; -webkit-mask-size: contain;
object-fit: cover; mask-size: contain;
/* 同样为图片添加硬件加速 */ z-index: 2;
transform: translateZ(0);
-webkit-transform: translateZ(0);
border-radius: none !important;
}
} }
} }
.right{
width:100% ; .icon-shield {
font-size: 150rpx;
color: #fff;
}
.right {
width: 100%;
margin-left: 10rpx; margin-left: 10rpx;
box-sizing: border-box; box-sizing: border-box;
color: #fff; color: #383838;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.top{
.top {
width: 100%; width: 100%;
font-size: 30rpx; font-size: 42rpx;
font-weight: 500; font-weight: 700;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.bottom{
.bottom {
width: 100%; width: 100%;
font-size: 26rpx; font-size: 24rpx;
.bottomCon{
.bottomCon {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.bottomL {
width: 440rpx;
overflow-wrap: break-word;
word-break: break-word;
/* 更兼容的写法 */
white-space: normal;
}
} }
} }
} }
} }
.introductContent{
.introductContent {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
.infoCon{
.infoCon {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; margin-bottom: 6rpx;
color: #fff; color: #383838;
font-size: 24rpx;
margin-bottom: 10rpx;
.infoIcon{ .infoIcon {
margin-right: 15rpx; margin-right: 15rpx;
background-color: #CE0E2D;
border-radius: 50%;
padding: 5rpx;
color: #fff;
height: 30rpx;
width: 30rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 23rpx;
}
.infoTxt {
font-size: 26rpx;
} }
} }
} }
} }
.optionBtn{
.optionBtn {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
.btnCon{
.btnCon {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.btnIcon{
font-size: 30rpx; .optionIcon {
display: flex; width: 100%;
align-items: center; margin-bottom: 10rpx;
justify-content: center;
padding: 10rpx;
}
.shareStyle{
color: #20269B;
font-size: 40rpx;
}
.commonBtn{
background-color: #20269B;
width: 50rpx;
height: 50rpx;
border-radius: 50%;
color: #ffff;
} }
.btnTxt{
.btnTxt {
font-size: 26rpx; font-size: 26rpx;
} }
} }
} }
} }
.descriptionBox { .descriptionBox {
width: 510rpx; width: 510rpx;
padding: 40rpx; padding: 40rpx;
.popupTit{
.popupTit {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -549,52 +828,63 @@ import customSegmentedControl from '@/components/customSegmentedControl/customSe ...@@ -549,52 +828,63 @@ import customSegmentedControl from '@/components/customSegmentedControl/customSe
font-weight: 500; font-weight: 500;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.popupClose{
.popupClose {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
.icon-guanbi{
.icon-guanbi {
font-size: 28rpx; font-size: 28rpx;
} }
} }
.staticItem{
.staticItem {
font-size: 28rpx; font-size: 28rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
.staticIcon{
.staticIcon {
font-size: 30rpx; font-size: 30rpx;
color: #20269B; color: #CE0E2D;
margin-right: 5rpx; margin-right: 5rpx;
} }
} }
.imageBox{
.imageBox {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
.subTit{
.subTit {
font-size: 28rpx; font-size: 28rpx;
color: #919094; color: #919094;
margin: 15rpx 0; margin: 15rpx 0;
font-weight: 400; font-weight: 400;
} }
} }
.codeBox{
.codeBox {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
height: 250rpx; height: 250rpx;
} }
.description{
color: rgba(56, 56, 56, 1);
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
} }
.description {
color: rgba(56, 56, 56, 1);
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
.markBox { .markBox {
position: fixed; position: fixed;
left: 0; left: 0;
...@@ -608,8 +898,10 @@ import customSegmentedControl from '@/components/customSegmentedControl/customSe ...@@ -608,8 +898,10 @@ import customSegmentedControl from '@/components/customSegmentedControl/customSe
justify-content: flex-end; justify-content: flex-end;
z-index: 100000; z-index: 100000;
background: rgba(0, 0, 0, 0.8); background: rgba(0, 0, 0, 0.8);
.guideImgBox { .guideImgBox {
margin: 20px auto; margin: 20px auto;
uni-image { uni-image {
width: 25% !important; width: 25% !important;
position: absolute; position: absolute;
...@@ -617,16 +909,67 @@ import customSegmentedControl from '@/components/customSegmentedControl/customSe ...@@ -617,16 +909,67 @@ import customSegmentedControl from '@/components/customSegmentedControl/customSe
top: 0; top: 0;
} }
} }
.tips { .tips {
margin-top: 30%; margin-top: 30%;
padding: 0 30px; padding: 0 30px;
} }
} }
.tabcontent {
background-color: #fff;
padding: 20rpx;
border-radius: 10rpx;
margin-top: 20rpx;
font-size: 28rpx;
box-sizing: border-box;
.qrBox {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
flex-direction: column;
}
.tabTitle {
margin-bottom: 20rpx;
font-size: 30rpx;
font-weight: 500;
position: relative;
display: inline-block;
}
.tabTitle::before {
content: '';
position: absolute;
left: 0;
bottom: 5rpx;
height: 10rpx;
width: 100%;
background: linear-gradient(to right,
#CE0E2D,
#fff);
z-index: 0;
opacity: .3;
border-radius: 3rpx;
}
.videoBox {
margin-top: 20rpx;
}
.destxt {
margin-bottom: 10rpx;
}
}
} }
::v-deep .my-segmented-control .segmented-control__item .uni-segmented-control__text { ::v-deep .my-segmented-control .segmented-control__item .uni-segmented-control__text {
font-size: 30rpx !important; font-size: 30rpx !important;
} }
</style>
</style> \ No newline at end of file
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
"qrcode": "^1.5.4", "qrcode": "^1.5.4",
"qrcodejs2": "^0.0.2", "qrcodejs2": "^0.0.2",
"uqrcodejs": "^4.0.7", "uqrcodejs": "^4.0.7",
"vite-plugin-top-level-await": "^1.6.0" "vite-plugin-top-level-await": "^1.6.0",
"weixin-js-sdk": "^1.6.5"
}, },
"devDependencies": { "devDependencies": {
"less": "^4.3.0" "less": "^4.3.0"
...@@ -2921,6 +2922,11 @@ ...@@ -2921,6 +2922,11 @@
"node": ">=10.13.0" "node": ">=10.13.0"
} }
}, },
"node_modules/weixin-js-sdk": {
"version": "1.6.5",
"resolved": "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.5.tgz",
"integrity": "sha512-Gph1WAWB2YN/lMOFB/ymb+hbU/wYazzJgu6PMMktCy9cSCeW5wA6Zwt0dpahJbJ+RJEwtTv2x9iIu0U4enuVSQ=="
},
"node_modules/which-module": { "node_modules/which-module": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmmirror.com/which-module/-/which-module-2.0.1.tgz", "resolved": "https://registry.npmmirror.com/which-module/-/which-module-2.0.1.tgz",
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
"qrcode": "^1.5.4", "qrcode": "^1.5.4",
"qrcodejs2": "^0.0.2", "qrcodejs2": "^0.0.2",
"uqrcodejs": "^4.0.7", "uqrcodejs": "^4.0.7",
"vite-plugin-top-level-await": "^1.6.0" "vite-plugin-top-level-await": "^1.6.0",
"weixin-js-sdk": "^1.6.5"
}, },
"devDependencies": { "devDependencies": {
"less": "^4.3.0" "less": "^4.3.0"
......
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
}else if(landingPage == 'sfpIndex'){ }else if(landingPage == 'sfpIndex'){
uni.reLaunch({ url: `/sfp/index/index` }) uni.reLaunch({ url: `/sfp/index/index` })
}else if(landingPage == 'orderStatus'){
uni.reLaunch({ url: `/pages/orderStatus/orderStatus?orderStatus=2` })
} }
} else { } else {
uni.showToast({ uni.showToast({
......
...@@ -174,10 +174,12 @@ ...@@ -174,10 +174,12 @@
<script> <script>
import api from "@/api/api"; import api from "@/api/api";
import courseItem from "@/components/courseItem/courseItem.vue"; import courseItem from "@/components/courseItem/courseItem.vue";
import {apiURL,companyInfo} from "@/environments/environment"; import {apiURL,companyInfo,shareURL} from "@/environments/environment";
import {nextTick} from "vue"; import {nextTick} from "vue";
import common from '../../common/common'; import common from '../../common/common';
import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import dataHandling from "@/util/dataHandling";
import wx from 'weixin-js-sdk'
export default { export default {
components: { components: {
courseItem courseItem
...@@ -229,6 +231,7 @@ ...@@ -229,6 +231,7 @@
}, },
methods: { methods: {
goBack() { goBack() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
...@@ -249,7 +252,8 @@ ...@@ -249,7 +252,8 @@
paymentType: '', paymentType: '',
isPayOrAuth: '', isPayOrAuth: '',
fileId: this.fileId, fileId: this.fileId,
companyType: companyInfo.companyType companyType: companyInfo.companyType,
hiddenPage:'cffpH5Pay'
} }
if (this.paymentMethod == 1) { if (this.paymentMethod == 1) {
// APP:微信app支付 // APP:微信app支付
...@@ -307,6 +311,28 @@ ...@@ -307,6 +311,28 @@
param.paymentType = 2; param.paymentType = 2;
//deviceType:PC为1,移动端为2,微信为3 //deviceType:PC为1,移动端为2,微信为3
if (this.deviceType == 3) { if (this.deviceType == 3) {
// 向小程序通信
// if(dataHandling.h5RuntimeEnv()=='wechat-miniprogram'){
// wx.miniProgram.navigateBack({
// delta:1
// })
// // 向小程序发送消息,只有触发后退,分享,复制的时候小程序才能接收消息
// wx.miniProgram.postMessage({
// data:{
// type:'pay',
// payInfo:param
// }
// })
// console.log('向小程序通信');
// // 跳转到小程序消息接收中转页面,拉起小程序的支付
// // wx.miniProgram.navigateTo({
// // url: `/myPackageA/h5Pay/appYdhomeofficePay?param=${encodeURIComponent(JSON.stringify(param))}`
// // })
// return
// }
let _this = this let _this = this
param.isPayOrAuth = 1; param.isPayOrAuth = 1;
api.wxAuthorize(param).then((res) => { api.wxAuthorize(param).then((res) => {
......
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
<view class="iconfont icon-youjiantou iconColor"></view> <view class="iconfont icon-youjiantou iconColor"></view>
</view> </view>
</view> </view>
<!-- 不是合伙人的角色可以看名片 v-if="customerBasicInfo.userIdentity&&customerBasicInfo.userIdentity!=='PARTNER'" --> <!-- 有名片数据并且是启用状态可以看名片 -->
<!-- <view class="infoBody" v-if="customerBasicInfo.userIdentity&&customerBasicInfo.userIdentity!=='PARTNER'" <view class="infoBody" v-if="showbusinessCard"
style="margin-top: 10rpx;" @click="businessCard()"> style="margin-top: 10rpx;" @click="businessCard()">
<view class=""> <view class="">
我的名片 我的名片
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<view class=""> <view class="">
<view class="iconfont icon-youjiantou iconColor"></view> <view class="iconfont icon-youjiantou iconColor"></view>
</view> </view>
</view> --> </view>
<view class="kuaiBox" v-for="item in mainMenuLists" :key="item.id"> <view class="kuaiBox" v-for="item in mainMenuLists" :key="item.id">
<view class="kuaiTit"> <view class="kuaiTit">
{{item.categoryName}} {{item.categoryName}}
...@@ -184,6 +184,7 @@ ...@@ -184,6 +184,7 @@
export default { export default {
data() { data() {
return { return {
showbusinessCard:false,//是否显示名片
mpCffp:'', mpCffp:'',
showMyName: '', showMyName: '',
msgTotal: 0, msgTotal: 0,
...@@ -401,6 +402,7 @@ ...@@ -401,6 +402,7 @@
restrictedTip restrictedTip
}, },
onShow() { onShow() {
this.showbusinessCard = false
this.loginType = uni.getStorageSync('loginType') this.loginType = uni.getStorageSync('loginType')
if(uni.getStorageSync('mpCffp')){ if(uni.getStorageSync('mpCffp')){
this.mpCffp = uni.getStorageSync('mpCffp') this.mpCffp = uni.getStorageSync('mpCffp')
...@@ -584,7 +586,6 @@ ...@@ -584,7 +586,6 @@
this.bootpage = false this.bootpage = false
}, },
isLogin() { isLogin() {
console.log('11111');
uni.navigateTo({ uni.navigateTo({
url: '/myPackageA/login/login?from=personalCenter' url: '/myPackageA/login/login?from=personalCenter'
}) })
...@@ -839,7 +840,11 @@ ...@@ -839,7 +840,11 @@
api.queryInfo({ userId: uni.getStorageSync('cffp_userId') }).then(res => { api.queryInfo({ userId: uni.getStorageSync('cffp_userId') }).then(res => {
if (res['success']) { if (res['success']) {
this.customerBasicInfo = res['data']; this.customerBasicInfo = res['data'];
if(res['data']['businessCardId']){
// 检查名片状态
this.getBusissedCardStatus(res['data']['businessCardId'])
}
// id=03的权限设置 // id=03的权限设置
// 执行处理 // 执行处理
const result = this.setSpecificMenuIsShow(this.mainMenuLists, this.customerBasicInfo const result = this.setSpecificMenuIsShow(this.mainMenuLists, this.customerBasicInfo
...@@ -891,12 +896,14 @@ ...@@ -891,12 +896,14 @@
).then(res => { ).then(res => {
if (res['success']) { if (res['success']) {
let cardStatus = res.data.data.cardStatus let cardStatus = res.data.data.cardStatus
if (cardStatus == '1') { // 为申请名片的情况,询问过后端,后端说业务已经不考虑这种情况
//未申请名片 // if (cardStatus == '1') {
uni.navigateTo({ // //未申请名片
url: '/myPackageA/noBusinessCard/noBusinessCard' // uni.navigateTo({
}); // url: '/myPackageA/noBusinessCard/noBusinessCard'
} else if (cardStatus == '2') { // });
// }
if (cardStatus == '2') {
// 名片审核中 // 名片审核中
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
...@@ -925,6 +932,22 @@ ...@@ -925,6 +932,22 @@
// url:'/myPackageA/noBusinessCard/noBusinessCard' // url:'/myPackageA/noBusinessCard/noBusinessCard'
// }); // });
}, },
// 查询名片状态
getBusissedCardStatus(businessCardId) {
api.checkBusinessCradStatus(businessCardId).then(res => {
if (res['success']) {
if(businessCardId&&res.data.data.status=='1'){
this.showbusinessCard = true
}
} else {
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
}, },
......
...@@ -55,6 +55,12 @@ ...@@ -55,6 +55,12 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe875;</span>
<div class="name">盾牌,安全,保护</div>
<div class="code-name">&amp;#xe875;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe501;</span> <span class="icon iconfont">&#xe501;</span>
<div class="name">重点人群统计</div> <div class="name">重点人群统计</div>
<div class="code-name">&amp;#xe501;</div> <div class="code-name">&amp;#xe501;</div>
...@@ -516,9 +522,9 @@ ...@@ -516,9 +522,9 @@
<pre><code class="language-css" <pre><code class="language-css"
>@font-face { >@font-face {
font-family: 'iconfont'; font-family: 'iconfont';
src: url('iconfont.woff2?t=1763109218794') format('woff2'), src: url('iconfont.woff2?t=1773642495782') format('woff2'),
url('iconfont.woff?t=1763109218794') format('woff'), url('iconfont.woff?t=1773642495782') format('woff'),
url('iconfont.ttf?t=1763109218794') format('truetype'); url('iconfont.ttf?t=1773642495782') format('truetype');
} }
</code></pre> </code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
...@@ -545,6 +551,15 @@ ...@@ -545,6 +551,15 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon iconfont icon-shield"></span>
<div class="name">
盾牌,安全,保护
</div>
<div class="code-name">.icon-shield
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-zhongdianrenquntongji"></span> <span class="icon iconfont icon-zhongdianrenquntongji"></span>
<div class="name"> <div class="name">
重点人群统计 重点人群统计
...@@ -1239,6 +1254,14 @@ ...@@ -1239,6 +1254,14 @@
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shield"></use>
</svg>
<div class="name">盾牌,安全,保护</div>
<div class="code-name">#icon-shield</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-zhongdianrenquntongji"></use> <use xlink:href="#icon-zhongdianrenquntongji"></use>
</svg> </svg>
<div class="name">重点人群统计</div> <div class="name">重点人群统计</div>
......
@font-face { @font-face {
font-family: "iconfont"; /* Project id 4933433 */ font-family: "iconfont"; /* Project id 4933433 */
src: url('iconfont.woff2?t=1763109218794') format('woff2'), src: url('iconfont.woff2?t=1773642495782') format('woff2'),
url('iconfont.woff?t=1763109218794') format('woff'), url('iconfont.woff?t=1773642495782') format('woff'),
url('iconfont.ttf?t=1763109218794') format('truetype'); url('iconfont.ttf?t=1773642495782') format('truetype');
} }
.iconfont { .iconfont {
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-shield:before {
content: "\e875";
}
.icon-zhongdianrenquntongji:before { .icon-zhongdianrenquntongji:before {
content: "\e501"; content: "\e501";
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,6 +6,13 @@ ...@@ -6,6 +6,13 @@
"description": "", "description": "",
"glyphs": [ "glyphs": [
{ {
"icon_id": "18165054",
"name": "盾牌,安全,保护",
"font_class": "shield",
"unicode": "e875",
"unicode_decimal": 59509
},
{
"icon_id": "6008410", "icon_id": "6008410",
"name": "重点人群统计", "name": "重点人群统计",
"font_class": "zhongdianrenquntongji", "font_class": "zhongdianrenquntongji",
......
...@@ -405,4 +405,42 @@ export default{ ...@@ -405,4 +405,42 @@ export default{
} }
return new Blob([u8arr], { type: mime }); return new Blob([u8arr], { type: mime });
}, },
/**
* 判断 H5 当前运行环境
* @returns {'h5-browser' | 'app' | 'wechat-miniprogram'}
*/
h5RuntimeEnv() {
const ua = navigator.userAgent.toLowerCase();
// 1. 微信小程序 WebView:关键特征是 userAgent 包含 "miniprogram"
// 注意:普通微信浏览器也有 wx 对象,但没有 miniprogram 标识
if (ua.includes('miniprogram')) {
return 'wechat-miniprogram';
}
// 2. uni-app 原生 App:注入了全局 `plus` 对象(DCloud 特有)
// 注意:必须用 typeof 检测,避免在非 App 环境下报错
if (typeof plus !== 'undefined') {
return 'app';
}
// 3. 其他情况:普通浏览器或标准 H5 环境
return 'h5-browser';
},
// 给手机号分隔
formatPhone(phone) {
// 先移除非数字字符(可选,增强健壮性)
const cleaned = ('' + phone).replace(/\D/g, '');
// 匹配 11 位手机号,并分组
const match = cleaned.match(/^(\d{3})(\d{4})(\d{4})$/);
console.log('match',match);
if (match) {
return `${match[1]} ${match[2]} ${match[3]}`;
}
// 如果不是合法 11 位手机号,原样返回或提示错误
return phone;
}
} }
\ No newline at end of file
...@@ -10,6 +10,7 @@ import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; ...@@ -10,6 +10,7 @@ import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
// 页面白名单,不受拦截 // 页面白名单,不受拦截
const whiteList = [ const whiteList = [
'/myPackageA/login/login', '/myPackageA/login/login',
'/myPackageA/businessCard/businessCard',
'/pages/invitationRegister/invitationlogin', '/pages/invitationRegister/invitationlogin',
'/myPackageA/applyFranchise/applyFranchise', '/myPackageA/applyFranchise/applyFranchise',
'/pages/applyFranchise/applyFranchise', '/pages/applyFranchise/applyFranchise',
......
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