1 |
- "use strict";const o=require("../../common/vendor.js"),a=require("../../api/list.js"),d=require("../../uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js"),u={mixins:[d.MescrollMixin],data(){return{list:[],liveId:null,downOption:{offset:80,use:!0,auto:!1},upOption:{use:!0,auto:!0,page:{num:0,size:10}},mescroll:null}},onLoad(){o.index.getStorageSync("AppToken")||o.index.navigateTo({url:"/pages/auth/login"})},methods:{goLive(e){this.liveId=e.liveId,console.log("要传的liveId",this.liveId),o.index.navigateTo({url:`/pages/home/living?liveId=${e.liveId}&immediate=true`})},mescrollInit(e){this.mescroll=e},downCallback(e){this.list=[],e.resetUpScroll()},upCallback(e){const s=e.num;let c={pageSize:e.size,page:s};a.liveList(c).then(l=>{if(l.code==200){let t=l.rows||[],i=t.length,n=l.total||0;s===1&&(this.list=[]),this.list=this.list.concat(t),e.endBySize(i,n)}else e.endErr(),o.index.showToast({title:l.msg,icon:"none"})}).catch(l=>{e.endErr(),console.log("请求异常:"+JSON.stringify(l))})}}};Array||o.resolveComponent("mescroll-body")();const m=()=>"../../uni_modules/mescroll-uni/components/mescroll-body/mescroll-body.js";Math||m();function g(e,s,r,c,l,t){return{a:o.f(l.list,(i,n,_)=>({a:i.liveImgUrl,b:o.t(i.liveName),c:o.o(v=>t.goLive(i),n),d:n})),b:o.sr("mescrollRef","7bd28468-0"),c:o.o(t.mescrollInit),d:o.o(t.downCallback),e:o.o(t.upCallback),f:o.p({bottom:"0",down:l.downOption,up:l.upOption})}}const p=o._export_sfc(u,[["render",g],["__scopeId","data-v-7bd28468"]]);wx.createPage(p);
|