12 |
- "use strict";const e=require("../../common/vendor.js"),c=require("../../api/live.js");require("../../api/order.js");const x=require("../../api/home.js"),h=require("../../common/assets.js"),C=()=>"../../components/ThreeItemSwiper.js";var P="ws://192.168.10.166:7114/app/webSocket";const S={components:{ThreeItemSwiper:C},data(){return{videoCurrentTime:0,isVideoPlaying:!1,videoProgressKey:"",isShowPrize:!1,prizeInfo:[],timeData:{},lotteryTime:0,lotteryProducts:[],lotteryList:[],talklist:{},isShowLotteryPop:!1,liveItem:{},isSending:!1,welcomeTimer:null,redTimer:null,lotteryTimer:null,isShowLottery:!1,isShowRedCard:!1,redCard:null,integral:{},lotteryInfo:{},goodsCard:{},redInfo:{},storeId:null,isFocus:!1,shopping:!1,inputInfo:"",showWelcomeMessage:!1,scrollIntoView:"",isShowGoods:!1,isShowRed:!1,lastClickTime:0,clickDelay:300,videoRetryCounts:{},placeholderText:"说点什么...",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,userinfo:"",value:"",talkdisabled:!1,autoplay:!1,showadd:!1,videoContext:"",livedata:{}}},onLoad(i){if(this.initTime(),e.index.__f__("log","at pages/home/living.vue:525",i),i.liveId&&(this.liveId=i.liveId),this.userinfo=JSON.parse(e.index.getStorageSync("userInfo")),this.liveId==null){e.index.showToast({title:"未知错误,请联系管理员!",icon:"none"});return}e.index.__f__("log","at pages/home/living.vue:537",this.liveId),this.getliving(this.liveId),this.initSocket();const t=e.index.getWindowInfo().platform;["mp-weixin","mp-alipay","mp-baidu","mp-toutiao"].includes(t)&&(e.index.showShareMenu?e.index.showShareMenu({withShareTicket:!0,success:()=>{e.index.__f__("log","at pages/home/living.vue:551","分享菜单显示成功")},fail:l=>{e.index.__f__("error","at pages/home/living.vue:554","分享菜单显示失败:",l)}}):e.index.__f__("warn","at pages/home/living.vue:558","当前平台不支持 uni.showShareMenu"))},onReady(){},onShareAppMessage(){return{title:this.livedata.liveName,path:"/pages/home/living",imageUrl:this.products.image,success(i){e.index.__f__("log","at pages/home/living.vue:569","分享成功",i)},fail(i){e.index.__f__("error","at pages/home/living.vue:572","分享失败",i)}}},computed:{filteredViewers(){return Array.isArray(this.liveViewers)?this.liveViewers.slice(0,3):[]}},onHide(){this.saveVideoProgress();const i=this.liveItem;i&&(this.pauseVideo(i),this.clearTimeTimer(i)),this.closeAllWebSockets(),this.lotteryList&&this.clearTimeTimer(this.lotteryList)},mounted(){this.getCurrentActivities()},onUnload(){this.saveVideoProgress(),this.redTimer&&(clearInterval(this.redTimer),this.redTimer=null),this.lotteryTimer&&(clearInterval(this.lotteryTimer),this.lotteryTimer=null),this.welcomeTimer&&(clearInterval(this.welcomeTimer),this.welcomeTimer=null),this.closeWebSocket(),this.removeAllEventListeners(),this.clearAllTimers(),this.hlsPlayer&&(this.hlsPlayer.destroy(),this.hlsPlayer=null),this.removeAllEventListeners(),this.clearAllTimers(),this.hlsPlayer&&(this.hlsPlayer.destroy(),this.hlsPlayer=null);const i=`myVideo_${this.liveId}`,t=e.index.createVideoContext(i,this);t&&t.pause()},watch:{"orderUser.count":{handler(i,t){i!==this.prevOrderCount&&(this.prevOrderCount=i,this.showPurchaseMessage())},immediate:!0}},methods:{onVideoMetaLoaded(i){e.index.__f__("log","at pages/home/living.vue:675","视频元数据加载完成"),this.videoProgressKey=`videoProgress_${this.liveId}`,e.index.getStorage({key:this.videoProgressKey,success:t=>{e.index.__f__("log","at pages/home/living.vue:683","获取到保存的播放进度:",t.data),this.videoCurrentTime=t.data,this.setVideoCurrentTime(this.videoCurrentTime)},fail:t=>{e.index.__f__("log","at pages/home/living.vue:690","没有找到保存的播放进度或获取失败",t),this.videoCurrentTime=0}})},onVideoLoaded(i){e.index.__f__("log","at pages/home/living.vue:698","视频数据加载完成")},onVideoTimeUpdate(i){this.videoCurrentTime=i.detail.currentTime,Math.floor(this.videoCurrentTime)%5===0&&this.saveVideoProgress()},onVideoPause(i){this.isVideoPlaying=!1,this.saveVideoProgress()},onVideoPlay(i){this.isVideoPlaying=!0},setVideoCurrentTime(i){const t=`myVideo_${this.liveId}`,l=e.index.createVideoContext(t,this);l&&(l.seek(i),e.index.__f__("log","at pages/home/living.vue:731",`设置视频播放位置: ${i}秒`))},saveVideoProgress(){this.videoProgressKey&&e.index.setStorage({key:this.videoProgressKey,data:this.videoCurrentTime,success:()=>{},fail:i=>{e.index.__f__("error","at pages/home/living.vue:743","保存视频进度失败:",i)}})},onChange(i){this.timeData=i},onClaim(){let i={liveId:this.liveId,lotteryId:this.lotteryInfo.lotteryId};c.claim(i).then(t=>{t.code==200?(e.index.showToast({title:t.msg,icon:"none"}),this.isShowLotteryPop=!1):e.index.showToast({title:t.msg,icon:"none"})},t=>{})},onLottery(){if(this.lotteryTimer&&(clearInterval(this.lotteryTimer),this.lotteryTimer=null),!this.lotteryInfo)return;let i={lotteryId:this.lotteryInfo.lotteryId};c.liveLottery(i).then(t=>{this.isShowLottery=!1,this.isShowLotteryPop=!0,t.code==200?(this.lotteryList=t.data,this.lotteryProducts=t.data.products):e.index.showToast({title:t.msg,icon:"none"})},t=>{})},onGoodsCollect(i){e.index.__f__("log","at pages/home/living.vue:827","商品收藏",i),!(!i||i.length===0||!i.goodsId)&&c.collectGoods(i.goodsId).then(t=>{t.code==200?(e.index.showToast({title:t.msg,icon:"none"}),i.isFavorite=!i.isFavorite):e.index.showToast({title:t.msg,icon:"none"})},t=>{})},inputFocus(){this.isFocus=!0},inputBlur(){this.isFocus=!1},async getliveOrder(){try{const i=await c.liveOrderUser(this.liveId);i.code===200&&(this.orderUser=i)}catch(i){e.index.__f__("error","at pages/home/living.vue:863","获取正在购买用户失败:",i)}},openShop(){this.shopping=!0},onLiveStateChange(i,t){i.detail.code},onLiveError(i,t){this.videoError(i,t)},getCurrentActivities(){this.liveId&&c.currentActivities(this.liveId).then(i=>{var t;i.code==200?(i.red&&(this.redInfo=i.red[0]),i.lottery&&(this.lotteryInfo=i.lottery[0]),this.goodsCard=i.goods,this.lotteryTime=((t=this.lotteryInfo)==null?void 0:t.duration)*60*1e3,e.index.__f__("log","at pages/home/living.vue:907","毫秒",this.lotteryTime),this.goodsCard&&this.goodsCard.status==1?this.isShowGoods=!0:this.isShowGoods=!1,this.redInfo&&this.redInfo.redStatus==1?this.isShowRed=!0:this.isShowRed=!1,this.lotteryInfo&&this.lotteryInfo.lotteryStatus==1?this.isShowLottery=!0:this.isShowLottery=!1):e.index.showToast({title:i.msg,icon:"none"})},i=>{})},calculateTimeDiff(i,t=""){if(!i)return;let l="";if(l=i||"",!l){t==="lottery"||this.$set(this.liveItem,"totalTime","00:00:00");return}const n=l.replace(/-/g,"/"),s=new Date(n);if(isNaN(s.getTime())){t==="lottery"?this.lotteryTime={hours:"00",minutes:"00",seconds:"00"}:this.$set(this.liveItem,"totalTime","00:00:00"),e.index.__f__("warn","at pages/home/living.vue:981","时间解析失败,原始格式:",l);return}const r=new Date;let u=0;t==="lottery"?u=Math.max(0,s-r):u=Math.max(0,r-s);const m=Math.floor(u/1e3),v=this.padZero(Math.floor(m/3600)),f=this.padZero(Math.floor(m%3600/60)),g=this.padZero(m%60);t==="lottery"||this.$set(this.liveItem,"totalTime",`${v}:${f}:${g}`)},padZero(i){return i<10?`0${i}`:i},startTimeTimer(i,t=""){i&&(t==="lottery"?(this.calculateTimeDiff(i.updateTime,"lottery"),i.timeTimer=setInterval(()=>{this.calculateTimeDiff(i.updateTime,"lottery")},1e3)):(this.calculateTimeDiff(i.startTime),i.timeTimer=setInterval(()=>{this.calculateTimeDiff(i.startTime)},1e3)))},clearTimeTimer(i){i.timeTimer&&(clearInterval(i.timeTimer),i.timeTimer=null)},toggleViewerList(){const i=Date.now();i-this.lastClickTime>this.clickDelay&&(this.showadd=!this.showadd,this.lastClickTime=i)},closeAllWebSockets(){this.isManualClose=!0},removeAllEventListeners(){e.index.$off("initSocket"),e.index.$off("sendMsg"),e.index.$off("closeWebSocket"),e.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)},playVideo(i){if(i)try{if(i.liveType===1&&i.livingUrl){const t=`myLivePlayer_${this.liveId}`,l=e.index.createLivePlayerContext(t,this);l&&l.play()}else if(i.liveType===2&&i.videoUrl){const t=`myVideo_${this.liveId}`,l=e.index.createVideoContext(t,this);l&&l.pause(()=>{l.play()})}}catch(t){e.index.__f__("error","at pages/home/living.vue:1128","播放视频失败:",t)}},pauseVideo(i){if(i)try{if(i.liveType===1){const t=`myLivePlayer_${this.liveId}`,l=e.index.createLivePlayerContext(t,this);l&&l.pause()}else if(i.liveType===2){const t=`myVideo_${this.liveId}`,l=e.index.createVideoContext(t,this);l&&l.pause()}}catch(t){e.index.__f__("error","at pages/home/living.vue:1153","暂停视频失败:",t)}},openViews(){this.$nextTick(()=>{e.index.createSelectorQuery().in(this).select(".view-box").boundingClientRect(t=>{t&&(this.scrollHeight=t.height-80-120)}).exec()})},async getliveUser(i=!1){this.viewLoading=!0;try{const t=await c.watchUserList(this.liveId,this.viewPageSize,this.viewPageNum,!1);if(t.code===200){if(this.liveUserTotal=t.total,t.rows.length===0){this.viewNoMoreData=!0;return}this.liveViewers=i?[...this.liveViewers,...t.rows]:t.rows,this.viewPageNum++}}catch(t){e.index.__f__("error","at pages/home/living.vue:1195","获取观众列表失败:",t)}finally{this.viewLoading=!1}},handleScrollToLower(){this.scrollTimer&&clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(()=>{},1e3)},async getLiveMsg(i){if(!i||!this.liveId){e.index.__f__("error","at pages/home/living.vue:1215","getLiveMsg 错误:无效的 liveItem",{liveItem:i,currentIndex:this.currentSwiperIndex});return}try{const t=await c.liveMsg(this.liveId,30,1);if(t.code==200){const n=[...Array.isArray(t.rows)?t.rows:[]].reverse();this.talklist=n,this.$nextTick(()=>{this.scrollIntoView=`list_${n.length-1}`})}}catch(t){e.index.__f__("error","at pages/home/living.vue:1235","获取聊天记录失败:",t)}},onRed(){var t;if(!this.liveId||!((t=this.redInfo)!=null&&t.redId))return;this.redTimer&&(clearInterval(this.redTimer),this.redTimer=null);let i={liveId:this.liveId,userId:this.userinfo.userId,redId:this.redInfo.redId};c.liveRed(i).then(l=>{this.isShowRed=!1,this.redCard=l,this.isShowRedCard=!0},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(i,t){return i.length>t?i.slice(0,t)+"...":i},goOrderList(){e.index.navigateTo({url:"/pages_shop/order"})},initHlsPlayer(){if(e.Hls.isSupported()&&this.livingUrl){const i=document.getElementById("myVideo");i&&(this.hlsPlayer=new e.Hls,this.hlsPlayer.loadSource(this.livingUrl),this.hlsPlayer.attachMedia(i),this.hlsPlayer.on(e.Hls.Events.MANIFEST_PARSED,()=>{i.play()}))}},videoError(i,t){if(!(!t||!this.liveId)){if(this.videoRetryCounts[t.liveId]===void 0&&(this.videoRetryCounts[t.liveId]=0),this.videoRetryCounts[t.liveId]>=3){e.index.__f__("error","at pages/home/living.vue:1320",`直播间 ${this.liveId} 视频加载失败,停止重试`),e.index.showToast({title:"视频加载失败,请检查网络",icon:"none",duration:2e3});return}this.videoRetryCounts[this.liveId]++,setTimeout(()=>{this.liveId===this.liveId&&(e.index.__f__("log","at pages/home/living.vue:1335",`第${this.videoRetryCounts[this.liveId]}次重试播放视频`),this.playVideo(t))},2e3)}},async getliving(i){const t={id:i};try{const l=await x.getlive(t);if(l.code!==200){e.index.showToast({title:l.msg,icon:"none"});return}this.liveItem=l.data,this.talklist=l.data.talklist,l.data.liveType===2?(this.$set(this.liveItem,"videoUrl",l.data.videoUrl),this.$set(this.liveItem,"livingUrl","")):l.data.liveType===1?(this.$set(this.liveItem,"livingUrl",l.data.flvHlsUrl),this.$set(this.liveItem,"videoUrl","")):(this.$set(this.liveItem,"livingUrl",""),this.$set(this.liveItem,"videoUrl","")),this.startTimeTimer(this.liveItem),await this.getLiveMsg(this.liveItem),await this.getliveViewData(this.liveItem),this.$set(this.liveItem,"autoplay",l.data.liveType!==0),this.$set(this.liveItem,"showType",l.data.showType),this.storeId=l.storeId}catch(l){e.index.__f__("error","at pages/home/living.vue:1384","获取直播信息失败:",l),e.index.showToast({title:"获取直播信息失败",icon:"none"})}},maskString(i,t="*"){return i?String(i).split("").map((n,s)=>s===0?n:t).join(""):""},getPureDecimal(i,t=6){const l=Math.abs(i).toFixed(t).split(".")[1];return(l==null?void 0:l.replace(/0+$/,""))||""},goBack(){const i=this.liveItem;i&&this.pauseVideo(i),this.closeWebSocket(),getCurrentPages().length>1?e.index.navigateBack():e.index.reLaunch({url:"/pages/list/index"})},async onLike(i){if(!(!i||!this.liveId))try{const t=await c.liveDataLike(this.liveId);t!=null&&t.like?i.liveViewData.like++:e.index.showToast({title:t.msg,icon:"none"})}catch(t){e.index.__f__("error","at pages/home/living.vue:1440","点赞失败:",t)}},async getliveViewData(i){if(!(!i||!this.liveId))try{const t=await c.getLiveViewData(this.liveId);t.code==200&&this.$set(i,"liveViewData",t)}catch(t){e.index.__f__("error","at pages/home/living.vue:1453","获取直播间数据失败:",t),this.$set(i,"liveViewData",{like:0,watchCount:0})}},goShop(i,t){this.liveId&&e.index.navigateTo({url:"/pages_shop/goods?productId="+i+"&liveId="+this.liveId+"&goodsId="+t+"&storeId="+this.storeId})},async queryCollect(){if(this.liveId){this.inputInfo==null&&(this.inputInfo="");try{const i=await c.liveStore(this.liveId,this.inputInfo);i.code===200&&(this.products=i.data)}catch(i){e.index.__f__("error","at pages/home/living.vue:1484","获取小黄车商品失败:",i)}}},initTime(){const i=new Date;this.timestamp=i.getTime()},openCart(){this.queryCollect(),this.shopping=!0},close(){this.showadd=!1},closeShop(){this.shopping=!1},getEWechatSdk(){},closeWebSocket(){var i;(i=this.socket)==null||i.close()},initSocket(){if(this.liveId==null)return;const i=e.CryptoJS.HmacSHA256(`${this.liveId}${this.userinfo.userId}${this.userType}${this.timestamp}`,this.timestamp.toString()).toString(e.CryptoJS.enc.Hex);try{const t=e.index.connectSocket({url:`${P}?userId=${this.userinfo.userId}&liveId=${this.liveId}&userType=${this.userType}×tamp=${this.timestamp}&signature=${i}`,success:()=>{},fail:l=>{}});t.onOpen(l=>{this.socket=t}),t.onMessage(l=>{const n=this.liveItem;n&&this.handleSocketMessage(l,n)})}catch(t){e.index.__f__("error","at pages/home/living.vue:1557","创建 WebSocket 异常:",t)}},handleSocketMessage(i,t){let l=JSON.parse(i.data);const n=l.data;if(l.code==200){const s={...n,cmd:n.cmd||"",ts:Date.now()};if(n.cmd=="sendMsg"){const u=[...this.talklist||[],s];this.talklist=u,this.$nextTick(()=>{const m=this.talklist.length-1;this.scrollIntoView=`list_${m}`})}else if(n.cmd=="red")if(this.redInfo=JSON.parse(n.data),n.status==1){this.isShowRed=!0;let r=this.redInfo.duration;this.redTimer=setInterval(()=>{this.isShowRed=!1},r*6e4)}else this.isShowRed=!1;else if(n.cmd=="goods")this.goodsCard=JSON.parse(n.data),n.status==1?this.isShowGoods=!0:this.isShowGoods=!1;else if(n.cmd=="lottery")if(this.lotteryInfo=JSON.parse(n.data),n.status==1){this.isShowLottery=!0;let r=this.lotteryInfo.duration;this.lotteryTimer=setInterval(()=>{this.isShowLottery=!1},r*6e4),this.lotteryTime=r*60*1e3}else this.isShowLottery=!1;else if(n.cmd=="entry"||n.cmd=="out"){const u=[...this.talklist||[],s];this.talklist=u,this.showWelcomeMessage=!1,this.showWelcomeMessage=!0,this.getliveUser(!1),this.welcomeTimer&&clearTimeout(this.welcomeTimer),this.welcomeTimer=setTimeout(()=>{this.showWelcomeMessage=!1},1e3)}else n.cmd=="Integral"?this.integral={msg:n.msg,status:!0}:n.cmd=="LotteryDetail"?(this.prizeInfo=JSON.parse(n.data),this.isShowPrize=n.status===1):n.cmd=="blockUser"&&e.index.removeStorage({key:"AppToken",success:()=>{e.index.reLaunch({url:"/pages/auth/login"})}})}else e.index.showToast({title:l.msg,icon:"none"})},sendMsg(){if(!this.liveId||this.isSending)return;this.isSending=!0,setTimeout(()=>{this.isSending=!1},800);const i=(this.value||"").trim();if(!i){e.index.showToast({title:"不能发送空消息",icon:"none"});return}const t=this.liveId;this.socket,this.value="";const l={liveId:t,userId:this.userinfo.userId,userType:0,cmd:"sendMsg",msg:i,nickName:this.userinfo.nickName,avatar:this.userinfo.avatar};try{this.socket.send({data:JSON.stringify(l),success:()=>{},fail:n=>{e.index.showToast({title:n,icon:"none"}),this.value=i}})}catch{}}}};if(!Array){const i=e.resolveComponent("u-avatar"),t=e.resolveComponent("u-input"),l=e.resolveComponent("u-popup"),n=e.resolveComponent("u-icon"),s=e.resolveComponent("u-count-down"),r=e.resolveComponent("ThreeItemSwiper");(i+t+l+n+s+r)()}const L=()=>"../../uni_modules/uview-plus/components/u-avatar/u-avatar.js",k=()=>"../../uni_modules/uview-plus/components/u-input/u-input.js",V=()=>"../../uni_modules/uview-plus/components/u-popup/u-popup.js",U=()=>"../../uni_modules/uview-plus/components/u-icon/u-icon.js",M=()=>"../../uni_modules/uview-plus/components/u-count-down/u-count-down.js";Math||(L+k+V+U+M)();function b(i,t,l,n,s,r){var u,m,v,f,g,p,_,y,w,I;return e.e({a:e.o((...o)=>r.goBack&&r.goBack(...o)),b:h._imports_0$2,c:e.p({src:s.liveItem.liveImgUrl||i.$img.logo,size:"32"}),d:e.t(s.liveItem.liveName?r.truncateString(s.liveItem.liveName,8):"未命名"),e:Array.isArray(r.filteredViewers)},Array.isArray(r.filteredViewers)?{f:e.f(r.filteredViewers,(o,a,d)=>({a,b:o.avatar||i.$img.logo}))}:{},{g:e.t(s.liveUserTotal||0),h:e.o((...o)=>r.toggleViewerList&&r.toggleViewerList(...o)),i:e.o(o=>r.onLike(s.liveItem)),j:h._imports_1$3,k:e.t(((u=s.liveItem.liveViewData)==null?void 0:u.like)||0),l:h._imports_2,m:e.n(s.liveItem.showType==1?"siderow-group":"side-group"),n:s.isShowRed},s.isShowRed?{o:h._imports_3,p:e.o(o=>r.onRed())}:{},{q:s.isShowLottery},s.isShowLottery?{r:h._imports_4,s:e.o(o=>r.onLottery())}:{},{t:s.showPurchasePrompt&&((m=s.orderUser)==null?void 0:m.count)},s.showPurchasePrompt&&((v=s.orderUser)!=null&&v.count)?{v:h._imports_5,w:e.t(s.orderUser.userName?r.maskString(s.orderUser.userName):""),x:e.t(s.orderUser.count||0)}:{},{y:s.liveItem.livingUrl&&s.liveItem.liveType===1},s.liveItem.livingUrl&&s.liveItem.liveType===1?{z:"myLivePlayer_"+s.liveId,A:e.n(s.liveItem.showType==1?"video_row":"videotop"),B:s.liveItem.livingUrl,C:s.liveItem.showType==1?"horizontal":"vertical",D:e.o(o=>r.onLiveStateChange(o,s.liveItem)),E:e.o(o=>r.onLiveError(o,s.liveItem))}:{},{F:s.liveItem.videoUrl},s.liveItem.videoUrl?{G:`myVideo_${s.liveId}`,H:e.n(s.liveItem.showType==1?"video_row":"videotop"),I:s.liveItem.videoUrl,J:e.o((...o)=>r.videoError&&r.videoError(...o)),K:e.o((...o)=>r.onVideoTimeUpdate&&r.onVideoTimeUpdate(...o)),L:e.o((...o)=>r.onVideoLoaded&&r.onVideoLoaded(...o)),M:e.o((...o)=>r.onVideoMetaLoaded&&r.onVideoMetaLoaded(...o)),N:e.o((...o)=>r.onVideoPause&&r.onVideoPause(...o)),O:e.o((...o)=>r.onVideoPlay&&r.onVideoPlay(...o))}:{},{P:s.liveItem.videoUrl},s.liveItem.videoUrl?{Q:e.t(s.liveItem.totalTime)}:{},{R:e.f(s.talklist,(o,a,d)=>({a:e.t(o.msg),b:a,c:o.cmd=="announcement"})),S:e.t(s.liveItem.messageContent),T:e.f(s.talklist,(o,a,d)=>({a:e.t(o.nickName),b:e.t(o.msg),c:a,d:`list_${a}`,e:o.cmd!="red"&&o.cmd!="out"&&o.cmd!="entry"})),U:s.showWelcomeMessage},s.showWelcomeMessage?{V:e.f(s.talklist,(o,a,d)=>({a:e.t(o.nickName),b:e.t(o.msg),c:a,d:o.cmd=="entry"||o.cmd=="out"})),W:e.t(s.liveItem.messageContent)}:{},{X:s.scrollIntoView,Y:e.o(r.inputFocus),Z:e.o(r.inputBlur),aa:e.o(o=>s.value=o),ab:e.p({placeholder:s.placeholderText,border:"none",customStyle:"font-size:24rpx;",shape:"circle",color:"#fff",placeholderStyle:"color:#e7e7e7",modelValue:s.value}),ac:e.o(o=>r.sendMsg()),ad:h._imports_6,ae:e.o(o=>r.openCart()),af:h._imports_7,ag:h._imports_8,ah:e.o(o=>s.isShowGoods=!1),ai:(f=s.goodsCard)==null?void 0:f.imgUrl,aj:e.t((g=s.goodsCard)==null?void 0:g.price),ak:e.t((p=s.goodsCard)==null?void 0:p.otPrice),al:e.t((_=s.goodsCard)==null?void 0:_.productName),am:e.o(o=>{var a,d;return r.goShop((a=s.goodsCard)==null?void 0:a.productId,(d=s.goodsCard)==null?void 0:d.goodsId)}),an:e.o(o=>!s.isShowGoods),ao:e.p({show:s.isShowGoods,round:"20rpx",mode:"center",zIndex:"10099",bgColor:"#ffffff"}),ap:h._imports_9,aq:h._imports_10,ar:e.o(o=>s.isShowLotteryPop=!1),as:e.p({name:"close",color:"#fff",size:"20"}),at:h._imports_11,av:e.t(s.timeData.hours>10?s.timeData.hours:"0"+s.timeData.hours),aw:e.t(s.timeData.minutes),ax:e.t(s.timeData.seconds),ay:e.o(r.onChange),az:e.p({time:s.lotteryTime||0,format:"DD:HH:mm:ss",autoStart:!0,millisecond:!0}),aA:e.p({products:s.lotteryProducts}),aB:e.f(s.lotteryProducts,(o,a,d)=>({a})),aC:e.o((...o)=>r.onClaim&&r.onClaim(...o)),aD:e.o(o=>!s.isShowLotteryPop),aE:e.p({show:s.isShowLotteryPop,round:"40rpx"}),aF:h._imports_12,aG:e.t((y=s.integral)==null?void 0:y.msg),aH:e.o(o=>s.integral.status=i.flase),aI:e.o(o=>{var a;return!((a=s.integral)!=null&&a.status)}),aJ:e.p({show:(w=s.integral)==null?void 0:w.status,round:"20rpx",mode:"center",bgColor:"#ffffff",zIndex:"10076"}),aK:h._imports_13,aL:e.t((I=s.redCard)==null?void 0:I.msg),aM:e.o(o=>s.isShowRedCard=i.flase),aN:e.o(o=>!s.isShowRedCard),aO:e.p({show:s.isShowRedCard,round:"20rpx",mode:"center",bgColor:"transparent",zIndex:"10076"}),aP:e.f(s.prizeInfo,(o,a,d)=>({a:e.t(o.userName),b:e.t(o.prizeLevel),c:a})),aQ:e.o(o=>s.isShowPrize=i.flase),aR:e.o(o=>!s.isShowPrize),aS:e.p({show:s.isShowPrize,round:"20rpx",mode:"center",bgColor:"#fff",zIndex:"10076"}),aT:e.f(s.liveViewers,(o,a,d)=>({a:e.t(a+1),b:a===0?"#FF3B30":a===1?"#FF9500":a===2?"#FFCC00":"#8E8E93",c:a<3?"bold":"normal",d:"471975a0-11-"+d+",471975a0-10",e:e.p({src:o.avatar||i.$img.logo,size:"36"}),f:e.t(o.nickName||"未命名"),g:a})),aU:s.scrollHeight+"px",aV:e.o((...o)=>r.handleScrollToLower&&r.handleScrollToLower(...o)),aW:e.o(r.close),aX:e.o(r.openViews),aY:e.p({show:s.showadd,round:"20rpx",bgColor:"#ffffff",zIndex:"10077"}),aZ:h._imports_1$2,ba:e.o([o=>s.inputInfo=o.detail.value,(...o)=>r.handleSearchInput&&r.handleSearchInput(...o)]),bb:s.inputInfo,bc:h._imports_15,bd:e.o(o=>r.goOrderList(s.liveItem)),be:e.f(s.products,(o,a,d)=>e.e({a:o.imgUrl,b:e.t(a+1),c:e.t(o.productName),d:e.t(o.sales),e:e.t(Math.trunc(o.price)),f:e.t(r.getPureDecimal(o.price)?r.getPureDecimal(o.price):"00"),g:o.isFavorite},o.isFavorite?{h:e.o(T=>r.onGoodsCollect(o),a),i:h._imports_16}:{j:e.o(T=>r.onGoodsCollect(o),a),k:h._imports_17},{l:o.status==1},o.status==1?{m:e.o(T=>r.goShop(o.productId,o.goodsId),a)}:o.status==0?{}:{},{n:o.status==0,o:a})),bf:s.boxHeight+"px",bg:e.o(r.closeShop),bh:e.o(r.openShop),bi:e.p({show:s.shopping,round:"20rpx",bgColor:"f3f5f9",zIndex:"10070"})})}const D=e._export_sfc(S,[["render",b],["__scopeId","data-v-471975a0"]]);S.__runtimeHooks=2;wx.createPage(D);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/home/living.js.map
|