From f5e4c2eaf00902d5b6e8aa618be7016bfc555063 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Mon, 05 Jul 2021 17:55:20 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android

---
 pages/groupChat/groupChat.vue |   86 +++++++++++++++++++++++++-----------------
 1 files changed, 51 insertions(+), 35 deletions(-)

diff --git a/pages/groupChat/groupChat.vue b/pages/groupChat/groupChat.vue
index b3ebc0e..dcafd14 100644
--- a/pages/groupChat/groupChat.vue
+++ b/pages/groupChat/groupChat.vue
@@ -7,7 +7,6 @@
 			<u-tabs :list="list" :is-scroll="false" :current="current" active-color="#14B9C8" inactive-color="#595959"
 				height="100" @change="change"></u-tabs>
 		</view>
-		
 		<swiper id="swiperBox" :style="{ height: swiperHeight + 'px' }" :current="current" @change="tabsChange">
 			<swiper-item class="swiper-item" v-for="(item, indexs) in list" :key="indexs">
 				<view v-if="indexs == 0" class="main">
@@ -27,6 +26,17 @@
 							<!-- <view class="inTitle">{{Task}}</view> -->
 							<view class="inTmain">
 								<contacts v-for="(item,index) in dataListQZ" :key="index" :Pdata="item" :fromW="indexs"
+									@refreshTask="refreshTask"></contacts>
+							</view>
+						</div>
+					</div>
+				</view>
+				<view v-if="indexs == 2" class="main">
+					<div>
+						<div class="m-main">
+							<!-- <view class="inTitle">{{Task}}</view> -->
+							<view class="inTmain">
+								<contacts v-for="(item,index) in dataListTXL" :key="index" :Pdata="item" :fromW="indexs"
 									@refreshTask="refreshTask"></contacts>
 							</view>
 						</div>
@@ -65,6 +75,7 @@
 				show: true,
 				dataListP: [],
 				dataListQZ: [],
+				dataListTXL:[],
 				fromW: '',
 				onTop: false, //是否吸顶
 				rect: '', //页面滚动距离
@@ -104,8 +115,40 @@
 			},
 			tabsChange(e) {
 				this.current = e.detail.current;
-				if(this.current == 1){
-					var that = this;
+				this.getdataList();
+			},
+			beginObj() {
+				this.titleTop = '2.6rem';
+				this.zhanwei = '3rem';
+				//#ifdef MP-WEIXIN
+				console.log('uni-app小程序中')
+				this.titleTop = '0';
+				this.zhanwei = '0';
+				//#endif
+			},
+			onClick(e) {
+				console.log(e, 777878)
+			},
+			getdataList() {
+				var that = this;
+				if(this.current == 0){
+					uni.request({
+						url:"http://s16s652780.51mypc.cn/api/chat-records/getChatListPage",
+						method:"get",
+						data:{
+							senderId: WxStorage.get("ids")
+						},
+						success:(res)=> {
+							var resdata = res.data.data;
+							for (var i = 0; i < resdata.length; i++) {
+								if(resdata[i].avatar == null || resdata[i].avatar == ""){
+									resdata[i].avatar = "http://s16s652780.51mypc.cn/img/bg/img-logo.png";
+								}
+							}
+							that.dataListP = resdata;
+						}
+					});
+				}else if(this.current == 1){
 					uni.request({
 						url:"http://s16s652780.51mypc.cn/api/chatgroup/selectList",
 						method:"POST",
@@ -124,37 +167,6 @@
 					})
 				}
 			},
-			beginObj() {
-				this.titleTop = '2.6rem';
-				this.zhanwei = '3rem';
-				//#ifdef MP-WEIXIN
-				console.log('uni-app小程序中')
-				this.titleTop = '0';
-				this.zhanwei = '0';
-				//#endif
-			},
-			onClick(e) {
-				console.log(e, 777878)
-			},
-			getdataList(need) {
-				var that = this;
-				uni.request({
-					url:"http://s16s652780.51mypc.cn/api/chat-records/getChatListPage",
-					method:"get",
-					data:{
-						senderId: WxStorage.get("ids")
-					},
-					success:(res)=> {
-						var resdata = res.data.data;
-						for (var i = 0; i < resdata.length; i++) {
-							if(resdata[i].avatar == null || resdata[i].avatar == ""){
-								resdata[i].avatar = "http://s16s652780.51mypc.cn/img/bg/img-logo.png";
-							}
-						}
-						that.dataListP = resdata;
-					}
-				})
-			},
 			refreshTask() {
 				this.getdataList(1);
 			},
@@ -163,6 +175,7 @@
 		mounted() {
 			this.beginObj();
 			this.getdataList(0);
+			
 		},
 		onPageScroll(e) {
 			// console.log(e.scrollTop, 'pingmu')
@@ -178,7 +191,10 @@
 			}
 		},
 		onLoad: function(options) {
-			this.userName = options.login
+			this.userName = options.login;
+			if(options.txlType == 2){
+				this.current = 2;
+			}
 			
 		}
 	}

--
Gitblit v1.9.3