| | |
| | | <!-- 自定义顶部导航栏 --> |
| | | <!-- <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"> |
| | |
| | | { |
| | | name: '群组' |
| | | }, |
| | | { |
| | | name: '通讯录' |
| | | } |
| | | // { |
| | | // name: '通讯录' |
| | | // } |
| | | ], |
| | | swiperHeight: 0, |
| | | zhanwei: '', //因为小程序中底部和顶部栏占位置,uniapp中不占位置 |
| | |
| | | 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") |
| | |
| | | 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; |
| | |
| | | }); |
| | | }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") |
| | |
| | | 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; |
| | |
| | | }) |
| | | }else if(this.current == 2){ |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api//blade-user/pages?current=1&size=9999", |
| | | url:that.$store.state.piAPI + "//blade-user/pagetxl?current=1&size=9999", |
| | | method:"get", |
| | | data:{ |
| | | senderId: WxStorage.get("ids") |
| | |
| | | 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.dataListTXL = resdata; |