From 8ea19a6bb34daab1410f6186992a4c1e90299c92 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Wed, 14 Sep 2022 08:54:44 +0800
Subject: [PATCH] 服务器配置

---
 pages/groupChat/groupChat.vue |  133 ++++++++++++++++++++++++++------------------
 1 files changed, 79 insertions(+), 54 deletions(-)

diff --git a/pages/groupChat/groupChat.vue b/pages/groupChat/groupChat.vue
index 8716b76..3ff9eb0 100644
--- a/pages/groupChat/groupChat.vue
+++ b/pages/groupChat/groupChat.vue
@@ -4,10 +4,9 @@
 		<!-- 自定义顶部导航栏 -->
 		<!-- <navBarTop :title="'聊天室'"></navBarTop> -->
 		<view class="tab">
-			<u-tabs :list="list" :is-scroll="false" :current="current" active-color="#14B9C8" inactive-color="#595959"
+			<u-tabs :list="list" :is-scroll="false" :current="current" active-color="#103289" 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>
@@ -55,9 +65,9 @@
 					{
 						name: '群组'
 					},
-					{
-						name: '通讯录'
-					}
+					// {
+					// 	name: '通讯录'
+					// }
 				],
 				swiperHeight: 0,
 				zhanwei: '', //因为小程序中底部和顶部栏占位置,uniapp中不占位置
@@ -65,6 +75,7 @@
 				show: true,
 				dataListP: [],
 				dataListQZ: [],
+				dataListTXL:[],
 				fromW: '',
 				onTop: false, //是否吸顶
 				rect: '', //页面滚动距离
@@ -76,7 +87,7 @@
 		},
 		activated(){
 		      this.beginObj();
-		      this.ingss();
+		      this.getdataList(0);
 		    },
 			onReady() {
 				let that = this;
@@ -104,25 +115,7 @@
 			},
 			tabsChange(e) {
 				this.current = e.detail.current;
-				if(this.current == 1){
-					var that = this;
-					uni.request({
-						url:"http://s16s652780.51mypc.cn/api/chatgroup/selectList",
-						method:"POST",
-						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/qunz.png";
-								}
-							}
-							that.dataListQZ = resdata;
-						}
-					})
-				}
+				this.getdataList();
 			},
 			beginObj() {
 				this.titleTop = '2.6rem';
@@ -136,36 +129,64 @@
 			onClick(e) {
 				console.log(e, 777878)
 			},
-			ingss() {
-				this.ingsDB = '#00d1ff 2px solid';
-				this.candoDB = '#fff 2px solid';
-				this.Task = '当前已接任务';
-				this.getdataList(0);
-			},
-			candos() {
-				this.candoDB = '#00d1ff 2px solid';
-				this.ingsDB = '#fff 2px solid';
-				this.Task = '当前可接任务';
-				this.getdataList(1);
-			},
-			getdataList(need) {
+			getdataList() {
 				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";
+				if(this.current == 0){
+					uni.request({
+						url:that.$store.state.piAPI + "/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://106.225.193.35:83/img/bg/img-logo.png";
+								}
 							}
+							that.dataListP = resdata;
+							that.swiperHeight = resdata.length * 85;
 						}
-						that.dataListP = resdata;
-					}
-				})
+					});
+				}else if(this.current == 1){
+					uni.request({
+						url:that.$store.state.piAPI + "/chatgroup/selectList",
+						method:"POST",
+						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://106.225.193.35:83/img/bg/qunz.png";
+								}
+							}
+							that.dataListQZ = resdata;
+							that.swiperHeight = resdata.length * 85;
+						}
+					})
+				}else if(this.current == 2){
+					uni.request({
+						url:that.$store.state.piAPI + "//blade-user/pagetxl?current=1&size=9999",
+						method:"get",
+						data:{
+							senderId: WxStorage.get("ids")
+						},
+						success:(res)=> {
+							var resdata = res.data.data.records;
+							for (var i = 0; i < resdata.length; i++) {
+					
+								if(resdata[i].avatar == null || resdata[i].avatar == ""){
+									resdata[i].avatar = "http://106.225.193.35:83/img/bg/img-logo.png";
+								}
+							}
+							that.dataListTXL = resdata;
+							that.swiperHeight = resdata.length * 85;
+						}
+					})
+				}
 			},
 			refreshTask() {
 				this.getdataList(1);
@@ -174,7 +195,8 @@
 		},
 		mounted() {
 			this.beginObj();
-			this.ingss();
+			this.getdataList(0);
+			
 		},
 		onPageScroll(e) {
 			// console.log(e.scrollTop, 'pingmu')
@@ -190,7 +212,10 @@
 			}
 		},
 		onLoad: function(options) {
-			this.userName = options.login
+			this.userName = options.login;
+			if(options.txlType == 2){
+				this.current = 2;
+			}
 			
 		}
 	}

--
Gitblit v1.9.3