"use strict";const t=require("../common/vendor.js"),m=require("../api/list.js"),d=require("../api/live.js");require("../api/order.js");const I=require("../api/home.js"),h=require("../common/assets.js");var _="wss://live.test.ylrztop.com/ws/live-api/app/webSocket",v=!1;const x={data(){return{connectingLiveId:null,swiperDuration:0,videoRetryCounts:{},socketInstances:{},currentSwiperIndex:0,list:[],preloading:!1,liveUserTotal:null,viewPageSize:10,viewPageNum:1,viewLoading:!1,viewNoMoreData:!1,scrollHeight:0,scrollTimer:null,socketInstance:null,reconnectCount:0,maxReconnectAttempts:3,isManualClose:!1,showRed:!0,searchTimer:null,reconnectTimer:null,isCollect:!1,showPurchasePrompt:!1,purchasePromptTimer:null,prevOrderCount:0,videoUrl:null,showType:1,boxHeight:300,liveViewers:[],likeName:0,hlsPlayer:null,livingUrl:"",products:{},store:{},orderUser:{},userType:0,timestamp:"",liveId:null,isZoom:!1,userinfo:"",talkdisabled:!1,autoplay:!1,showadd:!1,scrollIntoView:"",videoContext:"",thistime:t.index.$u.timeFormat(new Date,"yyyy-mm-dd hh:MM:ss"),isSubmit:!1,messageContent:"",showziliao:!1,isScreen:!0,scrollTop:0,old:{scrollTop:0},livedata:{}}},onLoad(e){this.initTime(),e.liveId&&(this.liveId=e.liveId),this.userinfo=JSON.parse(t.index.getStorageSync("userInfo")),this.initLiveList(e),this.getliveUser(!1);const s=t.index.getWindowInfo().platform;["mp-weixin","mp-alipay","mp-baidu","mp-toutiao"].includes(s)?t.index.showShareMenu?t.index.showShareMenu({withShareTicket:!0,success:()=>{console.log("分享菜单显示成功")},fail:i=>{console.error("分享菜单显示失败:",i)}}):console.warn("当前平台不支持 uni.showShareMenu"):console.log("当前平台无需显示分享菜单")},onReady(){},onShareAppMessage(){return{title:this.livedata.liveName,path:"/pages/home/living",imageUrl:this.products.image,success(e){console.log("分享成功",e)},fail(e){console.error("分享失败",e)}}},computed:{filteredViewers(){if(this.liveViewers)return this.liveViewers.slice(0,3)}},onHide(){const e=this.list[this.currentSwiperIndex];e&&this.pauseVideo(e)},onUnload(){this.closeAllWebSockets(),this.removeAllEventListeners(),this.clearAllTimers(),this.hlsPlayer&&(this.hlsPlayer.destroy(),this.hlsPlayer=null),this.list.forEach(e=>{const s=`myVideo_${e.liveId}`,i=t.index.createVideoContext(s,this);i&&i.pause()})},watch:{"orderUser.count":{handler(e,s){e!==this.prevOrderCount&&(this.prevOrderCount=e,this.showPurchaseMessage())},immediate:!0}},methods:{resetUserListParams(){this.viewPageNum=1,this.viewNoMoreData=!1,this.liveViewers=[]},closeAllWebSockets(){this.isManualClose=!0,Object.keys(this.socketInstances).forEach(e=>{try{this.socketInstances[e]&&this.socketInstances[e].instance&&(this.socketInstances[e].instance.close({code:1e3,reason:"页面关闭"}),console.log(`直播间 ${e} WebSocket 已关闭`))}catch(s){console.error(`关闭直播间 ${e} WebSocket 时出错:`,s)}}),this.socketInstances={},v=!1},removeAllEventListeners(){t.index.$off("initSocket"),t.index.$off("sendMsg"),t.index.$off("closeWebSocket"),t.index.$off("refreshOrder")},clearAllTimers(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null),this.pingpangTimes&&(clearInterval(this.pingpangTimes),this.pingpangTimes=null),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null),this.scrollTimer&&(clearTimeout(this.scrollTimer),this.scrollTimer=null),this.searchTimer&&(clearTimeout(this.searchTimer),this.searchTimer=null),this.purchasePromptTimer&&(clearTimeout(this.purchasePromptTimer),this.purchasePromptTimer=null)},async initCurrentLiveData(){const e=this.list[this.currentSwiperIndex];if(e){e.loading=!0;try{await this.initSocket(e),await Promise.allSettled([this.getLiveMsg(e),this.getliveViewData(e),this.getliving(e)]),e.loaded=!0}catch(s){console.error("初始化直播间数据失败:",s)}finally{e.loading=!1}}},async initLiveList(e){try{if(await this.getList(),this.list.length===0){console.error("直播间列表为空,无法初始化");return}if(e.liveId){const i=this.list.findIndex(l=>l.liveId==e.liveId);this.currentSwiperIndex=i!==-1?i:0}else this.currentSwiperIndex=0;setTimeout(()=>{this.swiperDuration=300},100);const s=this.list[this.currentSwiperIndex];s&&(this.liveId=s.liveId,this.resetUserListParams(),this.preloadNearbyLives(!1),await this.initCurrentLiveData(),this.getliveUser(!0),setTimeout(()=>{this.playVideo(s)},500))}catch(s){console.error("初始化失败:",s)}},async onSwiperChange(e){const s=e.detail.current,i=this.currentSwiperIndex;if(s===i)return;const l=this.list[i];l&&(this.pauseVideo(l),this.closeWebSocket(l.liveId)),this.currentSwiperIndex=s;const n=this.list[s];if(n){this.liveId=n.liveId;try{this.resetUserListParams(),await this.initCurrentLiveData(),this.getliveUser(!1),setTimeout(()=>{this.playVideo(n)},100)}catch(c){console.error("切换直播间失败:",c)}}},async getList(){const e={page:1,page_size:20};try{const s=await m.liveList(e);s.code===200?(this.list=s.rows.map(i=>({...i,talklist:[],loading:!1,loaded:!1,shopping:!1,inputInfo:"",showWelcomeMessage:!1,redInfo:{}})),console.log("直播间列表加载成功,数量:",this.list.length)):(t.index.showToast({title:s.msg,icon:"none"}),this.list=[])}catch(s){console.error("获取直播间列表失败:",s),this.list=[]}},playVideo(e){if(e)try{const s=`myVideo_${e.liveId}`,i=t.index.createVideoContext(s,this);i&&i.pause(()=>{i.play()})}catch(s){console.error("播放视频失败:",s)}},pauseVideo(e){if(e)try{const s=`myVideo_${e.liveId}`,i=t.index.createVideoContext(s,this);i&&i.pause()}catch(s){console.error("暂停视频失败:",s)}},async preloadNearbyLives(e=!1){this.preloading=!0;const s=this.currentSwiperIndex,i=[];s>0&&i.push(s-1),s>1&&i.push(s-2),s{t.index.createSelectorQuery().in(this).select(".view-box").boundingClientRect(s=>{s&&(this.scrollHeight=s.height-80-120)}).exec()})},resetLiveData(){const e={userinfo:this.userinfo,list:this.list,currentSwiperIndex:this.currentSwiperIndex};this.liveUserTotal=null,this.liveViewers=[],this.livingUrl="",this.videoUrl=null,this.products={},this.store={},this.orderUser={},this.talklist=[],this.livedata={},this.shopping=!1,this.inputInfo="",Object.assign(this,e)},async getliveUser(e=!1){const s=this.liveId;if(s){this.viewLoading=!0;try{const i=await d.watchUserList(s,this.viewPageSize,this.viewPageNum,!1);if(i.code===200){if(this.liveId!==s)return;if(this.liveUserTotal=i.total,i.rows.length===0){this.viewNoMoreData=!0;return}this.liveViewers=e?[...this.liveViewers,...i.rows]:i.rows,this.viewPageNum++}}catch(i){console.error("获取观众列表失败:",i)}finally{this.viewLoading=!1}}},handleScrollToLower(){this.scrollTimer&&clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(()=>{this.getliveUser(!0)},1e3)},async getLiveMsg(e){if(!e||!e.liveId){console.error("getLiveMsg 错误:无效的 liveItem",{liveItem:e,currentIndex:this.currentSwiperIndex,listLength:this.list.length});return}try{const s=await d.liveMsg(e.liveId,30,1);s.code==200&&(this.$set(e,"talklist",[...s.rows]),this.$nextTick(()=>{this.$set(e,"scrollIntoView",`list_${e.talklist.length-1}`)}))}catch(s){console.error("获取聊天记录失败:",s)}},onRed(e){var i;if(!e.liveId||!((i=e.redInfo)!=null&&i.redId))return;let s={liveId:e.liveId,userId:this.userinfo.userId,redId:e.redInfo.redId};console.log("点了this.liveId",s),d.liveRed(s).then(l=>{l.code==200?t.index.showToast({title:l.msg,icon:"none"}):t.index.showToast({title:l.msg,icon:"none"})},l=>{})},handleSearchInput(){clearTimeout(this.searchTimer),this.searchTimer=setTimeout(()=>{this.queryCollect()},500)},showPurchaseMessage(){this.purchasePromptTimer&&clearTimeout(this.purchasePromptTimer),this.showPurchasePrompt=!0,this.purchasePromptTimer=setTimeout(()=>{this.showPurchasePrompt=!1},2e3)},truncateString(e,s){return e.length>s?e.slice(0,s)+"...":e},goStore(e){if(console.log("带过去storeId",e),!e.storeId){t.index.showToast({title:"当前直播间暂未开通店铺",icon:"none"});return}t.index.navigateTo({url:"/pages_shop/store?liveId="+e.liveId+"&storeId="+e.storeId})},goOrderList(){t.index.navigateTo({url:"/pages_shop/order"})},initHlsPlayer(){if(t.Hls.isSupported()&&this.livingUrl){const e=document.getElementById("myVideo");e&&(this.hlsPlayer=new t.Hls,this.hlsPlayer.loadSource(this.livingUrl),this.hlsPlayer.attachMedia(e),this.hlsPlayer.on(t.Hls.Events.MANIFEST_PARSED,()=>{e.play()}))}},videoError(e,s){if(!(!s||s.liveId!==this.liveId)){if(this.videoRetryCounts[s.liveId]>=3){console.error(`直播间 ${s.liveId} 视频加载失败`);return}this.videoRetryCounts[s.liveId]++,setTimeout(()=>{s.liveId===this.liveId&&this.playVideo(s)},2e3)}},async getliving(e){if(!(!e||!e.liveId)){e.liveId;try{const s=await I.getlive({id:e.liveId});if(s.code!==200){t.index.showToast({title:s.msg,icon:"none"});return}s.data.liveType===2?(this.$set(e,"videoUrl",s.data.videoUrl),this.$set(e,"livingUrl",""),this.$set(e,"placeholderText","说点什么...")):s.data.liveType===1?(this.$set(e,"livingUrl",s.data.flvHlsUrl),console.log("排查中1》》",s.data.flvHlsUrl),console.log("排查中2》》",e.livingUrl),this.$set(e,"videoUrl",""),this.$set(e,"placeholderText","说点什么...")):(this.$set(e,"livingUrl",""),this.$set(e,"videoUrl",""));const i=this.currentSwiperIndex===this.list.findIndex(l=>l.liveId===e.liveId);this.$set(e,"autoplay",i&&s.data.liveType!==0),this.$set(e,"showType",s.data.showType),this.$set(e,"storeId",s.storeId),this.queryCollect()}catch(s){console.error("获取直播信息失败:",s),t.index.showToast({title:"获取直播信息失败",icon:"none"})}}},setupVideoPlayback(e,s){if(!e.livingUrl)return;const i=`myVideo_${e.liveId}`,l=t.index.createVideoContext(i,this);s.liveType===1?l.seek(s.nowDuration||0):l.play()},maskString(e,s="*"){return e?String(e).split("").map((l,n)=>n===0?l:s).join(""):""},getPureDecimal(e,s=6){const i=Math.abs(e).toFixed(s).split(".")[1];return(i==null?void 0:i.replace(/0+$/,""))||""},goBack(){const e=this.list[this.currentSwiperIndex];e&&this.pauseVideo(e),this.closeWebSocket(),getCurrentPages().length>1?t.index.navigateBack():t.index.reLaunch({url:"/pages/list/index"})},async getliveOrder(){const e=this.liveId;if(e)try{const s=await d.liveOrderUser(e);if(s.code===200){const i=this.list[this.currentSwiperIndex];i&&(this.$set(i,"orderUser",s),this.orderUser=s)}}catch(s){console.error("获取正在购买用户失败:",s)}},getLiveinformation(){this.liveId&&d.getLiveInfo(this.liveId).then(e=>{e.code==200?(console.log("获取直播间信息接口>>>>",e),this.livingUrl=e.livingUrl):t.index.showToast({title:e.msg,icon:"none"})},e=>{})},async onLike(e){if(!(!e||!e.liveId)){if(!e.liveViewData&&(await this.getliveViewData(e),!e.liveViewData)){t.index.showToast({title:"数据加载中,请稍后再试",icon:"none"});return}try{const s=await d.liveDataLike(e.liveId);s.code===200?s.like?e.liveViewData.like=s.like:t.index.showToast({title:s.msg,icon:"none"}):t.index.showToast({title:s.msg,icon:"none"})}catch(s){console.error("点赞失败:",s)}}},async getliveViewData(e){if(!(!e||!e.liveId))try{const s=await d.getLiveViewData(e.liveId);s.code==200&&(this.$set(e,"liveViewData",s),console.log(`直播间 ${e.liveId} 数据加载完成:`,s))}catch(s){console.error("获取直播间数据失败:",s),this.$set(e,"liveViewData",{like:0,watchCount:0})}},goShop(e,s){const i=this.list[this.currentSwiperIndex];!i||!i.liveId||t.index.navigateTo({url:"/pages_shop/goods?productId="+e+"&liveId="+i.liveId+"&goodsId="+s+"&storeId="+i.storeId})},async queryCollect(){const e=this.list[this.currentSwiperIndex];if(!e||!e.liveId)return;const{storeId:s}=e;if(s)try{const i=await d.store(e.storeId,e.inputInfo,e.liveId);i.code===200&&(this.$set(e,"products",i.data.goodsList),this.$set(e,"store",i.data),this.products=i.data.goodsList,this.store=i.data)}catch(i){console.error("获取小黄车商品失败:",i)}},onStoreCollect(e){console.log("店铺收藏",e),e.storeId&&d.collectStore(e.storeId).then(s=>{s.code==200?(t.index.showToast({title:s.msg,icon:"none"}),e.store.isFavorite=!e.store.isFavorite):t.index.showToast({title:s.msg,icon:"none"})},s=>{})},onGoodsCollect(e){console.log("商品收藏",e),!(!e||e.length===0||!e.goodsId)&&d.collectGoods(e.goodsId).then(s=>{s.code==200?(t.index.showToast({title:s.msg,icon:"none"}),e.isFavorite=!e.isFavorite):t.index.showToast({title:s.msg,icon:"none"})},s=>{})},initTime(){const e=new Date;this.timestamp=e.getTime()},lowerChat:function(e){console.log(e)},scroll:function(e){console.log(e),this.old.scrollTop=e.detail.scrollTop},loadmore(){},openShop(){},openViews(){this.$nextTick(()=>{t.index.createSelectorQuery().in(this).select(".view-box").boundingClientRect(s=>{s&&(this.scrollHeight=s.height-80-120)}).exec()})},openCart(e){if(!e.storeId){t.index.showToast({title:"当前直播间暂未开通店铺",icon:"none"});return}e.shopping=!e.shopping},close(){this.showadd=!this.showadd},closes(){this.showziliao=!this.showziliao},closest(){this.showAnswer=!this.showAnswer},closestred(){this.showAnswerred=!this.showAnswerred},closeanswer(){this.answerbtn=!this.answerbtn},closeShop(){const e=this.list[this.currentSwiperIndex];e&&this.$set(e,"shopping",!e.shopping)},closeRed(){this.showRed=!this.showRed},handleTouchEnd(){this.isZoom=!1},getEWechatSdk(){},closeWebSocket(e=null){if(this.isManualClose=!0,clearInterval(this.pingpangTimes),clearInterval(this.reconnectTimer),e){if(this.socketInstances[e]&&this.socketInstances[e].instance){try{this.socketInstances[e].instance.close(),console.log(`直播间 ${e} WebSocket 已安全关闭`)}catch(s){console.error("关闭失败",s)}delete this.socketInstances[e]}}else Object.keys(this.socketInstances).forEach(s=>{try{t.index.closeSocket({instance:this.socketInstances[s]}),console.log(`直播间 ${s} WebSocket 已安全关闭`)}catch(i){console.error("关闭 WebSocket 时出错:",i)}}),this.socketInstances={};v=!1},reConnect(){var e=this;try{t.index.closeSocket()}catch{}setTimeout(function(){e.initSocket()},1e4)},startHeartbeat(e){clearInterval(this.pingpangTimes),this.pingpangTimes=setInterval(()=>{const s=this.socketInstances[e];if(!s||!s.isOpen||!s.instance)return;const i={cmd:"ping",timestamp:Date.now()};try{s.instance.send({data:JSON.stringify(i)})}catch(l){console.error("心跳发送失败:",l),this.scheduleReconnect(e)}},3e4)},async initSocket(e){if(!e||!e.liveId)return;const s=e.liveId;if(this.connectingLiveId===s||this.socketInstances[s]&&this.socketInstances[s].isOpen){console.log(`直播间 ${s} 的WebSocket已经连接或正在连接,跳过初始化`);return}if(this.currentSwiperIndex!==this.list.findIndex(l=>l.liveId===s)){console.log(`不初始化非当前直播间 ${s} 的WebSocket`);return}if(this.socketInstances[s]&&this.closeWebSocket(s),this.connectingLiveId=s,this.reconnectCount>=this.maxReconnectAttempts){this.connectingLiveId=null;return}this.isManualClose=!1;const i=t.CryptoJS.HmacSHA256(`${s}${this.userinfo.userId}${this.userType}${this.timestamp}`,this.timestamp.toString()).toString(t.CryptoJS.enc.Hex);this.socketInstances[s]={instance:null,isOpen:!1};try{const l=t.index.connectSocket({url:`${_}?userId=${this.userinfo.userId}&liveId=${s}&userType=${this.userType}×tamp=${this.timestamp}&signature=${i}`,success:()=>{console.log("WebSocket API 调用成功,正在建立连接...")},fail:n=>{console.error("WebSocket 连接失败:",n),this.connectingLiveId=null,this.scheduleReconnect(s)}});l.onOpen(n=>{console.log("WebSocket 连接已成功建立",n),this.socketInstances[s].instance=l,this.socketInstances[s].isOpen=!0,v=!0,this.connectingLiveId=null,this.reconnectCount=0,this.startHeartbeat(s)}),l.onMessage(n=>{const c=this.list.find(g=>g.liveId===s);c&&this.handleSocketMessage(n,c)}),l.onError(n=>{console.error("WebSocket 连接错误:",n),this.connectingLiveId=null,this.scheduleReconnect(s)}),l.onClose(()=>{console.log(`WebSocket 连接已关闭: ${s}`),this.connectingLiveId=null})}catch(l){console.error("创建 WebSocket 异常:",l),this.connectingLiveId=null,this.scheduleReconnect(s)}},handleSocketMessage(e,s){let i=JSON.parse(e.data);const l=i.data;if(i.code==200){const n={...l,cmd:l.cmd||""};l.cmd=="sendMsg"?this.$nextTick(()=>{this.$set(s,"scrollIntoView",`list_${s.talklist.length-1}`)}):l.cmd=="red"?(this.$set(s,"redInfo",JSON.parse(l.data)),console.log("红包是liveItem.redInfo",s)):l.cmd=="sendRedPacketQuestion"?JSON.parse(e.data.data):l.cmd=="entry"?(console.log("在线人数进入:"),this.$set(s,"talklist",[...s.talklist,n]),this.$set(s,"showWelcomeMessage",!1),this.$set(s,"showWelcomeMessage",!0),this.getliveUser(!1),console.log("开启欢迎消息:",s.showWelcomeMessage),s.welcomeTimer&&clearTimeout(s.welcomeTimer),s.welcomeTimer=setTimeout(()=>{this.$set(s,"showWelcomeMessage",!1),console.log("关闭欢迎消息:",s.showWelcomeMessage)},1e3)):l.cmd=="live_start"||l.cmd=="live_end"||(l.data.cmd=="deleteId"?t.index.$emit("deleteId"):l.data.cmd=="sendRedPacketQuestion")}else t.index.showToast({title:i.msg,icon:"none"})},scheduleReconnect(){if(this.isManualClose||this.reconnectCount>=this.maxReconnectAttempts)return;this.reconnectCount++;const e=Math.min(3e3*this.reconnectCount,3e4);clearInterval(this.reconnectTimer),this.reconnectTimer=setTimeout(()=>{this.initSocket(this.list.find(s=>s.liveId===liveId)||{liveId})},e)},sendMsg(e){if(!e||!e.liveId||e.isSending)return;e.isSending=!0,setTimeout(()=>{e.isSending=!1},800);const s=(e.value||"").trim();if(!s){t.index.showToast({title:"不能发送空消息",icon:"none"});return}const i=e.liveId,l=this.socketInstances[i],n={cmd:"sendMsg",msg:s,nickName:this.userinfo.nickName,avatar:this.userinfo.avatar,userId:this.userinfo.userId,local:!0,ts:Date.now()};if(this.$set(e,"talklist",[...e.talklist||[],n]),this.$set(e,"value",""),!l||!l.instance||!l.isOpen){this.initSocket(e),t.index.showToast({title:"连接未建立,正在重连",icon:"none"});return}const c={liveId:i,userId:this.userinfo.userId,userType:0,cmd:"sendMsg",msg:s,nickName:this.userinfo.nickName,avatar:this.userinfo.avatar};try{l.instance.send({data:JSON.stringify(c),success:()=>{},fail:g=>{console.error("发送失败:",g),t.index.showToast({title:"发送失败,请重试",icon:"none"})}})}catch(g){console.error("socket send 异常",g)}}}};if(!Array){const e=t.resolveComponent("u-avatar"),s=t.resolveComponent("u-loading"),i=t.resolveComponent("u-input"),l=t.resolveComponent("u-popup");(e+s+i+l)()}const C=()=>"../uni_modules/uview-plus/components/u-avatar/u-avatar.js",L=()=>"../uni_modules/uview-plus/components/u-input/u-input.js",b=()=>"../uni_modules/uview-plus/components/u-popup/u-popup.js";Math||(C+L+b)();function U(e,s,i,l,n,c){var g;return{a:t.f(n.list,(o,f,u)=>{var S,y,T,k;return t.e({a:t.o((...r)=>c.goBack&&c.goBack(...r),o.liveId),b:"b1258878-0-"+u,c:t.p({src:o.liveImgUrl||e.$img.logo,size:"32"}),d:t.t(o.liveName?c.truncateString(o.liveName,5):"未命名"),e:t.f(c.filteredViewers,(r,a,p)=>({a,b:r.avatar||e.$img.logo})),f:t.o(r=>n.showadd=!n.showadd,o.liveId),g:((S=o.redInfo)==null?void 0:S.redStatus)==1},((y=o.redInfo)==null?void 0:y.redStatus)==1?{h:t.o(r=>c.onRed(o),o.liveId),i:h._imports_1$5}:{},{j:t.o(r=>c.onLike(o),o.liveId),k:t.t(((T=o.liveViewData)==null?void 0:T.like)||0),l:t.o(r=>c.goStore(o),o.liveId),m:t.n(o.showType==1?"siderow-group":"side-group")},n.showPurchasePrompt&&((k=n.orderUser)!=null&&k.count)?{n:h._imports_5,o:t.t(n.orderUser.userName?c.maskString(n.orderUser.userName):""),p:t.t(n.orderUser.count||0)}:{},{q:o.livingUrl},o.livingUrl?{r:"myVideo_"+o.liveId,s:t.n(o.showType==1?"video_row":"videotop"),t:o.livingUrl,v:n.currentSwiperIndex===f,w:t.o((...r)=>c.videoError&&c.videoError(...r),o.liveId)}:{},{x:o.videoUrl},o.videoUrl?{y:t.n(o.showType==1?"video_row":"videotop"),z:o.videoUrl,A:n.currentSwiperIndex===f,B:t.o((...r)=>c.videoError&&c.videoError(...r),o.liveId)}:{},{C:o.loading},o.loading?{D:"b1258878-1-"+u,E:t.p({mode:"circle",color:"#ffffff",size:"36"})}:{},{F:t.f(o.talklist,(r,a,p)=>({a:t.t(r.msg),b:a,c:r.cmd=="announcement"})),G:t.t(o.messageContent),H:t.f(o.talklist,(r,a,p)=>({a:t.t(r.nickName),b:t.t(r.msg),c:a,d:`list_${a}`,e:r.cmd!="red"&&r.cmd!="out"&&r.cmd!="entry"})),I:o.showWelcomeMessage},o.showWelcomeMessage?{J:t.f(o.talklist,(r,a,p)=>({a:t.t(r.nickName),b:t.t(r.msg),c:a,d:r.cmd=="entry"||r.cmd=="out"})),K:t.t(o.messageContent)}:{},{L:o.scrollIntoView,M:"b1258878-2-"+u,N:t.o(r=>o.value=r,o.liveId),O:t.p({placeholder:o.placeholderText,border:"none",customStyle:"font-size:24rpx;",shape:"circle",color:"#fff",placeholderStyle:"color:#e7e7e7",modelValue:o.value}),P:t.o(r=>c.sendMsg(o),o.liveId),Q:t.o(r=>c.openCart(o),o.liveId),R:t.f(n.liveViewers,(r,a,p)=>({a:t.t(a+1),b:a===0?"#FF3B30":a===1?"#FF9500":a===2?"#FFCC00":"#8E8E93",c:a<3?"bold":"normal",d:"b1258878-4-"+u+"-"+p+","+("b1258878-3-"+u),e:t.p({src:r.avatar||e.$img.logo,size:"32"}),f:t.t(r.nickName||"未命名"),g:a}))},n.viewNoMoreData&&n.liveViewers.length>0?{}:{},{S:t.o((...r)=>c.handleScrollToLower&&c.handleScrollToLower(...r),o.liveId),T:t.o(c.close,o.liveId),U:t.o(c.openViews,o.liveId),V:"b1258878-3-"+u,W:"b1258878-6-"+u+","+("b1258878-5-"+u),X:t.o([r=>o.inputInfo=r.detail.value,(...r)=>c.handleSearchInput&&c.handleSearchInput(...r)],o.liveId),Y:o.inputInfo},n.store.isFavorite?{Z:t.o(r=>c.onStoreCollect(o),o.liveId),aa:h._imports_11}:{ab:t.o(r=>c.onStoreCollect(o),o.liveId),ac:h._imports_12},{ad:t.o(r=>c.goOrderList(o),o.liveId),ae:t.f(n.products,(r,a,p)=>t.e({a:r.imgUrl,b:t.t(a+1),c:t.t(r.productName),d:t.t(r.sales),e:t.t(Math.trunc(r.price)),f:t.t(c.getPureDecimal(r.price)?c.getPureDecimal(r.price):"00"),g:r.isFavorite},r.isFavorite?{h:t.o(w=>c.onGoodsCollect(r),a),i:h._imports_11}:{j:t.o(w=>c.onGoodsCollect(r),a),k:h._imports_12},{l:r.status==1},r.status==1?{m:t.o(w=>c.goShop(r.productId,r.goodsId),a)}:r.status==0?{o:t.o(w=>c.goShop(r.productId),a)}:{},{n:r.status==0,p:a})),af:t.o(c.closeShop,o.liveId),ag:t.o(c.openShop,o.liveId),ah:"b1258878-5-"+u,ai:t.p({show:o.shopping,round:"20rpx",bgColor:"f3f5f9"}),aj:n.currentSwiperIndex===f?1:"",ak:o.liveId})}),b:h._imports_0$2,c:t.t(n.liveUserTotal||0),d:h._imports_2,e:h._imports_3$1,f:h._imports_4,g:n.showPurchasePrompt&&((g=n.orderUser)==null?void 0:g.count),h:h._imports_6,i:n.viewNoMoreData&&n.liveViewers.length>0,j:n.scrollHeight+"px",k:t.p({show:n.showadd,round:"20rpx",bgColor:"#ffffff"}),l:t.p({src:n.store.logoUrl,size:"36"}),m:h._imports_1$2,n:n.store.isFavorite,o:h._imports_10,p:n.boxHeight+"px",q:n.currentSwiperIndex,r:t.o((...o)=>c.onSwiperChange&&c.onSwiperChange(...o)),s:n.swiperDuration}}const V=t._export_sfc(x,[["render",U],["__scopeId","data-v-b1258878"]]);x.__runtimeHooks=2;wx.createPage(V);