Jelajahi Sumber

修改名片加样式

achao 2 tahun lalu
induk
melakukan
0c4de5d4d5

+ 131 - 112
xiaochengxu/pages/cardHolder/cardHolder.vue

@@ -27,22 +27,24 @@
 				</view>
 			</view>
 
-			<view :style='cardHolderList.length>0?"padding:20rpx 20rpx 200rpx 20rpx;":"padding:20rpx 20rpx 20rpx 20rpx;"' class="content2">
+			<view
+				:style='cardHolderList.length>0?"padding:20rpx 20rpx 200rpx 20rpx;":"padding:20rpx 20rpx 20rpx 20rpx;"'
+				class="content2">
 				<view class="all-type flex" @click="selectType">
-					<text>{{typeName?typeName:'全部分类'}}</text>
+					<text style="margin-right: 10rpx;">{{typeName?typeName:'全部分类'}}</text>
 					<uni-icons type="bottom" size="18" color="#fff"></uni-icons>
 				</view>
 			</view>
 		</view>
-		
-		<view :style='cardHolderList.length>0?"top:376rpx;":"top:276rpx;"' class="content3">
+		<!-- :style='cardHolderList.length>0?"top:376rpx;":"top:276rpx;"' -->
+		<view class="content3 relative" style="top: 380rpx;">
 
-			<mescroll-body v-if='cardHolderList' :up="upOption" :down="downOption" ref="mescrollRef"
-				@init="mescrollInit" @up="upCallback" @down="downCallback">
+			<mescroll-uni v-if='cardHolderList' :up="upOption" :down="downOption" ref="mescrollRef" @init="mescrollInit"
+				@up="upCallback" @down="downCallback" height="1060">
 				<view v-for='(item,index) in cardHolderList' @longpress="longpress" class="item flex">
 					<!-- <view class="card-list-item" style="background:red"> -->
 					<view class="card-list-item"
-						:style="'background:url('+item.currentBackground+');background-size:100% 100%'">
+						:style="'background: url('+item.currentBackground+');background-size:100% 100%'">
 						<view class="card-content style1" v-if="item.cuttentTemplate==1">
 							<view class="left">
 								<u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
@@ -69,7 +71,8 @@
 								<view @click='remarkEdit(item)' class="row2 flex" style="color: #808080">
 									<u--image :showLoading="true" src="/static/imgs/card/remark1.png" width="10px"
 										height="12px"></u--image>
-									<view class='icon-text'>{{item.remark?item.remark:'单击添加备注'}}</view>
+									<view class='icon-text' style="color: #808080;">{{item.remark?item.remark:'单击添加备注'}}
+									</view>
 								</view>
 							</view>
 							<u-checkbox-group v-if='islongPress' placement="column"
@@ -101,7 +104,8 @@
 								<view @click='remarkEdit(item)' class="row2 flex" style="color: #808080">
 									<u--image :showLoading="true" src="/static/imgs/card/remark3.png" width="10px"
 										height="12px"></u--image>
-									<view class='icon-text'>{{item.remark?item.remark:'单击添加备注'}}</view>
+									<view class='icon-text' style="color: #808080;">{{item.remark?item.remark:'单击添加备注'}}
+									</view>
 								</view>
 							</view>
 							<view class="left">
@@ -148,7 +152,9 @@
 									<view @click='remarkEdit(item)' class="row2 flex" style="color: #808080">
 										<u--image :showLoading="true" src="/static/imgs/card/remark1.png" width="10px"
 											height="12px"></u--image>
-										<view class='icon-text'>{{item.remark?item.remark:'单击添加备注'}}</view>
+										<view class='icon-text' style="color: #808080;">
+											{{item.remark?item.remark:'单击添加备注'}}
+										</view>
 									</view>
 								</view>
 							</view>
@@ -209,12 +215,12 @@
 								<image src="../../static/imgs/card/home.png" mode="widthFix" style="width: 32rpx;"
 									@click="toHome(item)"></image>
 								<text @click='switchType(item)'
-									style="color: #fff;">{{item.classify?item.classifyName:'默'}}</text>
-								<image v-if='item.shareCard==1' src="../../static/imgs/card/share.png" mode="widthFix" style="width: 35rpx;"
-									@click="share(item)"></image>
-									
-								<image v-if='item.shareCard==0' src="../../static/imgs/card/share_grey.png" mode="widthFix" style="width: 35rpx;"
-									></image>
+									style="color: #fff;font-size: 36rpx;font-weight: 700;">{{item.classify?item.classifyName:'默'}}</text>
+								<image v-if='item.shareCard==1' src="../../static/imgs/card/share.png" mode="widthFix"
+									style="width: 35rpx;" @click="share(item)"></image>
+
+								<image v-if='item.shareCard==0' src="../../static/imgs/card/share_grey.png"
+									mode="widthFix" style="width: 40rpx;"></image>
 							</view>
 							<view class="right">
 
@@ -222,7 +228,7 @@
 						</view>
 					</view>
 				</view>
-			</mescroll-body>
+			</mescroll-uni>
 		</view>
 		<view class="del-style" v-if="islongPress">
 			<view class="left">
@@ -313,7 +319,13 @@
 					auto: false,
 				},
 				upOption: {
-					auto: false,
+					page: {
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 1,
+					empty: {
+						tip: '暂无相关数据'
+					}
 				},
 				params: {
 					encryptedData: '',
@@ -344,11 +356,11 @@
 				unread: 0,
 				clicknum: 0,
 				noticeList: [],
-				status:0,
+				status: 0,
 			};
 		},
 		onShow() {
-			console.log(uni.getLaunchOptionsSync().scene,1011)
+			console.log(uni.getLaunchOptionsSync().scene, 1011)
 			if (uni.getStorageSync("userInfo").phone) {
 				this.userInfo = uni.getStorageSync("userInfo")
 				this.$nextTick(function() {
@@ -359,7 +371,7 @@
 				});
 				this.searchVal = uni.getStorageSync("search_val") ? uni.getStorageSync("search_val") : ''
 			} else {
-				if(uni.getLaunchOptionsSync().scene!=1154){
+				if (uni.getLaunchOptionsSync().scene != 1154) {
 					this.login()
 				}
 			}
@@ -369,20 +381,20 @@
 
 		},
 		onLoad: function(options) {
-			this.status=uni.getLaunchOptionsSync().scene
-			if(uni.getLaunchOptionsSync().scene==1154){
+			this.status = uni.getLaunchOptionsSync().scene
+			if (uni.getLaunchOptionsSync().scene == 1154) {
 				uni.showToast({
 					title: '请前往小程序查看名片',
-					icon:'none',
-					duration:10000
-				});	
-			}else{
+					icon: 'none',
+					duration: 10000
+				});
+			} else {
 				wx.showShareMenu({
 					withShareTicket: true,
 					menus: ["shareAppMessage", "shareTimeline"]
 				})
 			}
-			
+
 		},
 		onShareAppMessage(res) {
 			console.log(res, this.popupshow)
@@ -800,7 +812,7 @@
 				this.canvasData = {
 					clicknum: this.clicknum++,
 					list: data,
-					page:'cardHolder'
+					page: 'cardHolder'
 				}
 
 			},
@@ -947,82 +959,82 @@
 				this.isShowType = false
 			},
 			async upCallback(page) {
-				if(uni.getLaunchOptionsSync().scene==1154){
+				if (uni.getLaunchOptionsSync().scene == 1154) {
 					uni.showToast({
 						title: '请前往小程序查看名片',
-						icon:'none',
-						duration:10000
-					});	
-				}else{
-				var that = this
-				uni.showLoading({
-					title: '数据加载中'
-				})
-				await this.$request.baseRequest('admin.unimall.cardHolderInfo', 'list', {
-					page: page.num,
-					limit: page.size,
-					commonId: uni.getStorageSync("userInfo").id,
-					searchContent: this.searchVal
-				}, failres => {
-					console.log('res+++++', failres.errmsg)
-					this.$refs.uToast.show({
-						type: 'error',
-						message: failres.errmsg,
+						icon: 'none',
+						duration: 10000
+					});
+				} else {
+					var that = this
+					uni.showLoading({
+						title: '数据加载中'
 					})
-					uni.hideLoading()
-				}).then(res => {
-					console.log(res)
-					if (page.num == 1) this.cardHolderList = [];
-					let curPageLen = res.data.items.length;
-					let totalPage = res.data.total;
-					for (var i = 0; i < res.data.items.length; i++) {
-						res.data.items[i].checked = false
-						if (res.data.items[i].classify) {
-							res.data.items[i].classifyName = res.data.items[i].classify[0]
+					await this.$request.baseRequest('admin.unimall.cardHolderInfo', 'list', {
+						page: page.num,
+						limit: page.size,
+						commonId: uni.getStorageSync("userInfo").id,
+						searchContent: this.searchVal
+					}, failres => {
+						console.log('res+++++', failres.errmsg)
+						this.$refs.uToast.show({
+							type: 'error',
+							message: failres.errmsg,
+						})
+						uni.hideLoading()
+					}).then(res => {
+						console.log(res)
+						if (page.num == 1) this.cardHolderList = [];
+						let curPageLen = res.data.items.length;
+						let totalPage = res.data.total;
+						for (var i = 0; i < res.data.items.length; i++) {
+							res.data.items[i].checked = false
+							if (res.data.items[i].classify) {
+								res.data.items[i].classifyName = res.data.items[i].classify[0]
+							}
 						}
-					}
-					this.cardHolderList = res.data.items
-					this.loading = false
-					this.$nextTick(() => {
-						that.mescroll.endBySize(curPageLen, totalPage)
-					});
-
-					uni.hideLoading()
-				})
+						this.cardHolderList = res.data.items
+						this.loading = false
+						this.$nextTick(() => {
+							that.mescroll.endBySize(curPageLen, totalPage)
+						});
 
-				await this.$request.baseRequest('admin.unimall.cardClassifyInfo', 'list', {
-					page: 1,
-					limit: 9999,
-					commonId: uni.getStorageSync("userInfo").id
-				}, failres => {
-					console.log('res+++++', failres.errmsg)
-					this.$refs.uToast.show({
-						type: 'error',
-						message: failres.errmsg,
+						uni.hideLoading()
 					})
-				}).then(res => {
-					this.typeColumns = [res.data.items]
-					console.log(this.typeColumns)
-				})
 
-				await this.$request.baseRequest('admin.unimall.cardNewsInfo', 'list', {
-					receiveId: uni.getStorageSync("userInfo").id,
-				}, failres => {
-					console.log('res+++++', failres.errmsg)
-					this.$refs.uToast.show({
-						type: 'error',
-						message: failres.errmsg,
+					await this.$request.baseRequest('admin.unimall.cardClassifyInfo', 'list', {
+						page: 1,
+						limit: 9999,
+						commonId: uni.getStorageSync("userInfo").id
+					}, failres => {
+						console.log('res+++++', failres.errmsg)
+						this.$refs.uToast.show({
+							type: 'error',
+							message: failres.errmsg,
+						})
+					}).then(res => {
+						this.typeColumns = [res.data.items]
+						console.log(this.typeColumns)
 					})
-				}).then(res => {
-					this.noticeList = res.data.items
-					if (this.noticeList.length > 0) {
-						var data = this.noticeList.filter((item) => {
-							return item.newsFlag == 0
+
+					await this.$request.baseRequest('admin.unimall.cardNewsInfo', 'list', {
+						receiveId: uni.getStorageSync("userInfo").id,
+					}, failres => {
+						console.log('res+++++', failres.errmsg)
+						this.$refs.uToast.show({
+							type: 'error',
+							message: failres.errmsg,
 						})
-						this.unread = data ? data.length : 0
-					}
-					console.log(this.unread)
-				})
+					}).then(res => {
+						this.noticeList = res.data.items
+						if (this.noticeList.length > 0) {
+							var data = this.noticeList.filter((item) => {
+								return item.newsFlag == 0
+							})
+							this.unread = data ? data.length : 0
+						}
+						console.log(this.unread)
+					})
 				}
 			},
 			login() {
@@ -1179,8 +1191,12 @@
 
 	.content3 {
 		// padding:0 20rpx;
-		position: relative;
-		top: 376rpx;
+		// position: relative;
+		// top: 376rpx;
+		margin: 0 20rpx;
+		background: #f5f5f5;
+		// height: 1000px;
+		border-radius: 30rpx;
 
 		.style1 {
 			display: flex;
@@ -1234,8 +1250,8 @@
 		}
 
 		.style2 {
-			padding: 30rpx;
-			margin-bottom: 100rpx;
+			padding: 15rpx;
+			margin-bottom: 80rpx;
 
 			.top {
 				.row1 {
@@ -1262,7 +1278,7 @@
 			}
 
 			.bottom {
-				margin-top: 48rpx;
+				margin-top: 20rpx;
 
 				.left {
 					margin-right: 40rpx;
@@ -1284,7 +1300,7 @@
 
 					.row2 {
 						margin-top: 10rpx;
-						font-size: 24rpx;
+						font-size: 26rpx;
 						font-weight: bold;
 						color: #323333;
 					}
@@ -1474,7 +1490,7 @@
 
 	.icon-text {
 		margin-left: 10px;
-		font-size: 24rpx;
+		font-size: 26rpx;
 		font-weight: 500;
 		color: #323333;
 	}
@@ -1482,14 +1498,17 @@
 	/deep/.u-checkbox__icon-wrap.u-checkbox__icon-wrap--square {
 		border-color: #D7DEEB !important;
 	}
-	.wrap{
-		position:fixed;
-		top:0;
-		width:100%;
+
+	.wrap {
+		position: fixed;
+		top: 0;
+		width: 100%;
 	}
-	/deep/.mescroll-body{
-		min-height:558px !important;
-		height:558px !important;
-		overflow:scroll !important;
+
+	/deep/.mescroll-body {
+		min-height: 558px !important;
+		height: 558px !important;
+		background-color: green;
+		overflow: scroll !important;
 	}
-</style>
+</style>

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

@@ -49,7 +49,7 @@
 					<u--textarea v-model="cardInfo.remark" placeholder="输入备注,不超过150个字 "></u--textarea>
 				</view>
 			</view>
-			<view v-if='commonId==""' class="flex flex-between" style="border-bottom: 1px solid #E6E5E5;padding: 20rpx 0;">
+			<view v-if='commonId' class="flex flex-between" style="border-bottom: 1px solid #E6E5E5;padding: 20rpx 0;">
 				<view class="left">
 					我的名片
 				</view>