From 18c99cd668f8fd61fd54b751b82be0648f6edb0c Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Thu, 27 Aug 2020 11:06:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E9=93=83=E5=A3=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pageD/privateChat/privateChat.vue | 3 +++ pages/zhibo/index.nvue | 2 +- static/imservice.js | 12 ++++++++++++ static/music.mp3 | Bin 0 -> 11582 bytes 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 static/music.mp3 diff --git a/pageD/privateChat/privateChat.vue b/pageD/privateChat/privateChat.vue index a34f460..2cf173c 100644 --- a/pageD/privateChat/privateChat.vue +++ b/pageD/privateChat/privateChat.vue @@ -128,6 +128,8 @@ this.friend = JSON.parse(options.id); this.currentUser = this.imService.currentUser; let privateMessages = this.imService.getPrivateMessages(this.friend.uuid); + this.imService.uid = this.friend.uuid; + this.messages = privateMessages.sentMessages; this.pendingMessages = privateMessages.pendingMessages; @@ -153,6 +155,7 @@ this.imService.onPrivateHistoryLoad = (friendId, messages) =>{}; //将未读消息数清零 this.imService.resetFriendUnReadMessage(this.friend); + this.imService.uid = 0; }, methods: { bindtapInput(){ diff --git a/pages/zhibo/index.nvue b/pages/zhibo/index.nvue index 3050fb9..876bf7a 100644 --- a/pages/zhibo/index.nvue +++ b/pages/zhibo/index.nvue @@ -29,7 +29,7 @@ - + 发送 diff --git a/static/imservice.js b/static/imservice.js index b276f2c..9d85284 100644 --- a/static/imservice.js +++ b/static/imservice.js @@ -8,6 +8,8 @@ import GoEasyIM from './goeasy-im-1.0.9'; // import GoEasyIM from './goeasy-im-1.1.1'; import restApi from './restapi'; +import music from './music.mp3' + function Friend(uuid, name, avatar,time = "", text = "",date = "",unReadMessage = 0) { this.uuid = uuid; @@ -52,6 +54,8 @@ function IMService() { //群聊消息记录,map格式,每个群对应一个数组 this.groupMessages = {}; + + this.uid = 0; /* * 监听器们 @@ -283,6 +287,14 @@ IMService.prototype.initialIMListeners = function () { friends.sort(paixu) } + if(message.senderId != this.uid){ + const innerAudioContext = uni.createInnerAudioContext(); + innerAudioContext.autoplay = true; + innerAudioContext.src = music; + innerAudioContext.onPlay(() => { + console.log('开始播放'); + }); + } let that = this if(!friend && friend == undefined){ diff --git a/static/music.mp3 b/static/music.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..61c030bcb44530063108076ea7d4c076d463f9b9 GIT binary patch literal 11582 zcmeI2WmFtZx9=Mb?hq^l1_?5_LvRQZe1b!8w*UbGgfI{Y8XSVVy95YMg1bW?SRlA1 zXpo`r@VxJP*Scq|`{|sI=f7sHuAV(zwYz^+y?51=vOGUJaId#7^!4?TM-l))b2fKy zbvLzeH+QiD++Neu1OK)W-`nh6kTx%CcMp447l7wKCQ78q($)Eu`D=R%C+mM*>+$c4 zVK4<`#e~RTsG57(2#Rp=iE{Ds@Z7ihZ-F-=|0(`|kIF7Ku1F)Y8h{!ApkDw20s=~; z7?9#XN)RbYq?DADw2?AG${HzGq~0JE6ciMNR1#9zNR=X0hg2Ifz$y~ z7f691c<&6-XG^5df&%v^{}B_$)xV0+FW5Ba4gdN2zaGJxH&y`QZve1ITCe~BpB?~E zke>qNDY7U42LN=OfaM<(^IZC;|{S~?)oZrG$HTqKSJyq72lVy7f$C`$WEx;$lgb7OMy4y zwF4!MuE=I0LU>AQ%;>-54wQn|Y!R&HAz|X;BHgs1V6JL+^gphEcW#D@jX_sQFA}90 zXYu|#N&WG@SR`)utt~|bE9VG1lLOw(Q{p3nCEfV2GvC}S=JV$K{&3%b|M&o&MjY8! ztAa6|;N5K0)jlbX557o*OrJ*?3V@CQj?4s-;d-&s^PP45eTF&mp@6lpo}Y0wC*yAj z5cUe9gg@{~ARhP$!8Jj}1Ag0~MM;bCu?nCUv3!k{`=<%5+*Bb2IFB?{54@0vFZewq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tHLK75LtD-iax5I4PM~$>Ix4P|hqf$s z*ZWB~^~%E`~GH^G(x$9e_`SiUu`^RPXB!()hCWGA}9POArx1+SlZ&M((Ose=2Xa z4ex~XTJK5+?kgvXl%&X?dVVRNWVXE<$&wKPubqxqoa3A8BJO!HVVz0nK7Sr#xCRBV zV$mTk1m^}E1QNLLWxxWCTtEB~%~knw_!f&F-MyV zrTz5oj<%T)8lB(yx67)q@nk0pq05hUO%;QS_Qy9Z@%tst)#WZ($=PF3@Xy^}7bSFK zCXjAmmrxUn`BfH$o1~JY_cy(IKJa7SG!3A9TUpOy_T;8vWGlFjB1W(IxZlf9_cBnAqp$X!L0@7o3UZsLl-)sclO-B*SpA{%L7F z<9N?YB<%DEHrO30@Jg@?xqb)%i12gSI18MmSO3L}gp(Cd@LDI^-xPfLd_7=a>a$JG zy6(R5>Jrq$Skc?iF!W?EKw@?8rn*D+*c0Dmn0cA-gff-+rRtPBekEH;ubX)e6WSwX zxi~z&(1l;p5FvcrbpHuf15FtsdU#-uM?D*AthBasQ+39V47MKaV(Jr8Z^ndav9KzSMr( zvFw>|E41zTH3zNvpy|Pvl`7<0x~rh|YQ)~&)!K8SOu<$Dr@Z?j}y4nHyE~4-^KvhL~v&qU` zItTU>dGUG$0v>|1S$KM}?cGY96)^(Q~1hqqWqc)w2_~1>Yn%Fy* zUUF1J&UltmJ1&*;JcWG4AZ)CS+D=pK1^HiZlAvPqJSpr45aS4`<)I*@U93+E^cA4S=+6U%-|EX;==aD^Ml;LAoQIb zhq<9>)w*}jDxEq(@MI87yx;V=86TIxVe|-J9~%83oL)=X%mO>-v$nu`Oz=z`X(Y6} zn?=T~^f7o1 Date: Thu, 27 Aug 2020 12:15:55 +0800 Subject: [PATCH 2/2] 1 --- pages/index/index.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 6888b10..9f6e93b 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -262,7 +262,8 @@ loading: '努力加载中', nomore: '实在没有了' }, - refresher:true + refresher:true, + zqie:false } }, components: { @@ -354,7 +355,11 @@ tabLiveList() { uni.showLoading({ title: "loading..." - }) + }) + if(this.zqie){ + return ; + } + this.zqie = true; this.$u.api.tabLiveList({page:this.live_page}).then((res) => { // uni.stopPullDownRefresh(); this.status_live = "loading"; @@ -371,6 +376,7 @@ } else if (res.data.data.length == 0 && this.live_page > 1) { this.status_live = "nomore"; } else { + console.log(this.live_page,1223) this.tabLiveLists = this.tabLiveLists.concat(res.data.data); console.log(this.tabLiveLists) } @@ -381,6 +387,8 @@ } else { this.status_live = "nomore" } + this.zqie = false; + }) },