You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
3.3 KiB
2 lines
3.3 KiB
11 months ago
|
import{$ as a,q as s,u as e,ai as t,o as l,c as i,w as o,a as n,b as r,d as c,F as u,i as d,y as m,k as _,e as f,f as p,t as h,l as v,g}from"./index-4ddb689d.js";import{M as x,_ as y}from"./mescroll-mixins.a7931123.js";import{r as k}from"./uni-app.es.24af5d4f.js";import{W as S}from"./wxofficial.956096a5.js";import{_ as w}from"./_plugin-vue_export-helper.1b428a4d.js";const L="live.room/list";const b=w({mixins:[x,S],data:()=>({upOption:{auto:!0,page:{size:15},noMoreSize:3},list:s()}),onLoad(a){this.getLiveRoomList(),this.setWxofficialShareData()},methods:{upCallback(a){const s=this;s.getLiveRoomList(a.num).then((a=>{const e=a.data.length,t=a.data.total;s.mescroll.endBySize(e,t)})).catch((()=>s.mescroll.endErr()))},getLiveRoomList(s=1){const t=this;return new Promise(((l,i)=>{var o;(o={page:s},a.get(L,o)).then((a=>{const i=a.data.list;t.list.data=e(i,t.list,s),l(i)})).catch(i)}))},onTargetLiveRoom(a){const{platform:s,$toast:e}=this;if("MP-WEIXIN"!==s)return void e("很抱歉,直播间仅支持微信小程序,请前往微信小程序端");const l=t({path:"pages/index/index"});wx.navigateTo({url:`plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${a}&custom_params=${encodeURIComponent(JSON.stringify(l))}`})},setWxofficialShareData(){this.updateShareCardData({title:"直播列表"})}},onShareAppMessage(){return{title:"直播列表",path:"/pages/live/index?"+this.$getShareUrlParams()}},onShareTimeline(){return{title:"直播列表",path:"/pages/live/index?"+this.$getShareUrlParams()}}},[["render",function(a,s,e,t,x,S){const w=v,L=d,b=g,C=k(m("mescroll-body"),y);return l(),i(C,{ref:"mescrollRef",sticky:!0,onInit:a.mescrollInit,down:{native:!0},onDown:a.downCallback,up:x.upOption,onUp:S.upCallback},{default:o((()=>[n(L,{class:"live-room-list"},{default:o((()=>[(l(!0),r(u,null,c(x.list.data,((a,s)=>(l(),i(L,{key:s,onClick:s=>S.onTargetLiveRoom(a.room_id),class:_([`live-room-item live-status__${a.live_status}`])},{default:o((()=>[n(L,{class:"room-head dis-flex flex-y-center"},{default:o((()=>[101==a.live_status?(l(),i(w,{key:0,class:"live-status_icon iconfont icon-zhibozhong"})):f("",!0),102==a.live_status?(l(),i(w,{key:1,class:"live-status_icon iconfont icon-shijian-s"})):f("",!0),a.live_status>=103?(l(),i(w,{key:2,class:"live-status_icon iconfont icon-shipin"})):f("",!0),n(w,{class:"live-status_text"},{default:o((()=>[p(h(a.live_status_text_1),1)])),_:2},1024)])),_:2},1024),n(L,{class:"room-name oneline-hide"},{default:o((()=>[n(w,null,{default:o((()=>[p(h(a.room_name),1)])),_:2},1024)])),_:2},1024),n(L,{class:"room-cover"},{default:o((()=>[n(b,{class:"image",src:a.share_img,mode:"aspectFill"},null,8,["src"])])),_:2},1024),n(L,{class:"room-anchor dis-flex"},{default:o((()=>[n(L,{class:"lay-left flex-box dis-flex flex-y-center"},{default:o((()=>[n(L,{class:"anchor-avatar"},{default:o((()=>[n(b,{class:"image",src:a.share_img,mode:"aspectFill"},null,8,["src"])])),_:2},1024),n(L,{class:"anchor-name"},{default:o((()=>[n(w,null,{default:o((()=>[p(h(a.anchor_name),1)])),_:2},1024)])),_:2},1024)])),_:2},1024),n(L,{class:"lay-right"},{default:o((()=>[n(w,{class:"live-status_text2"},{default:o((()=>[p(h(a.live_status_text_2),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick","class"])))),128))])),_:1})])),_:1},8,["onInit","onDown","up","onUp"])}],["__scopeId","data-v-ae3d166d"]]);export{b as default};
|