|
@@ -39,7 +39,7 @@
|
|
|
<!-- <view class="card-list-item" style="background:red"> -->
|
|
|
<view class="card-list-item"
|
|
|
:style="'background:url('+item.currentBackground+');background-size:100% 100%'">
|
|
|
- <view class="card-content style1" v-if="item.cuttentTemplate==0">
|
|
|
+ <view class="card-content style1" v-if="item.cuttentTemplate==1">
|
|
|
<view class="left">
|
|
|
<u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
|
|
|
shape="circle"></u--image>
|
|
@@ -65,7 +65,7 @@
|
|
|
</view> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="card-content style1 flex-between" v-if="item.cuttentTemplate==1">
|
|
|
+ <view class="card-content style1 flex-between" v-if="item.cuttentTemplate==2">
|
|
|
<view class="right">
|
|
|
<view class="row1">
|
|
|
<text class="name">{{item.name}}</text>
|
|
@@ -93,7 +93,7 @@
|
|
|
height="66px" shape="circle" v-else></u--image>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="card-content style2" v-if="item.cuttentTemplate==2">
|
|
|
+ <view class="card-content style2" v-if="item.cuttentTemplate==3">
|
|
|
<view class="top">
|
|
|
<u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
|
|
|
shape="circle" v-if="item.headSculpture"></u--image>
|
|
@@ -122,7 +122,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="card-content style2" v-if="item.cuttentTemplate==3">
|
|
|
+ <view class="card-content style2" v-if="item.cuttentTemplate==4">
|
|
|
<view class="top">
|
|
|
<view class="row1">
|
|
|
<text class="name">{{item.name}}</text>
|
|
@@ -256,7 +256,7 @@
|
|
|
</u-popup>
|
|
|
<!-- <image :src="poster" style="width: 750rpx;height: 1334rpx;"></image> -->
|
|
|
<!-- 生成图片 -->
|
|
|
- <poster :list="canvasData" background-color="#FFF"
|
|
|
+ <poster :data="canvasData" background-color="#FFF"
|
|
|
:width='750' :height='420'
|
|
|
@on-success="posterSuccess" ref="poster" @on-error="posterError"></poster>
|
|
|
</view>
|
|
@@ -274,7 +274,7 @@
|
|
|
return {
|
|
|
canReset: false,
|
|
|
poster: '',
|
|
|
- canvasData: [],
|
|
|
+ canvasData: {},
|
|
|
searchVal: '',
|
|
|
isShowType: false,
|
|
|
loading: true,
|
|
@@ -292,6 +292,7 @@
|
|
|
delShow: false,
|
|
|
qrcodeShow: false,
|
|
|
unread: 0,
|
|
|
+ clicknum:0,
|
|
|
noticeList: [],
|
|
|
};
|
|
|
},
|
|
@@ -318,7 +319,8 @@
|
|
|
})
|
|
|
},
|
|
|
onShareAppMessage(res) {
|
|
|
- console.log(1111)
|
|
|
+
|
|
|
+ console.log(res,this.popupshow)
|
|
|
let that = this;
|
|
|
//生成名片图片
|
|
|
let imageUrl = this.poster
|
|
@@ -326,9 +328,9 @@
|
|
|
if (res.from === 'button') {
|
|
|
let path = `/pages/cardHolder/scanCodeAddCard?id=${that.currectData.id}`
|
|
|
return {
|
|
|
- title: `${that.currectData.name}分享的名片~`,
|
|
|
+ title: this.popupshow?`${that.currectData.name}分享的名片~`:'电子名片',
|
|
|
path: path,
|
|
|
- imageUrl: imageUrl,
|
|
|
+ imageUrl: this.popupshow?imageUrl:'',
|
|
|
};
|
|
|
}
|
|
|
if (res.from === 'menu') {
|
|
@@ -357,13 +359,15 @@
|
|
|
},
|
|
|
posterError(err) {
|
|
|
console.log(err)
|
|
|
+ uni.hideLoading()
|
|
|
},
|
|
|
posterSuccess(url) {
|
|
|
console.log("hahahah",url)
|
|
|
// 生成成功,会把临时路径在这里返回
|
|
|
this.poster = url;
|
|
|
- this.popupshow=true
|
|
|
+ this.popupshow = true
|
|
|
console.log(url)
|
|
|
+ uni.hideLoading()
|
|
|
},
|
|
|
toHome(item) {
|
|
|
uni.navigateTo({
|
|
@@ -381,10 +385,14 @@
|
|
|
this.qrcodeShow = true
|
|
|
},
|
|
|
share(item) {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
this.currectData = item
|
|
|
- this.canvasData = [{
|
|
|
+ var data = [{
|
|
|
type: 'image',
|
|
|
- path: item.currentBackground,
|
|
|
+ path: this.currectData.currentBackground,
|
|
|
use:'bg',
|
|
|
x: -10,
|
|
|
y: 0,
|
|
@@ -393,7 +401,7 @@
|
|
|
},
|
|
|
{
|
|
|
type: 'image',
|
|
|
- path: item.headSculpture,
|
|
|
+ path: this.currectData.headSculpture,
|
|
|
shape: 'circle',
|
|
|
use:'head',
|
|
|
x: 30,
|
|
@@ -403,46 +411,46 @@
|
|
|
},
|
|
|
{
|
|
|
type: 'text',
|
|
|
- text:item.name,
|
|
|
+ text:this.currectData.name,
|
|
|
use:'name',
|
|
|
x: 150,
|
|
|
y: 50,
|
|
|
- size:26,
|
|
|
+ size:24,
|
|
|
color:'#000'
|
|
|
|
|
|
},
|
|
|
{
|
|
|
type: 'text',
|
|
|
- text:item.post,
|
|
|
+ text:this.currectData.post,
|
|
|
use:'post',
|
|
|
x: 240,
|
|
|
y: 55,
|
|
|
- size:20,
|
|
|
+ size:18,
|
|
|
color:'#666666'
|
|
|
|
|
|
},
|
|
|
{
|
|
|
type: 'text',
|
|
|
- text:item.companyName,
|
|
|
+ text:this.currectData.companyName,
|
|
|
use:'companyName',
|
|
|
x: 150,
|
|
|
y: 95,
|
|
|
- size:20,
|
|
|
+ size:18,
|
|
|
color:'#000'
|
|
|
|
|
|
},
|
|
|
{
|
|
|
type: 'image',
|
|
|
- path: '../../static/imgs/card/address2.png',
|
|
|
+ path: '../../static/imgs/card/address1.png',
|
|
|
use:'address-icon',
|
|
|
x: 145,
|
|
|
- y: 125,
|
|
|
- width: 30,
|
|
|
- height: 28
|
|
|
+ y: 130,
|
|
|
+ width: 15,
|
|
|
+ height: 20
|
|
|
},
|
|
|
{
|
|
|
type: 'textarea',
|
|
|
- text:item.province+item.city+item.area+item.detailedAddress,
|
|
|
+ text:this.currectData.province+this.currectData.city+this.currectData.area+this.currectData.detailedAddress,
|
|
|
lineSpace:1,
|
|
|
width:320,
|
|
|
use:'address',
|
|
@@ -453,16 +461,16 @@
|
|
|
},
|
|
|
{
|
|
|
type: 'image',
|
|
|
- path: '../../static/imgs/card/phone.png',
|
|
|
+ path: '../../static/imgs/card/phone1.png',
|
|
|
use:'phone-icon',
|
|
|
x: 145,
|
|
|
- y: 160,
|
|
|
- width: 26,
|
|
|
- height: 26
|
|
|
+ y: 163,
|
|
|
+ width: 16,
|
|
|
+ height: 16
|
|
|
},
|
|
|
{
|
|
|
type: 'text',
|
|
|
- text:item.phone,
|
|
|
+ text:this.currectData.phone,
|
|
|
use:'phone',
|
|
|
x: 175,
|
|
|
y: 167,
|
|
@@ -471,20 +479,20 @@
|
|
|
},
|
|
|
{
|
|
|
type: 'image',
|
|
|
- path: '../../static/imgs/card/remark.png',
|
|
|
+ path: '../../static/imgs/card/remark1.png',
|
|
|
use:'remark-icon',
|
|
|
x: 145,
|
|
|
- y: 190,
|
|
|
- width: 30,
|
|
|
- height: 30
|
|
|
+ y: 197,
|
|
|
+ width: 13,
|
|
|
+ height: 16
|
|
|
},
|
|
|
{
|
|
|
type: 'textarea',
|
|
|
- text:item.remark?item.remark:'单击添加备注',
|
|
|
+ text:this.currectData.remark?this.currectData.remark:'单击添加备注',
|
|
|
use:'remark',
|
|
|
lineSpace:2,
|
|
|
width:200,
|
|
|
- x: 180,
|
|
|
+ x: 175,
|
|
|
y: 200,
|
|
|
size:13,
|
|
|
color:'#000'
|
|
@@ -518,8 +526,8 @@
|
|
|
},
|
|
|
{
|
|
|
type: 'text',
|
|
|
- text:item.classifyName?item.classifyName:'默',
|
|
|
- use:'phone',
|
|
|
+ text:this.currectData.classifyName?this.currectData.classifyName:'默',
|
|
|
+ use:'classify',
|
|
|
x: 145,
|
|
|
y: 263,
|
|
|
size:34,
|
|
@@ -534,9 +542,92 @@
|
|
|
width: 33,
|
|
|
height: 28
|
|
|
},
|
|
|
-
|
|
|
]
|
|
|
- // this.popupshow = true
|
|
|
+ console.log(this.currectData.cuttentTemplate,111111)
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
+ switch (this.currectData.cuttentTemplate) {
|
|
|
+ case '2':
|
|
|
+ if(data[i].use==='name'
|
|
|
+ ||data[i].use==='companyName'
|
|
|
+ ||data[i].use==='address-icon'
|
|
|
+ ||data[i].use==='phone-icon'
|
|
|
+ ||data[i].use==='remark-icon'){
|
|
|
+ data[i].x=30
|
|
|
+ }
|
|
|
+ if(data[i].use==='post'){
|
|
|
+ data[i].x=100
|
|
|
+ }
|
|
|
+ if(data[i].use==='address'
|
|
|
+ ||data[i].use==='phone'
|
|
|
+ ||data[i].use==='remark'){
|
|
|
+ data[i].x=60
|
|
|
+ }
|
|
|
+ if(data[i].use=='head'){
|
|
|
+ data[i].x=370
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case '3':
|
|
|
+ if(data[i].use==='name'){
|
|
|
+ data[i].x=30
|
|
|
+ data[i].y=150
|
|
|
+ }
|
|
|
+ if(data[i].use==='companyName'){
|
|
|
+ data[i].x=30
|
|
|
+ data[i].y=180
|
|
|
+ }
|
|
|
+ if(data[i].use==='post'){
|
|
|
+ data[i].x=100
|
|
|
+ data[i].y=153
|
|
|
+ }
|
|
|
+ if(data[i].use==='address-icon'
|
|
|
+ ||data[i].use==='phone-icon'
|
|
|
+ ||data[i].use==='remark-icon'){
|
|
|
+ data[i].x=170
|
|
|
+ }
|
|
|
+ if(data[i].use==='address-icon'){data[i].y=150}
|
|
|
+ if(data[i].use==='address'){data[i].y=155;data[i].width=300}
|
|
|
+ if(data[i].use==='phone-icon'){data[i].y=180}
|
|
|
+ if(data[i].use==='phone'){data[i].y=183}
|
|
|
+ if(data[i].use==='remark-icon'){data[i].y=210}
|
|
|
+ if(data[i].use==='remark'){data[i].y=212}
|
|
|
+ if(data[i].use==='address'
|
|
|
+ ||data[i].use==='phone'
|
|
|
+ ||data[i].use==='remark'){
|
|
|
+ data[i].x=190
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case '4':
|
|
|
+ if(data[i].use==='name'
|
|
|
+ ||data[i].use==='companyName'){
|
|
|
+ data[i].x=30
|
|
|
+ }
|
|
|
+ if(data[i].use==='companyName'){
|
|
|
+ data[i].y=90
|
|
|
+ }
|
|
|
+ if(data[i].use==='post'){
|
|
|
+ data[i].x=100
|
|
|
+ }
|
|
|
+ if(data[i].use=='head'){
|
|
|
+ data[i].x=25
|
|
|
+ data[i].y=120
|
|
|
+ }
|
|
|
+ if(data[i].use==='address-icon'
|
|
|
+ ||data[i].use==='phone-icon'
|
|
|
+ ||data[i].use==='remark-icon'){
|
|
|
+ data[i].x=170
|
|
|
+ }
|
|
|
+ if(data[i].use==='address'){data[i].width=300}
|
|
|
+ if(data[i].use==='address'
|
|
|
+ ||data[i].use==='phone'
|
|
|
+ ||data[i].use==='remark'){
|
|
|
+ data[i].x=190
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.canvasData= {clicknum:this.clicknum++,list:data}
|
|
|
+
|
|
|
},
|
|
|
async delConfirm() {
|
|
|
uni.showLoading({
|