Commit 3a798a5e by yuzhenWang

修改我的名片分享没有图标

parent c530ef58
...@@ -36,11 +36,13 @@ ...@@ -36,11 +36,13 @@
</view> </view>
<view class="introductContent"> <view class="introductContent">
<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">
<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>
</view> </view>
</view> </view>
</view> </view>
...@@ -244,7 +246,7 @@ ...@@ -244,7 +246,7 @@
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';
import wx from 'weixin-js-sdk'
export default { export default {
name: 'businessCard', name: 'businessCard',
components: { components: {
...@@ -418,17 +420,19 @@ ...@@ -418,17 +420,19 @@
title: ` ${this.cardInfo.userName}| ${this.cardInfo.companyInfoList[0].position} - ${this.cardInfo.companyInfoList[0].companyName}`, title: ` ${this.cardInfo.userName}| ${this.cardInfo.companyInfoList[0].position} - ${this.cardInfo.companyInfoList[0].companyName}`,
desc: '​AI普惠型新家办领创家庭财事治理蓝海生态', desc: '​AI普惠型新家办领创家庭财事治理蓝海生态',
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/suplogo.png`, //图片 imgUrl: `${shareURL}/static/suplogo.png`, //图片
} }
var url = window.location.href.split('#')[0] var url = window.location.href.split('#')[0]
hshare(data, url) hshare(data, url)
}, },
// 分享状态下获取名片信息 // 分享状态下获取名片信息
getShareCard() { getShareCard() {
console.log('获取分享名片');
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 || '暂无'
...@@ -438,11 +442,12 @@ ...@@ -438,11 +442,12 @@
this.infoList[0].value = '暂无' 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 || 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()
} }
console.log('cardInfo',this.cardInfo);
} else { } else {
uni.showToast({ uni.showToast({
title: res['message'], title: res['message'],
...@@ -469,7 +474,7 @@ ...@@ -469,7 +474,7 @@
this.infoList[0].value = '暂无' 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 || null
this.infoList[2].value = this.cardInfo.address || '暂无' this.infoList[2].value = this.cardInfo.address || '暂无'
// this.cardInfo.companyInfoList = [ // this.cardInfo.companyInfoList = [
// {companyName:'上海律宝科技有限公司',position:'副总经理'}, // {companyName:'上海律宝科技有限公司',position:'副总经理'},
...@@ -553,7 +558,19 @@ ...@@ -553,7 +558,19 @@
if (dataHandling.h5RuntimeEnv() !== 'miniprogram') { if (dataHandling.h5RuntimeEnv() !== 'miniprogram') {
this.getshareData() this.getshareData()
} }
// if(dataHandling.h5RuntimeEnv() == 'miniprogram'){
// let 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}/myPackageA/static/images/suplogo.png`, //图片
// }
// // 这里应该给小程序的webview发消息,不知道该怎样发送?此时
// wx.miniProgram.navigateTo({
// url: `/myPackageA/h5Pay/appYdhomeofficePay?param=${encodeURIComponent(JSON.stringify(param))}`
// })
// }
} }
}, },
//关闭登录 //关闭登录
......
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