import socket from '$utils/socket';
import {NoticeType} from "$utils/socket/const";

import personalDetail from '$utils/control/personal-detail';

import roomList from '$utils/control/roomList';

export default <LibMixins>{

    methods:{

        fetch(obj){
          return roomList.getFollowRoomList(obj.data).then(function (data){
              return obj.success(data.data);
          }).catch(obj.fail);
        },

        openUserDetail(item){
            return personalDetail.openDetail({
                uid: item.uid
            });
        }

    },

    created(){
        roomList.on('view-room',{
            vm:this
        });
    },
    beforeUnmount() {
        roomList.on('view-room',{
            vm:this
        });
    }

}