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/chating.vue | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/pages/groupChat/chating.vue b/pages/groupChat/chating.vue
index b585237..93de5e1 100644
--- a/pages/groupChat/chating.vue
+++ b/pages/groupChat/chating.vue
@@ -206,11 +206,10 @@
},
// 获取聊天数据
_getMsg(page) {
-
var that = this;
that.senId = WxStorage.get("ids");
uni.request({
- url:"http://s16s652780.51mypc.cn/api/chat-records/getSingleMessagePage",
+ url:that.$store.state.piAPI + "/chat-records/getSingleMessagePage",
method:"get",
data:{
senderId: that.senId,
@@ -223,7 +222,7 @@
var resdata = res.data.data.user;
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";
}
if(resdata[i].id == that.senId){
@@ -266,7 +265,10 @@
that.$nextTick(() => {
that.isanimation = false
- that.scrollToView = 'msg' + that.getData[0].id
+ if(that.getData.length != 0){
+ that.scrollToView = 'msg' + that.getData[0].id
+ }
+
})
// 数据加载完毕关闭动画,停止数据加载
clearInterval(this.loading)
@@ -330,7 +332,7 @@
}
uni.request({
- url:"http://s16s652780.51mypc.cn/api/chat-records/insertSingleChat",
+ url:that.$store.state.piAPI + "/chat-records/insertSingleChat",
method:"post",
data:{
senderId: that.senId,
@@ -365,7 +367,10 @@
this.scrollToView = ''
this.$nextTick(() => {
let len = this.getData.length -1
- this.scrollToView = 'msg' + this.getData[0].id
+ if(this.getData.length != 0){
+ this.scrollToView = 'msg' + this.getData[0].id
+ }
+
})
},
// 地图定位
--
Gitblit v1.9.3