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.
yanzong/public/assets/pages-live-index.afc28d6b.js

2 lines
3.3 KiB

11 months ago
import{$ as a,p as s,q as e,af as t,o as l,c as o,w as i,a as n,b as r,d as c,F as u,i as d,x as m,j as f,e as p,f as _,t as h,k as v,g}from"./index-ae8bbb19.js";import{M as x,_ as y}from"./mescroll-mixins.7cda1bf3.js";import{r as k}from"./uni-app.es.ee1d5b08.js";import{W as S}from"./wxofficial.cfa745b7.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,o)=>{var i;(i={page:s},a.get(L,i)).then((a=>{const o=a.data.list;t.list.data=e(o,t.list,s),l(o)})).catch(o)}))},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,j=k(m("mescroll-body"),y);return l(),o(j,{ref:"mescrollRef",sticky:!0,onInit:a.mescrollInit,down:{native:!0},onDown:a.downCallback,up:x.upOption,onUp:S.upCallback},{default:i((()=>[n(L,{class:"live-room-list"},{default:i((()=>[(l(!0),r(u,null,c(x.list.data,((a,s)=>(l(),o(L,{key:s,onClick:s=>S.onTargetLiveRoom(a.room_id),class:f([`live-room-item live-status__${a.live_status}`])},{default:i((()=>[n(L,{class:"room-head dis-flex flex-y-center"},{default:i((()=>[101==a.live_status?(l(),o(w,{key:0,class:"live-status_icon iconfont icon-zhibozhong"})):p("",!0),102==a.live_status?(l(),o(w,{key:1,class:"live-status_icon iconfont icon-shijian-s"})):p("",!0),a.live_status>=103?(l(),o(w,{key:2,class:"live-status_icon iconfont icon-shipin"})):p("",!0),n(w,{class:"live-status_text"},{default:i((()=>[_(h(a.live_status_text_1),1)])),_:2},1024)])),_:2},1024),n(L,{class:"room-name oneline-hide"},{default:i((()=>[n(w,null,{default:i((()=>[_(h(a.room_name),1)])),_:2},1024)])),_:2},1024),n(L,{class:"room-cover"},{default:i((()=>[n(b,{class:"image",src:a.share_img,mode:"aspectFill"},null,8,["src"])])),_:2},1024),n(L,{class:"room-anchor dis-flex"},{default:i((()=>[n(L,{class:"lay-left flex-box dis-flex flex-y-center"},{default:i((()=>[n(L,{class:"anchor-avatar"},{default:i((()=>[n(b,{class:"image",src:a.share_img,mode:"aspectFill"},null,8,["src"])])),_:2},1024),n(L,{class:"anchor-name"},{default:i((()=>[n(w,null,{default:i((()=>[_(h(a.anchor_name),1)])),_:2},1024)])),_:2},1024)])),_:2},1024),n(L,{class:"lay-right"},{default:i((()=>[n(w,{class:"live-status_text2"},{default:i((()=>[_(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};