| | |
| | | <!-- 工作台 --> |
| | | <template> |
| | | <view class="work"> |
| | | <!-- 自定义顶部导航栏 --> |
| | | <!-- <navBarTop :title="'聊天室'"></navBarTop> --> |
| | | <view class="main"> |
| | | <div> |
| | | <div class="m-main"> |
| | |
| | | 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 { |
| | |
| | | userName: '', |
| | | } |
| | | }, |
| | | activated(){ |
| | | this.beginObj(); |
| | | this.ingss(); |
| | | }, |
| | | methods: { |
| | | beginObj() { |
| | | this.titleTop = '2.6rem'; |
| | |
| | | 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); |
| | |
| | | .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 { |
| | |
| | | } |
| | | |
| | | .main { |
| | | margin-top: 0.625rem; |
| | | |
| | | .m-title { |
| | | width: 100%; |
| | | height: 2rem; |
| | |
| | | padding-bottom: 0.5rem; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | } |
| | | |
| | | .m-main { |