vue h5頁(yè)面 使用第三方聊天(環(huán)信集成web端)

項(xiàng)目需求: 實(shí)時(shí)聊天驰后,發(fā)送文字肆资,圖片,以及文件 (該項(xiàng)目使用vant + vue 搭建)

首先灶芝,聊天也是我第一次寫郑原,之前只是維護(hù)唉韭,第一次采取了自己搭建的,源于后臺(tái)協(xié)商socket-io 服務(wù)器比較難搭建犯犁,本著時(shí)間緊任務(wù)重的原因纽哥,最后果斷采取了第三方聊天,在網(wǎng)上百度了好多資料栖秕,最后還是決定使用環(huán)信春塌。官方文檔屬實(shí)是不想看,后來就瘋狂百度簇捍,發(fā)現(xiàn)總是差一下只壳,最后還是自己摸索吧。

[環(huán)信官方文檔]: web集成官方文檔

第一步: 需要注冊(cè)環(huán)信即時(shí)通信云獲得appkey暑塑,注冊(cè)賬號(hào)之后登錄環(huán)信后臺(tái)創(chuàng)建應(yīng)用就可以得到appkey

第二步: 在vue項(xiàng)目中安裝插件 npm install easemob-websdk --save
在main.js里引入 import websdk from 'easemob-websdk'

第三步: 在util里新建一個(gè)文件夾WebIM吼句,文件夾下新建WebimConfig.js

const config = {
    xmppURL: 'im-api.easemob.com',            // xmpp Server地址,對(duì)于在console.easemob.com創(chuàng)建的appKey事格,固定為該值
    // apiURL: 'http://a1.easemob.com',          // rest Server地址惕艳,對(duì)于在console.easemob.com創(chuàng)建的appkey,固定為該值
    apiURL: (location.protocol === 'https:' ? 'https:' : 'http:') + '//a1.easemob.com',
    appkey: '678659375498374#demo',        // App key
    https : false,                            // 是否使用https
    isHttpDNS: true,                         //防止DNS劫持從服務(wù)端獲取XMPPUrl驹愚、restUrl
    isMultiLoginSessions: false,              // 是否開啟多頁(yè)面同步收消息远搪,注意,需要先聯(lián)系商務(wù)開通此功能
    isAutoLogin: true,  
    isWindowSDK: false,
    isSandBox: false,                      // 自動(dòng)出席逢捺,(如設(shè)置為false谁鳍,則表示離線,無法收消息劫瞳,需要在登錄成功后手動(dòng)調(diào) 用conn.setPresence()才可以收消息)
    isDebug: false,                           // 打開調(diào)試倘潜,會(huì)自動(dòng)打印log,在控制臺(tái)的console中查看log
    autoReconnectNumMax: 2,                   // 斷線重連最大次數(shù)
    autoReconnectInterval: 2,                 // 斷線重連時(shí)間間隔
    isWebRTC: (/Firefox/.test(navigator.userAgent) || /WebKit/.test(navigator.userAgent)) && /^https\:$/.test(window.location.protocol),
    heartBeatWait: 4500,                       // 使用webrtc(視頻聊天)時(shí)發(fā)送心跳包的時(shí)間間隔志于,單位ms
    msgStatus: true,
    delivery: true,                            // 是否發(fā)送已讀回執(zhí)
    read: true,
    saveLocal: false,                      
    encrypt: {
        type: 'none'
    },
    useOwnUploadFun: true     //發(fā)送url圖片消息
}

export default config;

第四步: 將WebimConfig.js這個(gè)文件在main.js里引入
import webimconfig from './util/WebIM/WebimConfig'

//vue集成通信
import websdk from 'easemob-websdk'
import webimconfig from './util/WebIM/WebimConfig'
// 環(huán)信
let WebIM = window.WebIM = websdk;
WebIM.config = webimconfig;
// 環(huán)信實(shí)例
var conn = WebIM.conn = new WebIM.connection({
  appKey: WebIM.config.appkey,
  isHttpDNS: WebIM.config.isHttpDNS,
  isMultiLoginSessions: WebIM.config.isMultiLoginSessions,
  https: WebIM.config.https,
  url: WebIM.config.xmppURL,
  apiUrl: WebIM.config.apiURL,
  isAutoLogin: true,
  heartBeatWait: WebIM.config.heartBeatWait,
  autoReconnectNumMax: WebIM.config.autoReconnectNumMax,
  autoReconnectInterval: WebIM.config.autoReconnectInterval,
  isStropheLog: WebIM.config.isStropheLog,
  delivery: WebIM.config.delivery
})
var optionsIm = {
  apiUrl: WebIM.config.apiURL,
  user: '', //換成自己申請(qǐng)的賬號(hào)就行涮因,密碼也需要換  
  pwd: '',
  appKey: WebIM.config.appkey,
  success: function (res) {
    console.log('鏈接服務(wù)器正常')
  },
  error: function (err) {
    console.log(err)
  }
}
Vue.prototype.$WebIM = WebIM;
Vue.prototype.$imconn = conn
Vue.prototype.$imoption = optionsIm;

第五步: 我這個(gè)項(xiàng)目沒有注冊(cè),我直接在登錄里拿到賬號(hào)密碼伺绽,存儲(chǔ)起來养泡,傳到后臺(tái),并入環(huán)信憔恳。

//測(cè)試賬號(hào)
        this.$imoption.user = this.login_userName
        this.$imoption.pwd = this.login_password
        //存儲(chǔ)賬號(hào)密碼
        this.saveGetUserInfo({name: this.login_userName, word: this.login_password })
        this.$imconn.open(this.$imoption);
        // 監(jiān)聽回調(diào)
        this.$imconn.listen({
          onOpened: function() {
            console.log("用戶已上線");
          },
          onClosed: function() {
            console.log("用戶下線");
          },
        });

第六步: 在聊天頁(yè)發(fā)送(接收)文本消息瓤荔,圖片净蚤,以及文件

<template>
    <div id="ChatInterface">
        <van-nav-bar :title='title'
                     :fixed=true
                     :border=false
                    @click-left="onClickLeft"
                     left-arrow
                     style="height:0.88rem" />

        <div class="box">
            <div class="content">
                <van-divider v-if="charList.length == 0" :style="{ color: '#000', borderColor: '#ccc', padding: '0 16px',fontSize: '.28rem',fontWeight: '300' }">暫無聊天記錄</van-divider>
                <div v-else >
                    <ul v-for="(item,index) in charList" :key="index">
                        <li :class="userInfo.member_id != item.member_id ? 'msg-other': 'msg-me'" >
                            <p v-if="item.if_show_time">{{item.insert_time_date}}</p>
                            <div class="message">
                                <div class="message_i">
                                    <img class="message_image" :src="userInfo.member_id != item.member_id ? item.avatar: userInfo.member_avatar" alt="">
                                </div>
                                <!-- 文本 -->
                                <div class="content" v-if="item.content">{{item.content}}</div>
                                <!-- 圖片 -->
                                <img class="image_con" v-if="item.image" :src="item.image" alt="">
                                <!-- 文件 -->
                                <div class="document" v-if="item.document" @click="godownFile(item.document)">
                                    <div class="doc_one">
                                        <p class="file_title">{{item.fileName}}</p>
                                        <p class="file_size"></p>
                                    </div>
                                    <img class="file_image" :src="downFile" alt="">
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>

            <div class="Bottom">
                <div class="replyInput">
                    <img :src="images.comment" />
                    <van-field
                            v-model="currentValue"
                            rows="1"
                            autosize
                            ref="testArea"
                            type="textarea"
                            placeholder="發(fā)消息..."
                    />
                </div>
                <div class="sendclick" v-if="currentValue?false:true">
                    <!-- 發(fā)送文件 -->
                    <van-uploader class="save" :after-read="afterRead" accept=".txt, .pdf, .doc, .docx, .xls, .xlsx">
                        <img :src="images.file" />
                    </van-uploader>
                    <!-- 發(fā)送圖片 -->
                    <van-uploader class="save" :after-read="afterPicture" accept="image/*">
                        <img :src="images.picture" />
                    </van-uploader>
                </div>
                <div @click="submit" v-if="currentValue?true:false" class="send">發(fā)送</div>

            </div>
        </div>


        <!--路由的出口-->
        <transition name="router-slider"
                    mode="out-in">
            <router-view></router-view>
        </transition>

    </div>

</template>

<script type="text/javascript">
import { Toast } from 'vant';
import { memberMessageList,memberLeaveMessage,memberChatFiles } from '../../../api/notificationChat'
import ChatMessage from './ChatMessage.vue'
import { mapState } from 'vuex'
import axios from "axios";
    export default {
        name: "chatInterface",
        data(){
            return{
                currentValue:'',//輸入內(nèi)容
                title: this.$route.query.member_name ? this.$route.query.member_name : '聊天名稱',
                messageBy_id: this.$route.query.by_id ? this.$route.query.by_id : '',   //聊天發(fā)送消息傳入聊天列表頁(yè)的by_id
                charList:[],
                fileImg:'',   //文件
                $imconn: {},
                $imoption: {},
            }
        },
        created(){
            //聲明調(diào)用
            this.$imconn = this.$imconn;
            this.$imoption = this.$imoption;
            this.loginWebIM()

            //調(diào)用聊天記錄接口
            that.messageList(this.detailId,this.chatId)
            
        },
        watch:{
            //監(jiān)聽接收頁(yè)面?zhèn)鬟^來的動(dòng)態(tài)值
            '$route.query': function(){
                //判斷聊天窗口的title是否為空
                this.title = this.$route.query.member_name;
                this.messageBy_id = this.$route.query.by_id
                if (this.source == 1) {
                    //調(diào)用聊天記錄接口
                    this.messageList('',this.chatId)
                }else if(this.source == 2){
                    this.messageList(this.detailId,'')   //獲取聊天記錄
                }
            },

        },
        //進(jìn)入頁(yè)面滑動(dòng)到底部
        updated(){
            this.scrollToBottom();
        },
        methods: {
            //登錄環(huán)信
            loginWebIM(){
                //拿到存儲(chǔ)后的賬號(hào)密碼賦值
                this.$imoption.user = this.name
                this.$imoption.pwd = this.word
                this.$imconn.open(this.$imoption);
                // open方法钥组,傳入掛載在vue實(shí)例上的配置對(duì)象
                let _this = this;
                this.$imconn.listen({
                    onOpened: function (message) {
                        console.log('用戶已接收') // 控制臺(tái)打印出這句證明連接成功啦
                    },
                    onClosed: function (message) {
                        console.log('用戶未接收')
                    },
                    // 集成收到文本信息方法
                    onTextMessage: function ( message ) {
                        // console.log(message)
                        _this.charList.push({
                            avatar: message.ext.avatar,
                            content: message.data,
                            imgUrl: message.ext.url,
                            member_id: message.ext.member_id,
                            insert_time_date: message.ext.insert_time_date,
                            insert_time: message.ext.insert_time,
                            member_name: message.ext.member_name
                        });
                    },
                    //收到圖片消息
                    onPictureMessage: function ( message ) {
                        // console.log(message)
                        _this.charList.push({
                            avatar: message.ext.avatar,
                            member_id: message.ext.member_id,
                            insert_time_date: message.ext.insert_time_date,
                            insert_time: message.ext.insert_time,
                            member_name: message.ext.member_name,
                            image: message.ext.url
                        });
                    },
                    //收到文件消息
                    onFileMessage: function ( message ) {
                        // console.log(message)
                        _this.charList.push({
                            avatar: message.ext.avatar,
                            member_id: message.ext.member_id,
                            insert_time_date: message.ext.insert_time_date,
                            insert_time: message.ext.insert_time,
                            member_name: message.ext.member_name,
                            document: message.ext.fileUrl,
                            fileName:message.ext.fileName,
                            fileLength: message.ext.fileLength
                        });
                    },    

                })
            },
            // 返回
            onClickLeft () {
                this.$router.back();
            },
            //文件按鈕
            afterRead(file) {
                // 此時(shí)可以自行將文件上傳至服務(wù)器
                let formData = new FormData()
                formData.append('file',file.file)
                formData.append('id',this.detailId)
                formData.append('chat_id',this.chatId)
                formData.append('image','')
                // 添加請(qǐng)求頭
                memberChatFiles (formData).then(res => {
                    if (res.data.status == 1) {
                        let filedata = res.data.data
                        var id = this.$imconn.getUniqueId();        // 生成本地消息id
                        var msg = new WebIM.message('file', id);        // 創(chuàng)建文件消息
                        var time = +new Date()
                        let _this = this;    // 創(chuàng)建文本消息
                        msg.set({
                            file: file,
                            chatType: 'singleChat',    //單聊
                            ext: {          //ext擴(kuò)展   將參數(shù)可放置這里
                                time: time,
                                fileUrl: filedata.document,
                                fileName: filedata.fileName,
                                fileLength: file.file.size,
                                avatar: filedata.avatar,
                                member_id: filedata.member_id,
                                member_name: filedata.member_name,
                                insert_time_date: filedata.insert_time_date,
                                insert_time: filedata.insert_time
                            },
                            to: this.title,  // 接收消息對(duì)象 (指的是跟你會(huì)話的人存入環(huán)信的賬號(hào))
                            onFileUploadError: function () {      // 消息上傳失敗
                                console.log('onFileUploadError');
                            },
                            onFileUploadProgress: function (e) { // 上傳進(jìn)度的回調(diào)
                                console.log(e)
                            },
                            onFileUploadComplete: function () {   // 消息上傳成功
                                console.log('文件上傳成功');
                            },
                            success: function () {                // 消息發(fā)送成功
                                console.log('文件已發(fā)送')
                                _this.charList.push({            //將數(shù)據(jù)push數(shù)組內(nèi),展示在頁(yè)面(指自己發(fā)送的這方)
                                    avatar: filedata.avatar,
                                    member_id: filedata.member_id,
                                    insert_time_date: filedata.insert_time_date,
                                    insert_time: filedata.insert_time,
                                    member_name: filedata.member_name,
                                    document: filedata.document,
                                    fileName: filedata.fileName
                                });
                                _this.keepbottom();
                            },
                            fail: function(e){
                                console.log("Fail");              //如禁言今瀑、拉黑后發(fā)送消息會(huì)失敗
                            },
                            flashUpload: WebIM.flashUpload,
                        });
                        msg.body.chatType = "singleChat";
                        this.$imconn.send(msg.body);
                    }else{
                        Toast(res.message)
                    }
                })
            },
            //圖片
            afterPicture(file){
                let formData = new FormData()
                formData.append('file','')
                formData.append('id',this.detailId)
                formData.append('chat_id',this.chatId)
                formData.append('image',file.file)
                // 添加請(qǐng)求頭
                memberChatFiles (formData).then(res => {
                    if (res.data.status == 1) {
                        this.fileImg = res.data.data.image
                        let imagedata = res.data.data
                        var id = this.$imconn.getUniqueId();        // 生成本地消息id
                        var msg = new WebIM.message('img', id);        // 創(chuàng)建圖片消息
                        var time = +new Date()
                        let _this = this;    // 創(chuàng)建文本消息
                        msg.set({
                            body:{
                                type: 'image',
                                url: this.fileImg,
                                filename: file.file.name,
                                filetype: file.file.type
                            },
                            ext: {
                                time: time,
                                url: this.fileImg,
                                avatar: imagedata.avatar,
                                member_id: imagedata.member_id,
                                insert_time_date: imagedata.insert_time_date,
                                insert_time: imagedata.insert_time,
                                member_name: imagedata.member_name
                            },
                            to: this.title,  // 接收消息對(duì)象
                            success: function(){
                                console.log('圖片已發(fā)送')
                                _this.charList.push({
                                    avatar: imagedata.avatar,
                                    image: imagedata.image,
                                    member_id: imagedata.member_id,
                                    insert_time_date: imagedata.insert_time_date,
                                    insert_time: imagedata.insert_time,
                                    member_name: imagedata.member_name
                                });
                                _this.keepbottom();
                            },
                            flashUpload: WebIM.flashUpload 
                        });
                        msg.body.chatType = "singleChat";
                        this.$imconn.send(msg.body);
                    }else{
                        Toast(res.data.message)
                    }
                })
            },
            //獲取聊天記錄
            messageList(id,chat_id){
                //獲取聊天記錄
                memberMessageList(id,chat_id).then(res => {
                    // console.log(res)
                    if(res.status == 1){
                        this.charList = res.data;
                    }
                    if(res.status == '-1'){
                        Toast(res.message)
                        this.$router.go(-1)
                    }
                })
            },
            getMessage (item, index) {
                this.getTime(item, index)
                return this.charList[index]
            },
            //處理時(shí)間5分鐘內(nèi)不展示
            getTime (item, index) {
                let time = item.insert_time
                //定義一個(gè)if_show_time默認(rèn)false  不顯示
                this.charList[index]['if_show_time'] = false
                if (index) {
                    if (Math.abs(this.charList[index - 1]['show_time'] - time) > 30) {
                        this.charList[index]['show_time'] = time
                        this.charList[index]['if_show_time'] = true
                    } else {
                        this.charList[index]['show_time'] = this.charList[index - 1]['show_time']
                    }
                } else {
                    this.charList[index]['show_time'] = time
                    this.charList[index]['if_show_time'] = true
                }
            },
            //進(jìn)入頁(yè)面滑動(dòng)到底部
            scrollToBottom() {
                this.$nextTick(() => {
                    var container = this.$el.querySelector('.content');
                    //content
                    container.scrollTop = container.scrollHeight
                })
            },
            //發(fā)送
            submit(){
                if (this.currentValue=='') {
                    Toast('請(qǐng)?zhí)顚憙?nèi)容')
                    return
                }
                memberLeaveMessage(this.detailId,this.messageBy_id,this.currentValue).then(res => {
                    // console.log(res)
                    if (res.status == 1) {
                        let receivemsg = res.data

                        var id = this.$imconn.getUniqueId();        // 生成本地消息id
                        var msg = new WebIM.message('txt', id);
                        var time = +new Date()
                        let _this = this;    // 創(chuàng)建文本消息
                        //生成本地消息id
                        msg.set({
                            msg: this.currentValue, // 消息內(nèi)
                            from: this.name,
                            to: this.title, // 接收消息對(duì)象(用戶id)
                            roomType: true,
                            // ext表示拓展對(duì)象程梦,這個(gè)會(huì)隨著你發(fā)送而發(fā)送過去点把,你接收時(shí)同樣可以拿到這個(gè)數(shù)據(jù)
                            ext: {
                                time: time,
                                avatar: receivemsg.avatar,
                                member_id: receivemsg.member_id,
                                insert_time_date: receivemsg.insert_time_date,
                                insert_time: receivemsg.insert_time,
                                member_name: receivemsg.member_name
                            },
                            success: function(id, serverMsgId) {
                                //  追加本地緩存處理
                                // console.log(msg);
                                //發(fā)送成功數(shù)據(jù)
                                console.log("消息發(fā)送成功");
                                //把發(fā)送者的頭像和文本數(shù)據(jù)push到數(shù)組中在頁(yè)面上展示
                                _this.charList.push({
                                    avatar: receivemsg.avatar,
                                    content: msg.value,
                                    member_id: receivemsg.member_id,
                                    insert_time_date: receivemsg.insert_time_date,
                                    insert_time: receivemsg.insert_time,
                                    member_name: receivemsg.member_name
                                });
                                
                                _this.keepbottom();
                            },
                            fail: function(e) {
                                // 失敗原因:
                                // e.type === '603' 被禁言
                                // e.type === '605' 群組不存在
                                // e.type === '602' 不在群組或聊天室中
                                // e.type === '504' 撤回消息時(shí)超出撤回時(shí)間
                                // e.type === '505' 未開通消息撤回
                                // e.type === '506' 沒有在群組或聊天室白名單
                                // e.type === '501' 消息包含敏感詞
                                // e.type === '502' 被設(shè)置的自定義攔截捕獲
                                // e.type === '503' 未知錯(cuò)誤
                                console.log("消息發(fā)送失敗");
                            }
                        });
                        msg.body.chatType = "singleChat";
                        this.$imconn.send(msg.body);

                        this.currentValue = ''
                    }
                })
            },
            godownFile(fileUrl){
                window.open(fileUrl);
            }

        },

    }
</script>
到此就是完整的聊天頁(yè)面了,可以進(jìn)行實(shí)時(shí)聊天發(fā)送圖片以及文件屿附,有不完善或者更好的方案的可以跟我交流郎逃,后續(xù)如果有語(yǔ)音,視頻挺份,推送等功能會(huì)繼續(xù)更新…
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末褒翰,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子匀泊,更是在濱河造成了極大的恐慌优训,老刑警劉巖,帶你破解...
    沈念sama閱讀 218,546評(píng)論 6 507
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件各聘,死亡現(xiàn)場(chǎng)離奇詭異揣非,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)躲因,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,224評(píng)論 3 395
  • 文/潘曉璐 我一進(jìn)店門早敬,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人大脉,你說我怎么就攤上這事搞监。” “怎么了镰矿?”我有些...
    開封第一講書人閱讀 164,911評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵腺逛,是天一觀的道長(zhǎng)。 經(jīng)常有香客問我衡怀,道長(zhǎng)棍矛,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,737評(píng)論 1 294
  • 正文 為了忘掉前任抛杨,我火速辦了婚禮够委,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘怖现。我一直安慰自己茁帽,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,753評(píng)論 6 392
  • 文/花漫 我一把揭開白布屈嗤。 她就那樣靜靜地躺著潘拨,像睡著了一般。 火紅的嫁衣襯著肌膚如雪饶号。 梳的紋絲不亂的頭發(fā)上铁追,一...
    開封第一講書人閱讀 51,598評(píng)論 1 305
  • 那天,我揣著相機(jī)與錄音茫船,去河邊找鬼琅束。 笑死扭屁,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的涩禀。 我是一名探鬼主播料滥,決...
    沈念sama閱讀 40,338評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼,長(zhǎng)吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼艾船!你這毒婦竟也來了葵腹?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,249評(píng)論 0 276
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤屿岂,失蹤者是張志新(化名)和其女友劉穎礁蔗,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體雁社,經(jīng)...
    沈念sama閱讀 45,696評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡浴井,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,888評(píng)論 3 336
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了霉撵。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片磺浙。...
    茶點(diǎn)故事閱讀 40,013評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖徒坡,靈堂內(nèi)的尸體忽然破棺而出撕氧,到底是詐尸還是另有隱情,我是刑警寧澤喇完,帶...
    沈念sama閱讀 35,731評(píng)論 5 346
  • 正文 年R本政府宣布伦泥,位于F島的核電站,受9級(jí)特大地震影響锦溪,放射性物質(zhì)發(fā)生泄漏不脯。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,348評(píng)論 3 330
  • 文/蒙蒙 一刻诊、第九天 我趴在偏房一處隱蔽的房頂上張望防楷。 院中可真熱鬧,春花似錦则涯、人聲如沸复局。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,929評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)亿昏。三九已至,卻和暖如春档礁,著一層夾襖步出監(jiān)牢的瞬間角钩,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,048評(píng)論 1 270
  • 我被黑心中介騙來泰國(guó)打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留彤断,地道東北人野舶。 一個(gè)月前我還...
    沈念sama閱讀 48,203評(píng)論 3 370
  • 正文 我出身青樓易迹,卻偏偏與公主長(zhǎng)得像宰衙,于是被迫代替她去往敵國(guó)和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子睹欲,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,960評(píng)論 2 355

推薦閱讀更多精彩內(nèi)容

  • 最近做實(shí)時(shí)通訊供炼,項(xiàng)目需要集成環(huán)信IM,網(wǎng)上資料比較少窘疮,也是比較頭大袋哼,搗鼓了兩天,實(shí)現(xiàn)最基本的圖文交流功能闸衫,分享一下...
    Dr_喜禾閱讀 8,779評(píng)論 5 5
  • 作為一名常年混跡imGeek開發(fā)者社區(qū)的程序猿涛贯,本著響應(yīng)社區(qū)號(hào)召的“我為人人,人人為我”口號(hào)蔚出,贈(zèng)人玫瑰弟翘,手留余香。...
    imGeek閱讀 1,672評(píng)論 0 3
  • 在聯(lián)調(diào)頁(yè)面之前需要找到聯(lián)調(diào)平臺(tái),所以需要自己先建立一個(gè)測(cè)試公眾號(hào)方便之后的頁(yè)面聯(lián)調(diào); 一骄酗、建立測(cè)試號(hào)1.(有公眾號(hào)...
    雅雅_(tái)b45c閱讀 10,286評(píng)論 1 3
  • 本文以一個(gè)小例子簡(jiǎn)單的演示在微信小程序中使用環(huán)信SDK收發(fā)消息稀余。 官網(wǎng)demo 下載后把整個(gè)utils目錄下的文件...
    mirrorzyb閱讀 12,482評(píng)論 5 6
  • 記錄貼部分內(nèi)容轉(zhuǎn)載自:《VUE項(xiàng)目集成環(huán)信webIM隨筆》 最新版本環(huán)信這個(gè)方法已經(jīng)不適用了,詳情跳轉(zhuǎn)Vue中集成...
    北悸安涼_b2de閱讀 3,575評(píng)論 8 1