فهرست منبع

修改 联系客户 点击行不跳转、修改扫码添加跳转名片夹不刷新数据问题

achao 2 سال پیش
والد
کامیت
c8292a9388
3فایلهای تغییر یافته به همراه41 افزوده شده و 53 حذف شده
  1. 24 41
      xiaochengxu/pages/cardHolder/cardHolder.vue
  2. 15 10
      xiaochengxu/pages/cardHolder/scanCodeAddCard.vue
  3. 2 2
      xiaochengxu/pages/mySet/mySet.vue

+ 24 - 41
xiaochengxu/pages/cardHolder/cardHolder.vue

@@ -27,7 +27,7 @@
 
 			<view
 				:style='cardHolderList.length>0?"padding:20rpx 20rpx 200rpx 20rpx;":"padding:20rpx 20rpx 20rpx 20rpx;"'
-				class="content2">
+				class="content2" v-if="cardHolderList.length>0">
 				<view class="all-type flex" @click="selectType">
 					<text style="margin-right: 10rpx;">{{typeName?typeName:'全部分类'}}</text>
 					<uni-icons type="bottom" size="18" color="#fff"></uni-icons>
@@ -428,26 +428,9 @@
 
 		},
 		onShow:function(){
-			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,
-				})
-			}).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)
-			})
+			let _isLoad = uni.getStorageSync("scanAddCardToIndex")
 			this.searchVal = uni.getStorageSync("search_val") ? uni.getStorageSync("search_val") : ''
-			if(this.searchVal) this.mescroll.resetUpScroll();
+			if(this.searchVal||_isLoad) this.mescroll.resetUpScroll();
 		},
 		onLoad: function(options) {
 			that = this
@@ -455,7 +438,25 @@
 			if (uni.getStorageSync("userInfo").phone) {
 				this.userInfo = uni.getStorageSync("userInfo")
 				this.$nextTick(function() {
-					this.mescroll.resetUpScroll()
+					that.mescroll.resetUpScroll()
+					that.$request.baseRequest('admin.unimall.cardNewsInfo', 'list', {
+						receiveId: uni.getStorageSync("userInfo").id,
+					}, failres => {
+						console.log('res+++++', failres.errmsg)
+						that.$refs.uToast.show({
+							type: 'error',
+							message: failres.errmsg,
+						})
+					}).then(res => {
+						that.noticeList = res.data.items
+						if (that.noticeList.length > 0) {
+							var data = that.noticeList.filter((item) => {
+								return item.newsFlag == 0
+							})
+							that.unread = data ? data.length : 0
+						}
+						console.log(that.unread)
+					})
 					wx.showShareMenu({
 						withShareTicket: true,
 						menus: ["shareAppMessage", "shareTimeline"]
@@ -1144,26 +1145,8 @@
 							
 							console.log(this.typeColumns)
 						})
-						
-						// await this.$request.baseRequest('admin.unimall.cardNewsInfo', 'list', {
-						// 	receiveId: uni.getStorageSync("userInfo").id,
-						// }, failres => {
-						// 	console.log('res+++++', failres.errmsg)
-						// 	uni.showToast({
-						// 	  icon:"none",
-						// 	  title: failres.errmsg,
-						// 	  duration: 3000
-						// 	});
-						// }).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)
-						// })
+						//清楚扫码添加跳页刷新数据状态开关
+						 uni.setStorageSync("scanAddCardToIndex",0)
 					}
 					
 				}

+ 15 - 10
xiaochengxu/pages/cardHolder/scanCodeAddCard.vue

@@ -27,10 +27,10 @@
 								width="12px" height="13px"></u--image>
 							<view class='icon-text'>{{ cardInfo.phone }}</view>
 						</view>
-						<view @click='remarkEdit(cardInfo)' class="row2 flex" style="color: #808080">
+						<view class="row2 flex" style="color: #808080">
 							<u--image :showLoading="true" :src="'/static/imgs/card/remark'+cardInfo.icon+'.png'"
 								width="10px" height="12px"></u--image>
-							<view class='icon-text' style="color: #808080;">{{cardInfo.remark?cardInfo.remark:'单击添加备注'}}
+							<view class='icon-text' style="color: #808080;">{{cardInfo.remark?cardInfo.remark:''}}
 							</view>
 						</view>
 					</view>
@@ -59,10 +59,10 @@
 								width="12px" height="13px"></u--image>
 							<view class='icon-text'>{{ cardInfo.phone }}</view>
 						</view>
-						<view @click='remarkEdit(cardInfo)' class="row2 flex" style="color: #808080">
+						<view  class="row2 flex" style="color: #808080">
 							<u--image :showLoading="true" :src="'/static/imgs/card/remark'+cardInfo.icon+'.png'"
 								width="10px" height="12px"></u--image>
-							<view class='icon-text' style="color: #808080;">{{cardInfo.remark?cardInfo.remark:'单击添加备注'}}
+							<view class='icon-text' style="color: #808080;">{{cardInfo.remark?cardInfo.remark:''}}
 							</view>
 						</view>
 					</view>
@@ -107,11 +107,11 @@
 									width="12px" height="13px"></u--image>
 								<view class='icon-text'>{{ cardInfo.phone }}</view>
 							</view>
-							<view @click='remarkEdit(cardInfo)' class="row2 flex" style="color: #808080">
+							<view class="row2 flex" style="color: #808080">
 								<u--image :showLoading="true" :src="'/static/imgs/card/remark'+cardInfo.icon+'.png'"
 									width="10px" height="12px"></u--image>
 								<view class='icon-text' style="color: #808080;">
-									{{cardInfo.remark?cardInfo.remark:'单击添加备注'}}
+									{{cardInfo.remark?cardInfo.remark:''}}
 								</view>
 							</view>
 						</view>
@@ -152,11 +152,11 @@
 									width="12px" height="13px"></u--image>
 								<view class='icon-text'>{{ cardInfo.phone }}</view>
 							</view>
-							<view @click='remarkEdit(cardInfo)' class="row2 flex" style="color: #808080">
+							<view class="row2 flex" style="color: #808080">
 								<u--image :showLoading="true" :src="'/static/imgs/card/remark'+cardInfo.icon+'.png'"
 									width="10px" height="12px"></u--image>
 								<view :style='cardInfo.remark?"color:#000;":"color:#808080;"' class='icon-text'>
-									{{cardInfo.remark?cardInfo.remark:'单击添加备注'}}
+									{{cardInfo.remark?cardInfo.remark:''}}
 								</view>
 							</view>
 						</view>
@@ -257,6 +257,7 @@
 			}
 		},
 		onLoad(options) {
+			console.log(123)
 			this.id = options.id.indexOf(",") ? options.id.split(",")[0] : options.id
 			this.commonId = options.id.indexOf(",") ? options.id.split(",")[1] : ''
 			this.getList()
@@ -292,6 +293,7 @@
 						title: '保存成功!',
 						duration: 2000
 					});
+					 uni.setStorageSync("scanAddCardToIndex",1)
 					uni.switchTab({
 						url: "/pages/cardHolder/cardHolder"
 
@@ -330,7 +332,7 @@
 				}).then(res => {
 					console.log(res, "this.cardInfo")
 					this.cardInfo = res.data
-					this.cardInfo.cardBusiness = ''
+					// this.cardInfo.cardBusiness = ''
 					// this.cardInfo.cardCommonId = res.data.commonId
 					console.log(res)
 				})
@@ -345,7 +347,10 @@
 					});
 					uni.hideLoading()
 				}).then(res => {
-					this.cardList = [res.data.cardInfos]
+					this.cardList = [res.data.items]
+					this.cardInfo.cardBusiness = res.data.items[0].cardBusiness
+					this.cardInfo.myCardId = res.data.items[0].id
+					
 				})
 				this.$request.baseRequest('admin.unimall.cardClassifyInfo', 'list', {
 					page: 1,

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

@@ -18,10 +18,10 @@
 		<view class="content2">
 			<view class="row flex flex-between" v-for="(item,index) in menuList" :key='index'
 				@click="menuClick(item.type)">
-				<view class="flex">
+				<view class="flex" style="width: 100%;">
 					<image :src="item.src" mode="widthFix" class="nav-img"></image>
 					<button class="left-btn" v-if='item.type=="contactCustomer"'
-						open-type='contact'>{{item.name}}</button>
+						open-type='contact' style="width: 90%;">{{item.name}}</button>
 					<span class="left" v-else>{{item.name}}</span>
 				</view>