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 | 39 ++++++++++++++++++++++++++++++---------
1 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/pages/groupChat/groupChat.vue b/pages/groupChat/groupChat.vue
index dcafd14..3ff9eb0 100644
--- a/pages/groupChat/groupChat.vue
+++ b/pages/groupChat/groupChat.vue
@@ -4,7 +4,7 @@
<!-- 自定义顶部导航栏 -->
<!-- <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">
@@ -65,9 +65,9 @@
{
name: '群组'
},
- {
- name: '通讯录'
- }
+ // {
+ // name: '通讯录'
+ // }
],
swiperHeight: 0,
zhanwei: '', //因为小程序中底部和顶部栏占位置,uniapp中不占位置
@@ -133,7 +133,7 @@
var that = this;
if(this.current == 0){
uni.request({
- url:"http://s16s652780.51mypc.cn/api/chat-records/getChatListPage",
+ url:that.$store.state.piAPI + "/chat-records/getChatListPage",
method:"get",
data:{
senderId: WxStorage.get("ids")
@@ -142,27 +142,48 @@
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";
+ resdata[i].avatar = "http://106.225.193.35:83/img/bg/img-logo.png";
}
}
that.dataListP = resdata;
+ that.swiperHeight = resdata.length * 85;
}
});
}else if(this.current == 1){
uni.request({
- url:"http://s16s652780.51mypc.cn/api/chatgroup/selectList",
+ url:that.$store.state.piAPI + "/chatgroup/selectList",
method:"POST",
data:{
senderId: WxStorage.get("ids")
},
success:(res)=> {
- var resdata = res.data.data;
+ 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";
+ 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;
}
})
}
--
Gitblit v1.9.3