高敬炎 2 lat temu
rodzic
commit
4fbafa7ab1

+ 18 - 6
xiaochengxu/components/zhangyuhao-poster/Poster.vue

@@ -80,6 +80,7 @@ list参数说明:
 			drawPathQueue(newVal, oldVal) {
 				// 绘制单行文字
 				const fillText = (textOptions) => {
+					console.log(textOptions)
 					this.ctx.setFillStyle(textOptions.color)
 					this.ctx.setFontSize(textOptions.size)
 					this.ctx.setTextBaseline(textOptions.textBaseline || 'top')
@@ -93,9 +94,10 @@ list参数说明:
 					tempOptions.lineSpace = tempOptions.lineSpace ? tempOptions.lineSpace : 10;
 					// 获取字符串
 					let str = textOptions.text;
+					console.log()
 					// 计算指定高度可以输出的最大行数
-					let lineCount = Math.floor((tempOptions.height + tempOptions.lineSpace) / (tempOptions.size +
-						tempOptions.lineSpace))
+					// let lineCount = Math.floor((tempOptions.height + tempOptions.lineSpace) / (tempOptions.size +
+					// 	tempOptions.lineSpace))
 					// 初始化单行宽度
 					let lineWidth = 0;
 					let lastSubStrIndex = 0; //每次开始截取的字符串的索引
@@ -119,10 +121,9 @@ list参数说明:
 							drawArr.push(text)
 						}
 					}
-
-					if (drawArr.length > lineCount) {
+					if (drawArr.length > tempOptions.lineSpace) {
 						// 超出最大行数
-						drawArr.length = lineCount;
+						drawArr.length = tempOptions.lineSpace;
 						let pointWidth = this.ctx.measureText('...').width;
 						let wordWidth = 0;
 						let wordArr = drawArr[drawArr.length - 1].split("");
@@ -169,6 +170,7 @@ list参数说明:
 									/* 图片绘制 */
 									if (current.type === 'image') {
 										console.log('绘制图片:' + current.path);
+										console.log(current.area)
 										if (current.area) {
 											// 绘制绘图区域
 											this.ctx.save()
@@ -207,6 +209,7 @@ list参数说明:
 											this.ctx.closePath();
 											this.ctx.restore(); // 恢复之前保存的上下文
 										} else {
+											console.log(3333,current)
 											this.ctx.drawImage(current.path, current.x, current.y, current.width, current
 												.height)
 										}
@@ -253,6 +256,14 @@ list参数说明:
 			create() {
 				this.generateImg()
 			},
+			/**
+				 * 图片圆角设置
+				 * @param string x x轴位置
+				 * @param string y y轴位置
+				 * @param string w 图片宽
+				 * @param string y 图片高
+				 * @param string r 圆角值
+				 */
 			generateImg() {
 				console.log('generateimg')
 				this.counter = this.list.length
@@ -260,9 +271,10 @@ list参数说明:
 				/* 将图片路径取出放入绘图队列 */
 				for (let i = 0; i < this.list.length; i++) {
 					let current = this.list[i]
+					console.log(this.list[i])
 					current.index = i
 					/* 如果是文本直接放入队列 */
-					if (current.type === 'text' || current.type === 'textarea') {
+					if (current.type === 'text' || current.type === 'textarea' || current.type === 'image' && current.use !== 'bg' && current.use !== 'head') {
 						this.drawPathQueue.push(current)
 						continue
 					}

+ 154 - 12
xiaochengxu/pages/cardHolder/cardHolder.vue

@@ -133,6 +133,7 @@
 		<!-- <image :src="poster" style="width: 750rpx;height: 1334rpx;"></image> -->
 		<!-- 生成图片 -->
 		<poster :list="canvasData" background-color="#FFF"
+		:width='750' :height='420'
 			@on-success="posterSuccess" ref="poster" @on-error="posterError"></poster>
 	</view>
 </template>
@@ -218,6 +219,9 @@
 			};
 		},
 		methods: {
+			handleHiddenShare(){
+				this.popupshow=false
+			},
 			posterError(err) {
 			                console.log(err)
 			            },
@@ -225,6 +229,7 @@
 							console.log("hahahah",url)
 			                // 生成成功,会把临时路径在这里返回
 			                this.poster = url;
+							this.popupshow=true
 			                console.log(url)
 			            },
 			toHome(item) {
@@ -234,6 +239,7 @@
 			},
 			delSearchVal() {
 				this.searchVal = ""
+				uni.removeStorageSync('search_val')
 				this.mescroll.resetUpScroll()
 			},
 			toUrl() {
@@ -241,24 +247,160 @@
 				this.popupshow = false
 				this.qrcodeShow = true
 			},
-			share(item) {debugger
+			share(item) {
 				this.currectData = item
 				this.canvasData = [{
 						type: 'image',
 						path: item.currentBackground,
-						x: 0,
+						use:'bg',
+						x: -10,
 						y: 0,
-						width: 750,
-						height: 424
+						width: 530,
+						height: 325
+					},
+					{
+						type: 'image',
+						path: item.headSculpture,
+						shape: 'circle',
+						use:'head',
+						x: 30,
+						y: 30,
+						width: 100,
+						height: 100
+					},
+					{
+						type: 'text',
+						text:item.name,
+						use:'name',
+						x: 150,
+						y: 50,
+						size:26,
+						color:'#000'
+						
+					},
+					{
+						type: 'text',
+						text:item.post,
+						use:'post',
+						x: 240,
+						y: 55,
+						size:20,
+						color:'#666666'
+						
+					},
+					{
+						type: 'text',
+						text:item.companyName,
+						use:'companyName',
+						x: 150,
+						y: 95,
+						size:20,
+						color:'#000'
+						
+					},
+					{
+						type: 'image',
+						path: '../../static/imgs/card/address2.png',
+						use:'address-icon',
+						x: 145,
+						y: 125,
+						width: 30,
+						height: 28
+					},
+					{
+						type: 'textarea',
+						text:item.province+item.city+item.area+item.detailedAddress,
+						lineSpace:1,
+						width:320,
+						use:'address',
+						x: 175,
+						y: 135,
+						size:14,
+						color:'#000'
+					},
+					{
+						type: 'image',
+						path: '../../static/imgs/card/phone.png',
+						use:'phone-icon',
+						x: 145,
+						y: 160,
+						width: 26,
+						height: 26
+					},
+					{
+						type: 'text',
+						text:item.phone,
+						use:'phone',
+						x: 175,
+						y: 167,
+						size:14,
+						color:'#000'
+					},
+					{
+						type: 'image',
+						path: '../../static/imgs/card/remark.png',
+						use:'remark-icon',
+						x: 145,
+						y: 190,
+						width: 30,
+						height: 30
+					},
+					{
+						type: 'textarea',
+						text:item.remark?item.remark:'单击添加备注',
+						use:'remark',
+						lineSpace:2,
+						width:200,
+						x: 180,
+						y: 200,
+						size:13,
+						color:'#000'
+					},
+					{
+						type: 'image',
+						path: '../../static/imgs/card/bg3.png',
+						use:'bg1',
+						x: 0,
+						y: 243,
+						width: 370,
+						height: 67
+					},
+					{
+						type: 'image',
+						path: '../../static/imgs/card/bg4.png',
+						use:'bg2',
+						x: 355,
+						y: 243,
+						width: 150,
+						height: 67
+					},
+					{
+						type: 'image',
+						path: '../../static/imgs/card/home.png',
+						use:'home',
+						x: 65,
+						y: 260,
+						width: 33,
+						height: 33
+					},
+					{
+						type: 'text',
+						text:item.classifyName?item.classifyName:'默',
+						use:'phone',
+						x: 145,
+						y: 263,
+						size:34,
+						color:'#fff'
+					},
+					{
+						type: 'image',
+						path: '../../static/imgs/card/share.png',
+						use:'share',
+						x: 235,
+						y: 263,
+						width: 33,
+						height: 28
 					},
-					// {
-					// 	type: 'text',
-					// 	text:item.name,
-					// 	x: 0,
-					// 	y: 0,
-					// 	size:13
-					// },
-					
 				]
 				// this.popupshow = true
 			},

+ 100 - 36
xiaochengxu/pages/mySet/myHome.vue

@@ -4,7 +4,7 @@
 			<u-swiper :list="fileList" 
 			autoplay
 			imgMode='aspectFit'
-			height='280'
+			height='260'
 		    @change="e => current = e.current" @click="click">
 				<view slot="indicator" class="indicator">
 					<view
@@ -23,48 +23,80 @@
 		></u-skeleton> -->
 		<view class="top" v-else>
 			
+		</view>
+		<view class="company-title row flex flex-between line" >
+			<view class='title' v-if='!editstatus'>{{companyData.companyName}}</view>
+			<view v-if='!editstatus' style='width:50px;' class='button flex align-item-center' @click='edit'>
+				<image src="../../static/imgs/mySet/edit.png" style='width:26rpx;height:26rpx;' mode=""></image>
+				<view style='margin-left:10rpx;'>编辑</view>
+			</view>
+			<view v-else @click='$u.debounce(buttonsubmit, 500)' class='button'>提交</view>
 		</view>
 		<view class="content1" :class="editstatus?'content1-edit':''">
-			<view class="company-title row flex flex-between line" >
-				<view v-if='editstatus'>公司/机构名称</view>
-				<view class='title' v-else>{{companyData.companyName}}</view>
-			 	<u--input v-if='editstatus' v-model="companyData.companyName"  placeholder="请输入公司名称" border="none" inputAlign='right'></u--input>
-				<view v-if='!editstatus' style='width:50px;' class='button flex align-item-center' @click='edit'>
-					<image src="../../static/imgs/mySet/edit.png" style='width:26rpx;height:26rpx;' mode=""></image>
-					<view style='margin-left:10rpx;'>编辑</view>
-				</view>
-				<view v-else @click='$u.debounce(buttonsubmit, 500)' class='button'>提交</view>
+			<view v-if='editstatus' class="row flex flex-between line" >
+				<view>公司/机构名称</view>
+				<u--input v-model="companyData.companyName"  placeholder="请输入公司名称" border="none" inputAlign='right'></u--input>
 			</view>
 			<view class="intro top-m">
-				<view v-if='editstatus'class="row">公司/机构简介</view>
+				<view v-if='editstatus' class="row">公司/机构简介</view>
+				<view v-else class="title">基本信息</view>
 				<u--textarea v-if='editstatus' v-model="companyData.companyIntroduction" count placeholder="请输入公司/机构简介,不超过1000个字"></u--textarea>
-				<view v-else>{{companyData.companyIntroduction}}</view>
+				
+				<view class='content' v-else>{{companyData.companyIntroduction}}</view>
 			</view>
 			<view class="scope top-m">
-				<view class="row">业务范围</view>
+				<view v-if='editstatus' class="row">业务范围</view>
+				<view v-else class="title">业务范围</view>
 				<u--textarea v-if='editstatus' v-model="companyData.scopeOfBusiness" count placeholder="输入业务范围,不超过500个字"></u--textarea>
-				<view v-else>{{companyData.scopeOfBusiness}}</view>
+				<view class='content' v-else>{{companyData.scopeOfBusiness}}</view>
 			</view>
-				<view class="row flex flex-between line top-m">
-					<view v-if='editstatus'>公司地址</view>
-					<u--input v-if='editstatus' v-model="companyData.companyAddress" placeholder="输入地址" border="none" inputAlign='right'></u--input>
-					<view v-else>{{companyData.companyAddress}}</view>
+			<view class='compInformation' v-if='!editstatus'>
+				<view class="row flex top-m align-item-center">
+					<view class='image-wrap'>
+						<image style='width:24rpx;height:31rpx;'  src="../../static/imgs/mySet/home/address.png" mode=""></image>
+					</view>
+					<view>地址:{{companyData.companyAddress}}</view>
 				</view>
-				<view class="row flex flex-between line top-m">
-					<view v-if='editstatus'>联系电话</view>
-					<u--input v-if='editstatus' v-model="companyData.phone" placeholder="输入联系电话" border="none" inputAlign='right'></u--input>
-					<view v-else>{{companyData.phone}}</view>
+				<view class="row flex top-m align-item-center">
+					<view class='image-wrap'>
+						<image style='width:27rpx;height:28rpx;' src="../../static/imgs/mySet/home/phone.png" mode=""></image>
+					</view>
+					<view>电话:{{companyData.phone}}</view>
 				</view>
-				<view class="row flex flex-between line top-m">
-					<view v-if='editstatus'>传真</view>
-					<u--input v-if='editstatus' v-model="companyData.portraiture" placeholder="输入传真号" border="none" inputAlign='right'></u--input>
-					<view v-else>{{companyData.portraiture}}</view>
+				<view class="row flex top-m align-item-center">
+					<view class='image-wrap'>
+						<image style='width:27rpx;height:28rpx;' src="../../static/imgs/mySet/home/portraiture.png" mode=""></image>
+					</view>
+					<view>座机:{{companyData.portraiture}}</view>
 				</view>
-				<view class="row flex flex-between line top-m">
-					<view v-if='editstatus'>邮箱</view>
-					<u--input v-if='editstatus' v-model="companyData.postbox" placeholder="输入邮箱" border="none" inputAlign='right'></u--input>
-					<view v-else>{{companyData.postbox}}</view>
+				<view class="row flex top-m align-item-center">
+					<view class='image-wrap'>
+						<image style='width:29rpx;height:25rpx;' src="../../static/imgs/mySet/home/postbox.png" mode=""></image>
+					</view>
+					<view>邮箱:{{companyData.postbox}}</view>
 				</view>
+			</view>
+			
+			<view v-if='editstatus' class="row flex flex-between line top-m">
+				<view>公司地址</view>
+				<u--input v-model="companyData.companyAddress" placeholder="输入地址" border="none" inputAlign='right'></u--input>
+			</view>
+				
+			<view v-if='editstatus' class="row flex flex-between line top-m">
+				<view>联系电话</view>
+				<u--input v-model="companyData.phone" placeholder="输入联系电话" border="none" inputAlign='right'></u--input>
+			</view>
+				
+			<view v-if='editstatus' class="row flex flex-between line top-m">
+				<view >传真</view>
+				<u--input v-model="companyData.portraiture" placeholder="输入传真号" border="none" inputAlign='right'></u--input>
+			</view>
+				
+			<view v-if='editstatus' class="row flex flex-between line top-m">
+				<view>邮箱</view>
+				<u--input v-if='editstatus' v-model="companyData.postbox" placeholder="输入邮箱" border="none" inputAlign='right'></u--input>
+			</view>
+			
 			<view v-if='editstatus'>
 				<view class="qyfc">企业风采</view>
 				<!-- <image v-for='item in fileList' :src="item.url" mode=""></image> -->
@@ -75,12 +107,13 @@
 						name="1"
 						multiple
 						:maxCount="10"
-					></u-upload>
+					>
+					<image style='width:24rpx;height:31rpx;'  src="../../static/imgs/mySet/home/address.png" mode=""></image>
+					</u-upload>
 			</view>
 		</view>
 	<view class="footer">
-		<button v-if='!editstatus' @click='edit' class='button' >编辑</button>
-		<button v-else @click='$u.debounce(buttonsubmit, 500)' class='button' type="default">提交</button>
+		<button  v-if='editstatus' @click='$u.debounce(buttonsubmit, 500)' class='button' type="default">提交</button>
 	</view>
 		
 		<u-toast ref="uToast"></u-toast>
@@ -332,8 +365,8 @@
 	.content1{
 		margin: 20rpx 0 120rpx 0;
 		background-color: #fff;
-		border-radius: 20rpx;
-		padding: 20rpx;
+		border-radius: 20rpx 20rpx 0 0;
+		padding:10rpx 20rpx;
 		box-sizing: border-box;
 		.row{
 			padding-bottom: 24rpx;
@@ -351,6 +384,9 @@
 	.content1-edit{
 		position: relative;
 		top: -135rpx;
+		margin: 20rpx 20rpx 120rpx 20rpx;
+		border-radius: 20rpx;
+		padding:20rpx;
 	}
 	.footer{
 		position: fixed;
@@ -365,9 +401,37 @@
 		padding:20rpx;
 		font-size:28rpx;
 	}
+	.company-title{
+		margin:0 20rpx;
+	}
 	.company-title .title{
 		color:#112253;
 		font-size:36rpx;
+		font-weight: bold;
+	}
+	.title{
+		font-size:32rpx;
+		font-weight: bold;
+		color: #1A1A1A;
+		margin-bottom:20rpx;
+	}
+	.content{
+		font-size: 28rpx;
+		font-weight: 500;
+		color: #666666;
+	}
+	.compInformation{
+		margin:20rpx 0;
+		background:#F7F7F7;
+		color:#112253;
+		font-size: 28rpx;
+		font-weight: 500;
+		padding:10rpx 30rpx;
+		border-radius:20rpx;
+	}
+	.image-wrap{
+		width:50rpx;
+		position:relative;
+		top:2rpx;
 	}
-	
 </style>

+ 1 - 1
xiaochengxu/pages/mySet/myInfo.vue

@@ -5,7 +5,7 @@
 				<view class="title-name">
 					{{item.cardBusiness}}
 				</view>
-				<view class="card-list-item" :style="'background:url('+item.currentBackground+');background-size:100% 100%'">
+				<view class="card-list-item" :style="item.currentBackground?'background:url('+item.currentBackground+');background-size:100% 100%':''">
 					<view class="card-content style1" v-if="item.cuttentTemplate==0">
 						<view class="left">
 							<u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px" shape="circle"></u--image>

+ 5 - 5
xiaochengxu/pages/mySet/newCard.vue

@@ -384,31 +384,31 @@
 	}
 
 	.bgc0 {
-		background: url('../../static/1.jpg') no-repeat center;
+		background: url('https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/bgc1.png') no-repeat center;
 		height: 380rpx;
 		border-radius: 20rpx;
 	}
 
 	.bgc1 {
-		background: url('../../static/2.jpg') no-repeat center;
+		background: url('https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/bgc2.png') no-repeat center;
 		height: 380rpx;
 		border-radius: 20rpx;
 	}
 
 	.bgc2 {
-		background: url('../../static/3.jpg') no-repeat center;
+		background: url('https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/bgc3.png') no-repeat center;
 		height: 380rpx;
 		border-radius: 20rpx;
 	}
 
 	.bgc3 {
-		background: url('../../static/4.jpg') no-repeat center;
+		background: url('https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/bgc4.png') no-repeat center;
 		height: 380rpx;
 		border-radius: 20rpx;
 	}
 
 	.bgc4 {
-		background: url('../../static/5.jpg') no-repeat center;
+		background: url('https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/bgc5.png') no-repeat center;
 		height: 380rpx;
 		border-radius: 20rpx;
 	}

BIN
xiaochengxu/static/1.jpg


BIN
xiaochengxu/static/2.jpg


BIN
xiaochengxu/static/3.jpg


BIN
xiaochengxu/static/4.jpg


BIN
xiaochengxu/static/5.jpg


BIN
xiaochengxu/static/imgs/card/address.png


BIN
xiaochengxu/static/imgs/card/bg3.png


BIN
xiaochengxu/static/imgs/card/bg4.png


BIN
xiaochengxu/static/imgs/card/defaulthead.png


BIN
xiaochengxu/static/imgs/card/phone.png


BIN
xiaochengxu/static/imgs/card/remark.png


BIN
xiaochengxu/static/imgs/code.gif


BIN
xiaochengxu/static/imgs/mySet/home/address.png


BIN
xiaochengxu/static/imgs/mySet/home/del.png


BIN
xiaochengxu/static/imgs/mySet/home/phone.png


BIN
xiaochengxu/static/imgs/mySet/home/portraiture.png


BIN
xiaochengxu/static/imgs/mySet/home/postbox.png