From 43b0c9ec4a73faafce3b3cbf323fecb7284cd91c Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 03 Jul 2021 09:56:43 +0800
Subject: [PATCH] 警情反馈 警情地图
---
pages/groupChat/groupChat.vue | 30 ++++++++++++++++++++++--------
1 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/pages/groupChat/groupChat.vue b/pages/groupChat/groupChat.vue
index 0fd8d26..fb7f4c1 100644
--- a/pages/groupChat/groupChat.vue
+++ b/pages/groupChat/groupChat.vue
@@ -1,6 +1,8 @@
<!-- 工作台 -->
<template>
<view class="work">
+ <!-- 自定义顶部导航栏 -->
+ <!-- <navBarTop :title="'聊天室'"></navBarTop> -->
<view class="main">
<div>
<div class="m-main">
@@ -20,9 +22,10 @@
import WxStorage from "../../static/lib/wxStorage.js"
import axios from '../../static/lib/axios.js'
import contacts from '../../components/contacts/contacts.vue'
- export default {
+ import navBarTop from '../../components/nav-bar-top/nav-bar-top.vue';
+ export default{
components: {
- contacts
+ navBarTop,contacts
},
data() {
return {
@@ -41,6 +44,10 @@
userName: '',
}
},
+ activated(){
+ this.beginObj();
+ this.ingss();
+ },
methods: {
beginObj() {
this.titleTop = '2.6rem';
@@ -69,18 +76,22 @@
getdataList(need) {
this.fromW = need;
var that = this;
-
uni.request({
- url:"http://s16s652780.51mypc.cn/map/chat.json",
+ url:"http://s16s652780.51mypc.cn/api/chat-records/getChatListPage",
method:"get",
data:{
+ senderId: WxStorage.get("ids")
},
success:(res)=> {
- that.dataListP = res.data.contacts
+ 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);
@@ -115,7 +126,7 @@
.work {
width: 100%;
height: 100%;
- padding: 0.625rem 2.5% 3rem 2.5%;
+ padding: 0rem 2.5% 3rem 2.5%;
box-sizing: border-box;
.hello {
@@ -153,6 +164,8 @@
}
.main {
+ margin-top: 0.625rem;
+
.m-title {
width: 100%;
height: 2rem;
@@ -189,6 +202,7 @@
padding-bottom: 0.5rem;
box-sizing: border-box;
}
+
}
.m-main {
--
Gitblit v1.9.3