Procházet zdrojové kódy

Merge branch 'master' of http://git.zthymaoyi.com/wangchao/businessCard

achao před 2 roky
rodič
revize
f2ab2fe3b0

+ 3 - 1
xiaochengxu/components/zhangyuhao-poster/Poster.vue

@@ -85,6 +85,7 @@ list参数说明:
 
 			},
 			drawPathQueue(newVal, oldVal) {
+				console.log(this.ctx,111111)
 				// 绘制单行文字
 				const fillText = (textOptions) => {
 					console.log(textOptions)
@@ -232,6 +233,7 @@ list参数说明:
 				}
 			},
 			counter(newVal, oldVal) {
+				console.log(newVal)
 				if (newVal === 0) {
 					this.ctx.draw()
 					/* draw完不能立刻转存,需要等待一段时间 */
@@ -272,7 +274,7 @@ list参数说明:
 				 * @param string r 圆角值
 				 */
 			generateImg() {
-				console.log('generateimg')
+				console.log('generateimg',this.drawPathQueue)
 				this.counter = this.list.length
 				this.drawPathQueue = []
 				/* 将图片路径取出放入绘图队列 */

+ 4 - 4
xiaochengxu/pages/cardHolder/cardHolder.vue

@@ -63,7 +63,7 @@
 										height="16px"></u--image>
 									<view class='icon-text'>{{ item.province }}{{ item.city }}{{ item.area }}</view>
 								</view>
-								<view class="row4 flex">
+								<view @click="freeTell(item)" class="row4 flex">
 									<u--image :showLoading="true" src="/static/imgs/card/phone1.png" width="12px"
 										height="13px"></u--image>
 									<view class='icon-text'>{{ item.phone }}</view>
@@ -96,7 +96,7 @@
 										height="16px"></u--image>
 									<view class='icon-text'>{{ item.province }}{{ item.city }}{{ item.area }}</view>
 								</view>
-								<view class="row4 flex">
+								<view @click="freeTell(item)" class="row4 flex">
 									<u--image :showLoading="true" src="/static/imgs/card/phone3.png" width="12px"
 										height="13px"></u--image>
 									<view class='icon-text'>{{ item.phone }}</view>
@@ -144,7 +144,7 @@
 											height="16px"></u--image>
 										<view class='icon-text'>{{ item.province }}{{ item.city }}{{ item.area }}</view>
 									</view>
-									<view class="row2 flex">
+									<view @click="freeTell(item)" class="row2 flex">
 										<u--image :showLoading="true" src="/static/imgs/card/phone1.png" width="12px"
 											height="13px"></u--image>
 										<view class='icon-text'>{{ item.phone }}</view>
@@ -563,7 +563,7 @@
 					},
 					{
 						type: 'image',
-						path: this.currectData.headSculpture,
+						path: this.currectData.headSculpture?this.currectData.headSculpture:'../../static/imgs/card/defaulthead.png',
 						shape: 'circle',
 						use: 'head',
 						x: 30,

+ 2 - 2
xiaochengxu/pages/cardHolder/scanCodeAddCard.vue

@@ -105,7 +105,7 @@
 					cardHolderInfo: JSON.stringify({
 						cardId: this.cardInfo.id,
 						remark: this.cardInfo.remark,
-						cardCommonId: this.cardInfo.cardCommonId,
+						cardCommonId: this.commonId,
 						myCardId: this.cardInfo.myCardId,
 						commonId: uni.getStorageSync("userInfo").id,
 						classify: this.cardInfo.classify
@@ -158,7 +158,7 @@
 					console.log(res,"this.cardInfo")
 					this.cardInfo = res.data
 					this.cardInfo.cardBusiness=''
-					this.cardInfo.cardCommonId = res.data.commonId
+					// this.cardInfo.cardCommonId = res.data.commonId
 					console.log(res)
 				})
 				console.log(uni.getStorageSync("userInfo").id,111111)

+ 16 - 4
xiaochengxu/pages/circle/circle.vue

@@ -40,10 +40,10 @@
 					</view>
 					<view class="right">
 						<view class="top">{{item.circleName}}({{item.cardNum}})</view>
-						<view class="bottom">
-							<span v-for="item1 in item.circleLabel.split(',')" class="text">
+						<view style='flex-wrap: wrap;' class="bottom flex">
+							<view v-for="item1 in item.circleLabelArray" class="text">
 								{{item1}}
-							</span>
+							</view>
 						</view>
 					</view>
 				</view>
@@ -161,6 +161,17 @@
 					// this.makeData(res.data)
 					if (page.num == 1) this.circleList = []; //如果是第一页需手动置空列表
 					this.circleList = this.circleList.concat(curPageData); //追加新数据
+					for (let i = 0; i < this.circleList.length; i++) {
+						if(this.circleList[i].circleLabel){
+							if(this.circleList[i].circleLabel.split(',').length>=3){
+								var arr=this.circleList[i].circleLabel.split(',')
+								console.log(arr)
+								this.circleList[i].circleLabelArray=arr.filter((item,index)=>{return index<=2})
+							}else{
+								this.circleList[i].circleLabelArray=this.circleList[i].circleLabel.split(',')
+							}
+						}
+					}
 					for (let i = 0; i < this.circleList.length; i++) {
 						if (this.circleList[i].addedFlag == 0) {
 							if (i == 0) {
@@ -177,6 +188,7 @@
 							return
 						}
 					}
+					
 				})
 			},
 			input(res) {
@@ -306,7 +318,7 @@
 					font-weight: 700;
 					color: #666666;
 					padding: 10rpx 20rpx;
-					margin-right: 10rpx;
+					margin:0px 10rpx 10rpx 0;
 				}
 			}
 		}

+ 12 - 0
xiaochengxu/pages/circle/createCirclce.vue

@@ -64,6 +64,18 @@
 				labelList: [{
 						labelName: '',
 					},
+					{
+						labelName: '',
+					},
+					{
+						labelName: '',
+					},
+					{
+						labelName: '',
+					},
+					{
+						labelName: '',
+					},
 					{
 						labelName: '',
 					}

+ 27 - 11
xiaochengxu/pages/circle/detail.vue

@@ -6,19 +6,19 @@
 					<image :src="dataObj.circleHead?dataObj.circleHead:'../../static/imgs/mySet/ewm.png'" mode="widthFix" class="img"></image>
 				</view>
 				<view class="right">
-					<view class="top flex flex-between">
-						<span class="text">
+					<view  class="top flex flex-between">
+						<view class="text">
 							{{dataObj.circleName}}({{dataObj.cardNum}})
-						</span>
+						</view>
 						<span class="join" @click="$u.debounce(addCircle, 500)" v-if="!dataObj.circleCardInfo">
 							<uni-icons type="plusempty" size="12" color="#fff"
 								style="margin:0 10rpx;font-weight: bold;"></uni-icons>加入
 						</span>
-						<span class="join" @click="$u.debounce(exitCircle, 500)" v-else>
+						<span class="join" @click="exitCircle" v-else>
 							退出
 						</span>
 					</view>
-					<view class="bottom flex">
+					<view style='flex-wrap: wrap;' class="bottom flex">
 						<view v-for="item in dataObj.circleLabel" class="text">
 							{{item}}
 						</view>
@@ -39,7 +39,7 @@
 				</view>
 			</view>
 		</view>
-		<view  class="relative" style='top:136px;'>
+		<view  class="relative" style='top:150px;'>
 			<mescroll-uni height='1200' ref="mescrollRef" @init="mescrollInit" @up="upCallback" @down="downCallback" >
 			<view class="content3" v-for="(item,index) in changeCardList"
 				:style="item.currentBackground?'background:url('+item.currentBackground+');background-size:100% 100%':''"
@@ -47,7 +47,7 @@
 				<view class="flex item">
 					<view class="top flex">
 						<view class="left">
-							<u--image src="https://cdn.uviewui.com/uview/album/1.jpg" shape="circle" width="66px"
+							<u--image :src="item.headSculpture?item.headSculpture:'https://cdn.uviewui.com/uview/album/1.jpg'" shape="circle" width="66px"
 								height="66px"></u--image>
 						</view>
 						<view class="right">
@@ -86,6 +86,8 @@
 		<u-toast ref="uToast"></u-toast>
 		<u-modal :show="show" :content='content' @confirm="$u.debounce(joinCircle, 500)" showCancelButton
 			@cancel="show=false" @close="show=false" closeOnClickOverlay></u-modal>
+		<u-modal :show="show1" content='确定退出圈子' @confirm="$u.debounce(exitCircleConfirm, 500)" showCancelButton
+			@cancel="show1=false" @close="show1=false" closeOnClickOverlay></u-modal>
 		<u-modal :show="isShowChangeCard" content='确定交换名片?' @confirm="$u.debounce(confirmChangeSubmit, 500)"
 			showCancelButton @cancel="isShowChangeCard=false" @close="isShowChangeCard=false"
 			closeOnClickOverlay></u-modal>
@@ -100,6 +102,7 @@
 			return {
 				selectIndex: 0,
 				isShowChangeCard: false,
+				show1:false,
 				dataObj: {
 					circleName: '',
 					cardNum: '',
@@ -203,6 +206,10 @@
 				})
 			},
 			exitCircle() {
+				console.log(11111)
+				this.show1=true
+			},
+			exitCircleConfirm(){
 				this.$request.baseRequest('admin.unimall.circleCardInfo', 'delete', {
 					id: this.dataObj.circleCardInfo.id,
 				}, failres => {
@@ -214,6 +221,7 @@
 					uni.hideLoading()
 				}).then(res => {
 					this.isShowCard = false
+					this.show1=false
 					this.$refs.uToast.show({
 						type: 'success',
 						message: "退出成功!",
@@ -337,9 +345,17 @@
 				this.getCardList(page)
 			},
 			changeCard(val) {
-				this.selectRowCard = val
-				this.swapNameCards = true
-				this.isShowCard = true
+				if(!this.dataObj.circleCardInfo){
+					this.$refs.uToast.show({
+						type: 'error',
+						message: '请先加入圈子!',
+					})
+				}else{
+					this.selectRowCard = val
+					this.swapNameCards = true
+					this.isShowCard = true
+				}
+				
 
 			},
 		}
@@ -390,7 +406,7 @@
 					color: #ffffff50;
 					background: #f1f5ff20;
 					padding: 10rpx 20rpx;
-					margin-right: 10rpx;
+					margin:0 10rpx 10rpx 0;
 					border-radius: 10rpx;
 					font-size: 26rpx;
 

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

@@ -321,7 +321,7 @@
 					},
 					{
 						type: 'image',
-						path: this.currectData.headSculpture,
+						path: this.currectData.headSculpture?this.currectData.headSculpture:'../../static/imgs/card/defaulthead.png',
 						shape: 'circle',
 						use: 'head',
 						x: 30,

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

@@ -204,7 +204,7 @@
 					},
 					{
 						type: 'image',
-						path: this.currectData.headSculpture,
+						path: this.currectData.headSculpture?this.currectData.headSculpture:'../../static/imgs/card/defaulthead.png',
 						shape: 'circle',
 						use: 'head',
 						x: 30,

+ 8 - 4
xiaochengxu/pages/mySet/newCard.vue

@@ -7,7 +7,7 @@
 			<view class="absolute card-content style1" v-if="imgList[selectIndex].dictSort==1">
 				<view class="left">
 					<u--image :showLoading="true" :src="cardInfo.headSculpture" width="66px" height="66px" shape="circle" v-if="cardInfo.headSculpture"></u--image>
-					<u--image :showLoading="true" src="/./../static/imgs/card/defaulthead.png" width="66px" height="66px" shape="circle" v-else></u--image>
+					<u--image :showLoading="true" src="../../static/imgs/card/defaulthead.png" width="66px" height="66px" shape="circle" v-else></u--image>
 				</view>
 				<view class="right">
 					<view class="row1">
@@ -61,13 +61,13 @@
 				</view>
 				<view class="left">
 					<u--image :showLoading="true" :src="cardInfo.headSculpture" width="66px" height="66px" shape="circle" v-if="cardInfo.headSculpture"></u--image>
-					<u--image :showLoading="true" src="/./../static/imgs/card/defaulthead.png" width="66px" height="66px" shape="circle" v-else></u--image>
+					<u--image :showLoading="true" src="../../static/imgs/card/defaulthead.png" width="66px" height="66px" shape="circle" v-else></u--image>
 				</view>
 			</view>
 			<view class="absolute card-content style2" v-if="imgList[selectIndex].dictSort==3">
 					<view class="top">
 						<u--image :showLoading="true" :src="cardInfo.headSculpture" width="66px" height="66px" shape="circle" v-if="cardInfo.headSculpture"></u--image>
-						<u--image :showLoading="true" src="/./../static/imgs/card/defaulthead.png" width="66px" height="66px" shape="circle" v-else></u--image>
+						<u--image :showLoading="true" src="../../static/imgs/card/defaulthead.png" width="66px" height="66px" shape="circle" v-else></u--image>
 					</view>
 					<view class="bottom flex">
 						<view class="left">
@@ -112,7 +112,7 @@
 					<view class="bottom flex">
 						<view class="left">
 						<u--image :showLoading="true" :src="cardInfo.headSculpture" width="66px" height="66px" shape="circle" v-if="cardInfo.headSculpture"></u--image>
-						<u--image :showLoading="true" src="/./../static/imgs/card/defaulthead.png" width="66px" height="66px" shape="circle" v-else></u--image>
+						<u--image :showLoading="true" src="../../static/imgs/card/defaulthead.png" width="66px" height="66px" shape="circle" v-else></u--image>
 						</view>
 						<view class="right">
 							<view class="row1 flex">
@@ -363,6 +363,10 @@
 				})
 			},
 			confirmSubmit() {
+				uni.showLoading({
+					title: '加载中',
+					mask: true
+				})
 				this.$request.baseRequest('admin.unimall.cardManagementInfo', 'add', {
 					cardManagementInfo: JSON.stringify(this.cardInfo)
 				}, failres => {