소스 검색

名片列表

xhj 2 년 전
부모
커밋
7070f34231
2개의 변경된 파일14개의 추가작업 그리고 7개의 파일을 삭제
  1. 7 6
      card/cardFound/cardFound.vue
  2. 7 1
      card/cardList/cardList.vue

+ 7 - 6
card/cardFound/cardFound.vue

@@ -258,6 +258,7 @@ export default {
 							let it = data.list[i]
 							let markerLogo = await this.getMarkerLogo(it.logo)
 							let obj = {
+								id:i+1,
 								latitude: it.latitude,
 								longitude: it.longitude,
 								width: 80,
@@ -272,12 +273,12 @@ export default {
 							covers.push(obj);
 						}
 					}
-					if(covers.length > 0){
-						covers.map((it,index)=>{
-							it.id = index+1;
-							return it;
-						})
-					}
+					// if(covers.length > 0){
+					// 	covers.map((it,index)=>{
+					// 		it.id = Number(index+1);
+					// 		return it;
+					// 	})
+					// }
 					that.covers = covers
 					resolve();
 				})

+ 7 - 1
card/cardList/cardList.vue

@@ -70,7 +70,7 @@
 				<view class="register-title ddflex fflex">
 					<image class="register-title-icon" :src="item.avatar?item.avatar:'/static/images/userimg.png'" mode="aspectFill"></image>
 					<view class="flex" style="min-width: 0;">
-						<view class="ddflex">
+						<view class="ddflex" @click.stop="jumpSingleChatRoom(item)">
 							<view class="card-name fflex tover">{{item.realName?item.realName:''}}</view>
 							<image style="width: 64rpx;height: 64rpx;margin-left: 10rpx;" src="/card/static/images/wxChat.png"></image>
 						</view>
@@ -248,6 +248,12 @@
 					url: url
 				})
 			},
+			jumpSingleChatRoom(item) {
+				if (item) {
+					req.jumpSingleChatRoom(item.userId, item.avatar, item.realName);
+				}
+			
+			},
 			getDict(){
 				return new Promise((r,j)=>{
 					req.getRequest('/api/other/dict/info',{dictType:'job'},res=>{