智慧保安互联网APP
zengh
2021-08-13 3298665410b5d275ec3b90edb7f387f46d86b9ae
初版集成
2 files modified
78 ■■■■ changed files
components/contacts/contacts.vue 24 ●●●● patch | view | raw | blame | history
pages/groupChat/groupChat.vue 54 ●●●● patch | view | raw | blame | history
components/contacts/contacts.vue
@@ -13,18 +13,6 @@
            </view>
        </view>
        <view class="inPColumn" v-if="fromW == 1">
            <view class="left" @click="QZchating">
                <view class="top">
                    <view class="userImg">
                        <img class="img" :src=Pdata.avatar>
                    </view>
                    <view class="t-type">{{Pdata.GroupName}}</view>
                    <!-- <view class="t-id">{{Pdata.postTime}}</view> -->
                </view>
                <view class="bottom">{{Pdata.GroupContent}}</view>
            </view>
        </view>
        <view class="inPColumn" v-if="fromW == 2">
            <view class="left" @click="TXLchating">
                <view class="top">
                    <view class="userImg">
@@ -36,6 +24,18 @@
                <view class="bottom">电话:{{Pdata.phone}}</view>
            </view>
        </view>
        <view class="inPColumn" v-if="fromW == 2">
            <view class="left" @click="QZchating">
                <view class="top">
                    <view class="userImg">
                        <img class="img" :src=Pdata.avatar>
                    </view>
                    <view class="t-type">{{Pdata.GroupName}}</view>
                    <!-- <view class="t-id">{{Pdata.postTime}}</view> -->
                </view>
                <view class="bottom">{{Pdata.GroupContent}}</view>
            </view>
        </view>
    </view>
</template>
pages/groupChat/groupChat.vue
@@ -6,8 +6,8 @@
        
        <view style="height:205rpx;"></view>
        <view class="tab" style="position: fixed;top: 0;width: 100%;height: 205rpx;z-index: 100;">
            <u-navbar style="position: relative;left: -20rpx;" :is-fixed="false" :border-bottom="false" :is-back="false" title="好友"
                :background="{ background: '#0BB9C8' }" title-color="#fff">
            <u-navbar style="position: relative;left: -20rpx;" :is-fixed="false" :border-bottom="false" :is-back="false"
                title="好友" :background="{ background: '#0BB9C8' }" title-color="#fff">
                <image slot="right" src="/static/images/home/message.png" class="message-icon" mode="widthFix"></image>
            </u-navbar>
            <u-tabs :list="list" :is-scroll="false" :current="current" active-color="#14B9C8" inactive-color="#595959"
@@ -31,7 +31,7 @@
                        <div class="m-main">
                            <!-- <view class="inTitle">{{Task}}</view> -->
                            <view class="inTmain">
                                <contacts v-for="(item,index) in dataListQZ" :key="index" :Pdata="item" :fromW="indexs"
                                <contacts v-for="(item,index) in dataListTXL" :key="index" :Pdata="item" :fromW="indexs"
                                    @refreshTask="refreshTask"></contacts>
                            </view>
                        </div>
@@ -42,7 +42,7 @@
                        <div class="m-main">
                            <!-- <view class="inTitle">{{Task}}</view> -->
                            <view class="inTmain">
                                <contacts v-for="(item,index) in dataListTXL" :key="index" :Pdata="item" :fromW="indexs"
                                <contacts v-for="(item,index) in dataListQZ" :key="index" :Pdata="item" :fromW="indexs"
                                    @refreshTask="refreshTask"></contacts>
                            </view>
                        </div>
@@ -61,7 +61,8 @@
    import navBarTop from '../../components/nav-bar-top/nav-bar-top.vue';
    export default{
        components: {
            navBarTop,contacts
            navBarTop,
            contacts
        },
        data() {
            return {
@@ -69,10 +70,10 @@
                        name: '正在聊天'
                    },
                    {
                        name: '群组'
                        name: '好友'
                    },
                    {
                        name: '好友'
                        name: '群组'
                    }
                ],
                swiperHeight: 0,
@@ -157,24 +158,6 @@
                    });
                }else if(this.current == 1){
                    uni.request({
                        url:"http://223.82.109.183:2080/api/chatgroup/selectList",
                        method:"POST",
                        data:{
                            senderId: WxStorage.get("ids")
                        },
                        success:(res)=> {
                            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";
                                }
                            }
                            that.dataListQZ = resdata;
                            that.swiperHeight = resdata.length * 85;
                        }
                    })
                }else if(this.current == 2){
                    uni.request({
                        url:"http://223.82.109.183:2080/api/blade-user/page?current=1&size=9999",
                        method:"get",
                        data:{
@@ -189,6 +172,25 @@
                                }
                            }
                            that.dataListTXL = resdata;
                            that.swiperHeight = resdata.length * 85;
                        }
                    })
                } else if (this.current == 2) {
                    uni.request({
                        url: "http://223.82.109.183:2080/api/chatgroup/selectList",
                        method: "POST",
                        data: {
                            senderId: WxStorage.get("ids")
                        },
                        success: (res) => {
                            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";
                                }
                            }
                            that.dataListQZ = resdata;
                            that.swiperHeight = resdata.length * 85;
                        }
                    })
@@ -315,10 +317,10 @@
            }
        }
    }
    .message-icon {
        width: 32rpx;
        height: auto;
        margin-right: 27rpx;
    }
</style>