|
@@ -1,39 +1,39 @@
|
|
|
<template>
|
|
|
- <view >
|
|
|
+ <view>
|
|
|
<cu-custom bgColor="bg-blacks" :isBack="false" v-show="but1">
|
|
|
- <block slot="right">
|
|
|
+ <block slot="right">
|
|
|
<image src="../../../static/picture/fourLine.png" style="width: 30px;height: 30px;margin-left: 2%;" @tap="openDrawer"></image>
|
|
|
</block>
|
|
|
- <block slot="right">
|
|
|
- <view class="icon cuIcon-notice text-white" v-if="badge != 0" style="margin-left: -70%;">
|
|
|
- <view class="cu-tag looknumber" style="margin-top: -2%;">
|
|
|
- <block v-if="badge != 1">{{ badge > 99 ? '99+' : badge }}</block>
|
|
|
- </view>
|
|
|
+ <block slot="right">
|
|
|
+ <view class="icon cuIcon-notice text-white" v-if="badge != 0" style="margin-left: -70%;">
|
|
|
+ <view class="cu-tag looknumber" style="margin-top: -2%;">
|
|
|
+ <block v-if="badge != 1">{{ badge > 99 ? '99+' : badge }}</block>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
</block>
|
|
|
<block slot="right">
|
|
|
-
|
|
|
+
|
|
|
</block>
|
|
|
- <block slot="content">通讯录</block>
|
|
|
+ <block slot="content">通讯录</block>
|
|
|
<block slot="right">
|
|
|
<view class="plus" @tap="showModal" data-target="viewModal">+</view>
|
|
|
</block>
|
|
|
</cu-custom>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<!-- 抽屉组件 -->
|
|
|
- <div>
|
|
|
- <drawer ref="drawer"></drawer>
|
|
|
- </div>
|
|
|
- <div class="plusDrawer" @tap="hideModal">
|
|
|
- <plusDrawer ref="plusDrawer"></plusDrawer>
|
|
|
- </div>
|
|
|
+ <div>
|
|
|
+ <drawer ref="drawer"></drawer>
|
|
|
+ </div>
|
|
|
+ <div class="plusDrawer" @tap="hideModal">
|
|
|
+ <plusDrawer ref="plusDrawer"></plusDrawer>
|
|
|
+ </div>
|
|
|
<!-- 组件左右移动 -->
|
|
|
-
|
|
|
+
|
|
|
<!-- 返回组件 -->
|
|
|
- <!-- <view> @tap="common.navTo('/components/mine/addressBook/addressBook')" @click="changeState()"
|
|
|
- <cu-custom bgColor="bg-gradual-sisBlack" :isBack="true" v-show="but2" >
|
|
|
+ <view @click="changeState()">
|
|
|
+ <cu-custom bgColor="bg-gradual-sisBlack" :isBack="false" v-show="but2" >
|
|
|
<block slot="backText">
|
|
|
<view style="height: 80rpx;line-height: 80rpx;color: silver;">返回</view>
|
|
|
</block>
|
|
@@ -42,67 +42,72 @@
|
|
|
</block>
|
|
|
</cu-custom>
|
|
|
</view> -->
|
|
|
- <view class="cu-bar bg-white" v-show="but2" style="z-index: 9999;" @tap="common.navTo('/components/mine/addressBook/addressBook')" >
|
|
|
+ <!--<view class="cu-bar bg-white" v-show="but2" style="z-index: 9999;" @tap="common.navTo('/components/mine/addressBook/addressBook')">
|
|
|
<view class="action">
|
|
|
- <text class="cuIcon-back text-white" style="font-size: 15px;" ></text>
|
|
|
+ <text class="cuIcon-back text-white" style="font-size: 15px;"></text>
|
|
|
<text style=" color: silver;">返回</text>
|
|
|
</view>
|
|
|
<view class="content text-white">
|
|
|
通讯录
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
+ </view>-->
|
|
|
+
|
|
|
<scroll-view @tap="" scroll-y class="DrawerPage" :class="modalName == 'viewModal' ? 'show' : ''">
|
|
|
-
|
|
|
-
|
|
|
- `
|
|
|
- <view v-show="judge">
|
|
|
-
|
|
|
-
|
|
|
- <!-- 搜索标签 -->
|
|
|
- <view class="cu-bar bg-white search" style="z-index: 999999;"> <!-- :style="[{top:CustomBar + 'px'}]" -->
|
|
|
- <view class="search-form round" @touchstart="accordingTo">
|
|
|
- <text class="cuIcon-search"></text>
|
|
|
- <input type="text" placeholder="输入搜索的关键词" confirm-type="search" v-model="search"></input>
|
|
|
- </view>
|
|
|
- <view class="action">
|
|
|
- <button class="cu-btn bg-gradual-sisBlack shadow-blur round" @click="accordingOut">取消</button>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <!-- 搜索列表 -->
|
|
|
- <view class="search-content " ref="search" >
|
|
|
-
|
|
|
- <block>
|
|
|
-
|
|
|
- <view class="cu-list menu-avatar no-padding" >
|
|
|
- <!-- <view class="cu-avatar">{{item.name}}</view> 字母开头显示 -->
|
|
|
- <!-- 将汉字以当前字母开头的遍历 -->
|
|
|
- <view class="cu-item " v-for="item in userListData" >
|
|
|
- <view v-if="item.remak1==1">
|
|
|
+
|
|
|
+
|
|
|
+ `
|
|
|
+ <view v-if="judge==1">
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 搜索标签 -->
|
|
|
+ <view class="cu-bar bg-white search" style="z-index: 999999;">
|
|
|
+ <!-- :style="[{top:CustomBar + 'px'}]" -->
|
|
|
+ <view class="search-form round" @touchstart="accordingTo">
|
|
|
+ <text class="cuIcon-search"></text>
|
|
|
+ <input type="text" placeholder="输入搜索的关键词" confirm-type="search" v-model="search"></input>
|
|
|
+ </view>
|
|
|
+ <view class="action">
|
|
|
+ <button class="cu-btn bg-gradual-sisBlack shadow-blur round" @click="accordingOut">取消</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 搜索列表 -->
|
|
|
+ <view class="search-content " ref="search">
|
|
|
+
|
|
|
+ <block>
|
|
|
+
|
|
|
+ <view class="cu-list menu-avatar no-padding">
|
|
|
+ <!-- <view class="cu-avatar">{{item.name}}</view> 字母开头显示 -->
|
|
|
+ <!-- 将汉字以当前字母开头的遍历 -->
|
|
|
+ <view class="cu-item " v-for="item in userListData">
|
|
|
+ <view v-if="item.remak1==1">
|
|
|
<view class="content" @click="go(userid,lastUserName,items.nickname,items.id,1)">
|
|
|
- <view class="text-grey">{{item.username}}({{item.remak2}})<!-- <text class="text-abc">{{items.name}}</text>君 --></view>
|
|
|
+ <view class="text-grey">{{item.username}}({{item.remak2}})
|
|
|
+ <!-- <text class="text-abc">{{items.name}}</text>君 -->
|
|
|
+ </view>
|
|
|
<view class="text-gray text-sm" v-text="displayTheData(item.id)">
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 在线离线标识 -->
|
|
|
<text class="cuIcon-radioboxfill text-green" style="margin-right: 3px;">在线</text>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view v-if="item.remak1==0">
|
|
|
- <view class="content" @click="go(userid,lastUserName,item.nickname,item.id,0)">
|
|
|
- <view class="text-grey">{{item.username}}({{item.remak2}})<!-- <text class="text-abc">{{items.name}}</text>君 --></view>
|
|
|
- <view class="text-gray text-sm" v-text="displayTheData(item.id)" >
|
|
|
-
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view v-if="item.remak1==0">
|
|
|
+ <view class="content" @click="go(userid,lastUserName,item.nickname,item.id,0)">
|
|
|
+ <view class="text-grey">{{item.username}}({{item.remak2}})
|
|
|
+ <!-- <text class="text-abc">{{items.name}}</text>君 -->
|
|
|
+ </view>
|
|
|
+ <view class="text-gray text-sm" v-text="displayTheData(item.id)">
|
|
|
+
|
|
|
</view>
|
|
|
-
|
|
|
- <text class="cuIcon-radioboxfill text-gray" style="margin-right: 3px;">离线</text>
|
|
|
</view>
|
|
|
+
|
|
|
+ <text class="cuIcon-radioboxfill text-gray" style="margin-right: 3px;">离线</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <!-- <view :class="'indexItem-' + item.name" :id="'indexes-' + item.name" :data-index="item.name">
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- <view :class="'indexItem-' + item.name" :id="'indexes-' + item.name" :data-index="item.name">
|
|
|
<view class="padding"></view>
|
|
|
<view class="cu-list menu-avatar no-padding" >
|
|
|
<view class="cu-item" @tap="common.navTo('/components/mine/addressBook/chat?name='+item+'&send='+send+'&receive='+receive+'&sendname='+sendname+'&receivename='+receivename)">
|
|
@@ -114,62 +119,66 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view> -->
|
|
|
- </block>
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- 通讯列表 -->
|
|
|
-
|
|
|
- <scroll-view scroll-y class="indexes" :scroll-into-view="'indexes-'+ listCurID" :style="[{height:'calc(100vh - '+ CustomBar + 'px - 50px)'}]"
|
|
|
- :scroll-with-animation="true" :enable-back-to-top="true" v-if="play">
|
|
|
- <!-- <block v-for="(item,index) in list" :key="index"> -->
|
|
|
- <!-- 控制侧导航栏 -->
|
|
|
- <!-- <view :class="'indexItem-' + item.name" :id="'indexes-' + item.name" :data-index="item.name"> -->
|
|
|
+ </block>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 通讯列表 -->
|
|
|
+
|
|
|
+ <scroll-view scroll-y class="indexes" :scroll-into-view="'indexes-'+ listCurID" :style="[{height:'calc(100vh - '+ CustomBar + 'px - 50px)'}]"
|
|
|
+ :scroll-with-animation="true" :enable-back-to-top="true" v-if="play">
|
|
|
+ <!-- <block v-for="(item,index) in list" :key="index"> -->
|
|
|
+ <!-- 控制侧导航栏 -->
|
|
|
+ <!-- <view :class="'indexItem-' + item.name" :id="'indexes-' + item.name" :data-index="item.name"> -->
|
|
|
<!-- <view class="padding">{{item.name}}</view> -->
|
|
|
- <view class="cu-list menu-avatar no-padding" >
|
|
|
+ <view class="cu-list menu-avatar no-padding">
|
|
|
<!-- <view class="cu-avatar">{{item.name}}</view> 字母开头显示 -->
|
|
|
<!-- 将汉字以当前字母开头的遍历 -->
|
|
|
- <view class="cu-item" v-for="(items,sub) in userList" :key="sub" >
|
|
|
+ <view class="cu-item" v-for="(items,sub) in userList" :key="sub">
|
|
|
<view v-if="items.remak1==1">
|
|
|
- <view class="content" @click="go(userid,lastUserName,items.nickname,items.id,1)">
|
|
|
- <view class="text-grey">{{items.username}}({{items.remak2}})<!-- <text class="text-abc">{{items.name}}</text>君 --></view>
|
|
|
- <view class="text-gray text-sm" v-text="displayTheData(items.id)">
|
|
|
-
|
|
|
+ <view class="content" @click="go(userid,lastUserName,items.nickname,items.id,1)">
|
|
|
+ <view class="text-grey">{{items.username}}({{items.remak2}})
|
|
|
+ <!-- <text class="text-abc">{{items.name}}</text>君 -->
|
|
|
+ </view>
|
|
|
+ <view class="text-gray text-sm" v-text="displayTheData(items.id)">
|
|
|
+
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ <!-- 在线标识 -->
|
|
|
+ <text class="cuIcon-radioboxfill text-green" style="margin-right: 3px;">在线</text>
|
|
|
</view>
|
|
|
- <!-- 在线标识 -->
|
|
|
- <text class="cuIcon-radioboxfill text-green" style="margin-right: 3px;">在线</text>
|
|
|
- </view>
|
|
|
-
|
|
|
+
|
|
|
<view v-if="items.remak1==0">
|
|
|
- <view class="content" @click="go(userid,lastUserName,items.nickname,items.id,0)">
|
|
|
- <view class="text-grey">{{items.username}}({{items.remak2}})<!-- <text class="text-abc">{{items.name}}</text>君 --></view>
|
|
|
- <view class="text-gray text-sm" v-text="displayTheData(items.id)">
|
|
|
-
|
|
|
+ <view class="content" @click="go(userid,lastUserName,items.nickname,items.id,0)">
|
|
|
+ <view class="text-grey">{{items.username}}({{items.remak2}})
|
|
|
+ <!-- <text class="text-abc">{{items.name}}</text>君 -->
|
|
|
+ </view>
|
|
|
+ <view class="text-gray text-sm" v-text="displayTheData(items.id)">
|
|
|
+
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ <!-- 离线标识 -->
|
|
|
+ <text class="cuIcon-radioboxfill text-gray" style="margin-right: 3px;">离线</text>
|
|
|
</view>
|
|
|
- <!-- 离线标识 -->
|
|
|
- <text class="cuIcon-radioboxfill text-gray" style="margin-right: 3px;">离线</text>
|
|
|
- </view>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- </view>
|
|
|
+ <!-- </view>
|
|
|
</block> -->
|
|
|
- </scroll-view>
|
|
|
- <!-- 侧导航栏 -->
|
|
|
- <!-- <view class="indexBar" :style="[{height:'calc(100vh - ' + CustomBar + 'px - 50px)'}]">
|
|
|
+ </scroll-view>
|
|
|
+ <!-- 侧导航栏 -->
|
|
|
+ <!-- <view class="indexBar" :style="[{height:'calc(100vh - ' + CustomBar + 'px - 50px)'}]">
|
|
|
<view class="indexBar-box" @touchstart="tStart" @touchend="tEnd" @touchmove.stop="tMove">
|
|
|
<view class="indexBar-item" v-for="(item,index) in list" :key="index" :id="index" @touchstart="getCur" @touchend="setCur"> {{item.name}}</view>
|
|
|
</view>
|
|
|
</view> -->
|
|
|
- <!--选择显示 keyword-->
|
|
|
- <view v-show="!hidden" class="indexToast">
|
|
|
- <!-- {{listCur}} -->
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
+ <!--选择显示 keyword-->
|
|
|
+ <view v-show="!hidden" class="indexToast">
|
|
|
+ <!-- {{listCur}} -->
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
</scroll-view>
|
|
|
<initial ref="initial"></initial>
|
|
|
</view>
|
|
@@ -177,12 +186,12 @@
|
|
|
|
|
|
<script>
|
|
|
import pinyin from './index.js';
|
|
|
- import initial from './InitializeThe.vue';
|
|
|
-
|
|
|
+ import initial from './InitializeThe.vue';
|
|
|
+
|
|
|
import res from '../../../common/data.json';
|
|
|
import drawer from '../../../components/drawer/threeLineDrawer.vue'
|
|
|
import plusDrawer from '../../../components/drawer/plusDrawer.vue';
|
|
|
-
|
|
|
+
|
|
|
import mine from '../../../components/mine/Mine.vue';
|
|
|
import chatindex from '../../../components/mine/chat/Chatindex.vue';
|
|
|
export default {
|
|
@@ -190,93 +199,72 @@
|
|
|
initial: initial,
|
|
|
drawer: drawer,
|
|
|
plusDrawer: plusDrawer,
|
|
|
- mine:mine,
|
|
|
- chatindex:chatindex
|
|
|
+ mine: mine,
|
|
|
+ chatindex: chatindex
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- content1:'',
|
|
|
- but1:true,
|
|
|
- but2:false,
|
|
|
- userid:'',
|
|
|
- lastUserName:'',
|
|
|
+ content1: '',
|
|
|
+ but1: true,
|
|
|
+ but2: false,
|
|
|
+ userid: '',
|
|
|
+ lastUserName: '',
|
|
|
StatusBar: this.StatusBar,
|
|
|
CustomBar: this.CustomBar,
|
|
|
listCurID: '',
|
|
|
list: [],
|
|
|
listCur: '',
|
|
|
- send:'1',
|
|
|
- receive:'2',
|
|
|
+ send: '1',
|
|
|
+ receive: '2',
|
|
|
hidden: true,
|
|
|
- play:true,
|
|
|
- sendname:'ming',
|
|
|
- receivename:'fang',
|
|
|
- search:'',
|
|
|
+ play: true,
|
|
|
+ sendname: 'ming',
|
|
|
+ receivename: 'fang',
|
|
|
+ search: '',
|
|
|
timer: null,
|
|
|
- userList:{
|
|
|
- id:'',
|
|
|
- nickname:'',
|
|
|
- password:'',
|
|
|
- remak1:'',
|
|
|
- username:'',
|
|
|
- remak2:'',
|
|
|
+ userList: {
|
|
|
+ id: '',
|
|
|
+ nickname: '',
|
|
|
+ password: '',
|
|
|
+ remak1: '',
|
|
|
+ username: '',
|
|
|
+ remak2: '',
|
|
|
},
|
|
|
- biaos:2,
|
|
|
- socketTask_getUserList:'',
|
|
|
- inconList:["form","favor","question","edit"],
|
|
|
- drawerList: [
|
|
|
- {"name":"聊天通讯"},
|
|
|
- ],
|
|
|
- leftNavigationtitle:'我的功能分组',
|
|
|
+ biaos: 2,
|
|
|
+ socketTask_getUserList: '',
|
|
|
+ inconList: ["form", "favor", "question", "edit"],
|
|
|
+ drawerList: [{
|
|
|
+ "name": "聊天通讯"
|
|
|
+ }, ],
|
|
|
+ leftNavigationtitle: '我的功能分组',
|
|
|
badge: 22,
|
|
|
address: '',
|
|
|
- modalName:null,
|
|
|
+ modalName: null,
|
|
|
plusDrawerList: [],
|
|
|
- toggleid:12,
|
|
|
- plusDrawerList: [
|
|
|
- {
|
|
|
- name: '宁夏新能源公司',
|
|
|
- windPowerStationId: 'NINGXIAXINNENGYUANGONGSI'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '牛首山风电场',
|
|
|
- windPowerStationId: 'NSS_FDC'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '香山风电场',
|
|
|
- windPowerStationId: 'XS_FDC'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '石板泉风电场',
|
|
|
- windPowerStationId: 'SBQ_FDC'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '青山风电场',
|
|
|
- windPowerStationId: 'QS_FDC'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '麻黄山风电场',
|
|
|
- windPowerStationId: 'MHS_FDC'
|
|
|
- }
|
|
|
- ],
|
|
|
- judge:true,
|
|
|
- LastStatement:{
|
|
|
- content:'',
|
|
|
- receive:'',
|
|
|
- send:'',
|
|
|
- time:'',
|
|
|
- type:'',
|
|
|
+ toggleid: 12,
|
|
|
+ plusDrawerList: [],
|
|
|
+ judge: 1,
|
|
|
+ LastStatement: {
|
|
|
+ content: '',
|
|
|
+ receive: '',
|
|
|
+ send: '',
|
|
|
+ time: '',
|
|
|
+ type: '',
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
created: function() {
|
|
|
|
|
|
this.getUserList();
|
|
|
- this.drawerList=uni.getStorageSync('leftlist5');
|
|
|
+ this.drawerList = uni.getStorageSync('leftlist5');
|
|
|
/* this.pinyin(); */
|
|
|
},
|
|
|
- onLoad() {
|
|
|
+ mounted() {
|
|
|
this.getUserList();
|
|
|
+ this.initial();
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+
|
|
|
let list = [{}];
|
|
|
for (let i = 0; i < 26; i++) {
|
|
|
list[i] = {};
|
|
@@ -284,7 +272,7 @@
|
|
|
}
|
|
|
this.list = list;
|
|
|
this.listCur = list[0];
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
onHide() {
|
|
|
this.$refs.drawer.closeDrawer();
|
|
@@ -298,7 +286,7 @@
|
|
|
uni.createSelectorQuery().select('.indexes').boundingClientRect(function(res) {
|
|
|
that.barTop = res.top
|
|
|
}).exec(); */
|
|
|
-
|
|
|
+
|
|
|
/*
|
|
|
this.pinyin(); */
|
|
|
},
|
|
@@ -319,39 +307,57 @@
|
|
|
return this.$store.state.windpowerstationNameToId;
|
|
|
},
|
|
|
userListData: function() {
|
|
|
- var search = this.search;
|
|
|
- if(!this.search){
|
|
|
- return [];
|
|
|
- }
|
|
|
- else if (search) {
|
|
|
- return this.userList.filter(function(userList) {
|
|
|
- return Object.keys(userList).some(function(key) {
|
|
|
- return String(userList[key]).toLowerCase().indexOf(search) > -1
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
- return this.products;
|
|
|
-
|
|
|
+ var search = this.search;
|
|
|
+ if (!this.search) {
|
|
|
+ return [];
|
|
|
+ } else if (search) {
|
|
|
+ return this.userList.filter(function(userList) {
|
|
|
+ return Object.keys(userList).some(function(key) {
|
|
|
+ return String(userList[key]).toLowerCase().indexOf(search) > -1
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return this.products;
|
|
|
+
|
|
|
},
|
|
|
- hasNoData () {
|
|
|
- return !this.list.length
|
|
|
- }
|
|
|
- },
|
|
|
+ hasNoData() {
|
|
|
+ return !this.list.length
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
- displayTheData(id){
|
|
|
- this.theLastStatement(id);
|
|
|
- console.log(this.LastStatement);
|
|
|
- if(this.LastStatement[0].type=="pic"){
|
|
|
- return "[图片]";
|
|
|
- }else{
|
|
|
- return this.LastStatement[0].content;
|
|
|
- }
|
|
|
+ initial() {
|
|
|
+ let userid = uni.getStorageSync('userid');
|
|
|
+ this.theLastStatement(userid);
|
|
|
},
|
|
|
- changeState(){
|
|
|
+ displayTheData(id) {
|
|
|
+ // this.theLastStatement(id);
|
|
|
+ // console.log(this.LastStatement);
|
|
|
+ // if(this.LastStatement[0].type=="pic"){
|
|
|
+ // return "[图片]";
|
|
|
+ // }else{
|
|
|
+ // return this.LastStatement[0].content;
|
|
|
+ // }
|
|
|
+
|
|
|
+ for (var i = 0; i < this.LastStatement.length; i++) {
|
|
|
+
|
|
|
+ if (this.LastStatement[i].receive== id) {
|
|
|
+ if(this.LastStatement[i].type=="pic"){
|
|
|
+ return "[图片]";
|
|
|
+ }else{
|
|
|
+ return this.LastStatement[i].content;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ };
|
|
|
+ },
|
|
|
+ changeState() {
|
|
|
console.log("更改状态")
|
|
|
- this.but1=true;
|
|
|
- this.but2=false;
|
|
|
- this.judge = true;
|
|
|
+ this.but1 = true;
|
|
|
+ this.but2 = false;
|
|
|
+ this.judge = 1;
|
|
|
+ //this.$set(this.judge,judge,1);
|
|
|
+ //this.child('',1);
|
|
|
},
|
|
|
showModal(e) {
|
|
|
this.modalName = e.currentTarget.dataset.target;
|
|
@@ -364,31 +370,31 @@
|
|
|
falseLogin: function() {
|
|
|
this.removeUsernamePassword();
|
|
|
uni.navigateTo({
|
|
|
- url: '/components/login/Login'
|
|
|
+ url: '/components/login/Login'
|
|
|
});
|
|
|
},
|
|
|
openDrawer: function() {
|
|
|
-
|
|
|
- if(this.$refs.drawer != undefined){
|
|
|
- this.$refs.drawer.openDrawer(250, this.drawerList, this.inconList,this.leftNavigationtitle);
|
|
|
- }else{
|
|
|
-
|
|
|
+
|
|
|
+ if (this.$refs.drawer != undefined) {
|
|
|
+ this.$refs.drawer.openDrawer(250, this.drawerList, this.inconList, this.leftNavigationtitle);
|
|
|
+ } else {
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
closeDrawer: function() {
|
|
|
this.drawerIsShow = false;
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
viewUserid: function() {
|
|
|
- this.plusDrawerList=uni.getStorageSync('plusList');
|
|
|
+ this.plusDrawerList = uni.getStorageSync('plusList');
|
|
|
},
|
|
|
monitoringAuthority: function() {
|
|
|
- this.drawerList=uni.getStorageSync('leftlist5');
|
|
|
+ this.drawerList = uni.getStorageSync('leftlist5');
|
|
|
},
|
|
|
- go(userid,lastUserName,nickname,id,bool){
|
|
|
-
|
|
|
- let _this=this;
|
|
|
-
|
|
|
+ go(userid, lastUserName, nickname, id, bool) {
|
|
|
+
|
|
|
+ let _this = this;
|
|
|
+
|
|
|
/* if(bool==0){
|
|
|
|
|
|
window.location.href="https://192.168.1.102:4397/websocket/usercontroller/viewoffline?send="+userid+"&receive="+id+"&sendname="+lastUserName+"&receivename="+nickname;
|
|
@@ -396,10 +402,10 @@
|
|
|
if(bool==1){
|
|
|
window.location.href="https://192.168.1.102:4397/websocket/usercontroller/view?send="+userid+"&receive="+id+"&sendname="+lastUserName+"&receivename="+nickname;
|
|
|
} */
|
|
|
- this.but1=false;
|
|
|
- this.but2=true;
|
|
|
- this.child(id,bool);
|
|
|
-
|
|
|
+ this.but1 = false;
|
|
|
+ this.but2 = true;
|
|
|
+ this.child(id, bool);
|
|
|
+
|
|
|
/*
|
|
|
let _this=this;
|
|
|
if(bool==0){
|
|
@@ -411,26 +417,26 @@
|
|
|
}
|
|
|
*/
|
|
|
},
|
|
|
- child(id){
|
|
|
- this.$refs.initial.childMethod(id);
|
|
|
- this.judge = false;
|
|
|
+ child(id,bool) {
|
|
|
+ ///this.$refs.initial.childMethod(id,bool);
|
|
|
+ this.judge = 0;
|
|
|
},
|
|
|
- accordingOut(){
|
|
|
- this.play=true;
|
|
|
- this.search='';
|
|
|
+ accordingOut() {
|
|
|
+ this.play = true;
|
|
|
+ this.search = '';
|
|
|
},
|
|
|
- accordingTo(){
|
|
|
- this.play=false;
|
|
|
-
|
|
|
+ accordingTo() {
|
|
|
+ this.play = false;
|
|
|
+
|
|
|
},
|
|
|
- pinyin(str){
|
|
|
- var l = pinyin.getSpell(str).substring(0,1);
|
|
|
+ pinyin(str) {
|
|
|
+ var l = pinyin.getSpell(str).substring(0, 1);
|
|
|
console.log(l);
|
|
|
},
|
|
|
- /* handleCityClick (city) {
|
|
|
- this.changeCity(city)
|
|
|
- this.$router.push('/')
|
|
|
- }, */
|
|
|
+ /* handleCityClick (city) {
|
|
|
+ this.changeCity(city)
|
|
|
+ this.$router.push('/')
|
|
|
+ }, */
|
|
|
closeFrame: function() {
|
|
|
this.count = this.count + 1;
|
|
|
if (this.isFrameShow) {
|
|
@@ -453,13 +459,25 @@
|
|
|
this.socketTask_getUserList.onOpen(res => {
|
|
|
console.log('WebSocket连接正常打开中...!');
|
|
|
this.is_open_socket = true;
|
|
|
-
|
|
|
+
|
|
|
// 注:只有连接正常打开中 ,才能正常收到消息
|
|
|
this.socketTask_getUserList.onMessage(res => {
|
|
|
/* _this.windpowerstationdetail.getUserList = JSON.parse(res.data); */
|
|
|
- _this.userList = JSON.parse(res.data);
|
|
|
_this.lastUserName = uni.getStorageSync('gyeeusername');
|
|
|
_this.userid = uni.getStorageSync('userid');
|
|
|
+ let templist=JSON.parse(res.data);
|
|
|
+ _this.userList=[];
|
|
|
+ for (var i = 0; i < templist.length; i++) {
|
|
|
+
|
|
|
+ if(templist[i].id!=_this.userid)
|
|
|
+ {
|
|
|
+ _this.userList.push(templist[i]);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ };
|
|
|
+ //_this.userList = JSON.parse(res.data);
|
|
|
+
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -467,17 +485,18 @@
|
|
|
async theLastStatement(id) {
|
|
|
let _this = this;
|
|
|
uni.request({
|
|
|
- url: 'http://' + this.sisStageIp + ':' + this.sisStagePort + '/chatDetailController/selectLastInfoByUserId?userid='+id,
|
|
|
+ url: 'http://' + this.sisStageIp + ':' + this.sisStagePort +
|
|
|
+ '/chatDetailController/selectLastInfoByUserId?userid=' + id,
|
|
|
data: {},
|
|
|
method: 'GET',
|
|
|
success: function(res) {
|
|
|
- _this.LastStatement =res.data;
|
|
|
+ _this.LastStatement = res.data;
|
|
|
},
|
|
|
fail: () => {
|
|
|
_this.tips = '网络错误,小程序端请检查合法域名';
|
|
|
},
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
//获取文字信息
|
|
|
getCur(e) {
|
|
@@ -511,7 +530,7 @@
|
|
|
this.listCurID = this.listCur
|
|
|
},
|
|
|
indexSelect(e) {
|
|
|
-
|
|
|
+
|
|
|
let that = this;
|
|
|
let barHeight = this.barHeight;
|
|
|
let list = this.list;
|
|
@@ -525,7 +544,7 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -536,12 +555,12 @@
|
|
|
color: silver;
|
|
|
background: #000;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@font-face {
|
|
|
font-family: '方正兰亭细黑_GBK';
|
|
|
src: url(../../../static/fzltxh.TTF);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
page {
|
|
|
background-color: #1f1f1f;
|
|
|
font-family: '方正兰亭细黑_GBK';
|
|
@@ -615,23 +634,30 @@
|
|
|
text-align: center;
|
|
|
font-size: 48upx;
|
|
|
}
|
|
|
- .bg-white{
|
|
|
+
|
|
|
+ .bg-white {
|
|
|
background-color: #242424;
|
|
|
}
|
|
|
- .cu-list,.menu-avatar>.cu-item {
|
|
|
- background-color: #242424;
|
|
|
+
|
|
|
+ .cu-list,
|
|
|
+ .menu-avatar>.cu-item {
|
|
|
+ background-color: #242424;
|
|
|
}
|
|
|
- .cu-avatar{
|
|
|
+
|
|
|
+ .cu-avatar {
|
|
|
height: 20px;
|
|
|
width: 20px;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
- .mar_t{
|
|
|
+
|
|
|
+ .mar_t {
|
|
|
margin-top: 50px;
|
|
|
}
|
|
|
- .text-grey{
|
|
|
+
|
|
|
+ .text-grey {
|
|
|
margin-top: -10px;
|
|
|
}
|
|
|
+
|
|
|
.plus {
|
|
|
width: 30px;
|
|
|
height: 45px;
|
|
@@ -642,6 +668,7 @@
|
|
|
text-align: right;
|
|
|
margin-right: 2.5%;
|
|
|
}
|
|
|
+
|
|
|
.top {
|
|
|
width: 100%;
|
|
|
height: 130upx;
|
|
@@ -652,13 +679,13 @@
|
|
|
left: 0px;
|
|
|
z-index: 100;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.threeLine {
|
|
|
width: 50px;
|
|
|
height: 45px;
|
|
|
float: left;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.text {
|
|
|
width: calc(100% - 100px);
|
|
|
height: 45px;
|
|
@@ -672,57 +699,58 @@
|
|
|
margin-top: 11px;
|
|
|
font-size: 18px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.DrawerPage {
|
|
|
- position: fixed;
|
|
|
- width: 100vw;
|
|
|
- height: 100vh;
|
|
|
- left: 0vw;
|
|
|
- background-color: #1f1f1f;
|
|
|
- transition: all 0.4s;
|
|
|
- }
|
|
|
-
|
|
|
- .DrawerPage.show {
|
|
|
- transform: scale(0.9, 0.9);
|
|
|
- left: 85vw;
|
|
|
- box-shadow: 0 0 60upx rgba(0, 0, 0, 0.2);
|
|
|
- transform-origin: 0;
|
|
|
- }
|
|
|
- .DrawerPage .cu-bar.tabbar .action button.cuIcon {
|
|
|
- width: 64upx;
|
|
|
- height: 64upx;
|
|
|
- line-height: 64upx;
|
|
|
- margin: 0;
|
|
|
- display: inline-block;
|
|
|
- }
|
|
|
-
|
|
|
- .DrawerPage .cu-bar.tabbar .action .cu-avatar {
|
|
|
- margin: 0;
|
|
|
- }
|
|
|
-
|
|
|
- .DrawerPage .nav {
|
|
|
- flex: 1;
|
|
|
- }
|
|
|
-
|
|
|
- .DrawerPage .nav .cu-item.cur {
|
|
|
- border-bottom: 0;
|
|
|
- position: relative;
|
|
|
- }
|
|
|
-
|
|
|
- .DrawerPage .nav .cu-item.cur::after {
|
|
|
- content: '';
|
|
|
- width: 10upx;
|
|
|
- height: 10upx;
|
|
|
- background-color: currentColor;
|
|
|
- position: absolute;
|
|
|
- bottom: 10upx;
|
|
|
- border-radius: 10upx;
|
|
|
- left: 0;
|
|
|
- right: 0;
|
|
|
- margin: auto;
|
|
|
- }
|
|
|
-
|
|
|
- .DrawerPage .cu-bar.tabbar .action {
|
|
|
- flex: initial;
|
|
|
- }
|
|
|
+ position: fixed;
|
|
|
+ width: 100vw;
|
|
|
+ height: 100vh;
|
|
|
+ left: 0vw;
|
|
|
+ background-color: #1f1f1f;
|
|
|
+ transition: all 0.4s;
|
|
|
+ }
|
|
|
+
|
|
|
+ .DrawerPage.show {
|
|
|
+ transform: scale(0.9, 0.9);
|
|
|
+ left: 85vw;
|
|
|
+ box-shadow: 0 0 60upx rgba(0, 0, 0, 0.2);
|
|
|
+ transform-origin: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .DrawerPage .cu-bar.tabbar .action button.cuIcon {
|
|
|
+ width: 64upx;
|
|
|
+ height: 64upx;
|
|
|
+ line-height: 64upx;
|
|
|
+ margin: 0;
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+
|
|
|
+ .DrawerPage .cu-bar.tabbar .action .cu-avatar {
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .DrawerPage .nav {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ .DrawerPage .nav .cu-item.cur {
|
|
|
+ border-bottom: 0;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+
|
|
|
+ .DrawerPage .nav .cu-item.cur::after {
|
|
|
+ content: '';
|
|
|
+ width: 10upx;
|
|
|
+ height: 10upx;
|
|
|
+ background-color: currentColor;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 10upx;
|
|
|
+ border-radius: 10upx;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ margin: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .DrawerPage .cu-bar.tabbar .action {
|
|
|
+ flex: initial;
|
|
|
+ }
|
|
|
</style>
|