chunk-57c3f967.2728aa4f.js 66 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-57c3f967"],{"056c":function(t,e,n){},"0a0d":function(t,e,n){"use strict";var o=n("3989"),a=n.n(o);a.a},"0aa5":function(t,e,n){"use strict";var o=n("7452"),a=n.n(o);a.a},"0d3f":function(t,e,n){},"0f1c":function(t,e,n){},1327:function(t,e,n){},"1a43":function(t,e,n){},"22f7":function(t,e,n){},"29b2":function(t,e,n){"use strict";var o;n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return i}));var a={Data:"jsondata",Send:"getJson",Connection:"connection",Disconnect:"disconnect"};function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object({NODE_ENV:"production",VUE_APP_CDN_URL:"",VUE_APP_HIDE_MENU:"scene,decor,virtual,vrhouse,business",VUE_APP_INCLUDEAPPS:"embed,shop,decor,discover,reserve,grave,fire-control,rtc-live",VUE_APP_LANGS:"zh#中文,en#英文,de#德文,fr#法文,jp#日文,kr#韩文,es#西班牙文",VUE_APP_LOCAL_PAGE:"embed",VUE_APP_OEM:"localshow",VUE_APP_OEM_NAEM:"本地版展示页面",VUE_APP_OPENAPI:"",VUE_APP_RTC_SOCKETURL:"",VUE_APP_SERVER_URL:"",VUE_APP_SHOP_ADMIN_URL:"",VUE_APP_SHOP_SOCKETURL:"",VUE_APP_SHOP_URL:"",VUE_APP_STATIC_DIR:"static",VUE_APP_STATIC_URL:"static/",VUE_APP_TESTKEY:"test",VUE_APP_TESTPWD:"11111111Aa",VUE_APP_TESTUSR:"13112311178",VUE_APP_VRHOUSE_OPENAPI:"",VUE_APP_VRHOUSE_URL:"",BASE_URL:""}).VUE_APP_SOCKETURL||t.url,a=Object({NODE_ENV:"production",VUE_APP_CDN_URL:"",VUE_APP_HIDE_MENU:"scene,decor,virtual,vrhouse,business",VUE_APP_INCLUDEAPPS:"embed,shop,decor,discover,reserve,grave,fire-control,rtc-live",VUE_APP_LANGS:"zh#中文,en#英文,de#德文,fr#法文,jp#日文,kr#韩文,es#西班牙文",VUE_APP_LOCAL_PAGE:"embed",VUE_APP_OEM:"localshow",VUE_APP_OEM_NAEM:"本地版展示页面",VUE_APP_OPENAPI:"",VUE_APP_RTC_SOCKETURL:"",VUE_APP_SERVER_URL:"",VUE_APP_SHOP_ADMIN_URL:"",VUE_APP_SHOP_SOCKETURL:"",VUE_APP_SHOP_URL:"",VUE_APP_STATIC_DIR:"static",VUE_APP_STATIC_URL:"static/",VUE_APP_TESTKEY:"test",VUE_APP_TESTPWD:"11111111Aa",VUE_APP_TESTUSR:"13112311178",VUE_APP_VRHOUSE_OPENAPI:"",VUE_APP_VRHOUSE_URL:"",BASE_URL:""}).VUE_APP_SOCKETPATH||t.path;return o=io(n,{path:a||"/",query:e}),o}},3023:function(t,e,n){},"30c5":function(t,e,n){"use strict";var o=n("6dd8"),a=n.n(o);a.a},"38b3":function(t,e,n){"use strict";var o=n("0f1c"),a=n.n(o);a.a},3989:function(t,e,n){},"3a04":function(t,e,n){},4431:function(t,e,n){"use strict";var o=n("0d3f"),a=n.n(o);a.a},4714:function(t,e,n){"use strict";var o=n("8345"),a=n.n(o);a.a},"55a2":function(t,e,n){"use strict";var o=n("c801"),a=n.n(o);a.a},"636c":function(t,e,n){"use strict";var o=n("b825"),a=n.n(o);a.a},"6dd8":function(t,e,n){},7452:function(t,e,n){},"7a7a":function(t,e,n){"use strict";var o=n("056c"),a=n.n(o);a.a},"7b35":function(t,e,n){"use strict";var o=n("3023"),a=n.n(o);a.a},8345:function(t,e,n){},"8efa":function(t,e,n){"use strict";var o=n("1a43"),a=n.n(o);a.a},"9a39":function(t,e,n){"use strict";n.d(e,"e",(function(){return m})),n.d(e,"d",(function(){return C})),n.d(e,"b",(function(){return E})),n.d(e,"a",(function(){return O})),n.d(e,"c",(function(){return x}));var o=n("53ca"),a=(n("7f7f"),n("ac6a"),n("6b54"),n("c75e")),i=n("617a"),s=n("c7b2"),r=n("80c5"),c=n("eb02"),l=n("29b2"),u=null,p=!1,d=null,h=null,f=null,m=i["a"].urlQueryValue("role"),v=i["a"].urlQueryValue("user_id"),w=i["a"].urlQueryValue("room_id");function y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";u.emit(e||l["a"].Send,{role:m,roomId:w,userId:v,content:t})}function g(t){if(null==d)return b(t),!1;if(d.mode!=t.mode)return b(t),!1;if(d.mode==r["a"].PANORAMA)return!!d.qua.equals(t.qua)||(b(t),!1);if(d.mode==r["a"].DOLLHOUSE){var e=!0;return t.qua&&d.qua&&(d.qua.equals(t.qua)||(e=!1)),t.pos&&d.pos&&(d.pos.equals(t.pos)||(e=!1)),t.target&&d.target&&(d.target.equals(t.target)||(e=!1)),d.zoom&&(d.zoom.equals(t.zoom)||(e=!1)),e||b(t),e}var n=!0;return d.qua.equals(t.qua)?(d.pos&&(d.pos.equals(t.pos)||(n=!1)),d.zoom&&d.zoom!=t.zoom&&(n=!1)):n=!1,n||b(t),n}function b(t){d={},d.mode=t.mode,t.pos&&(d.pos=new THREE.Vector3,d.pos.set(t.pos.x,t.pos.y,t.pos.z)),t.qua&&(d.qua=new THREE.Quaternion,d.qua.set(t.qua._x,t.qua._y,t.qua._z,t.qua._w)),t.target&&(d.target=new THREE.Vector3,d.target.set(t.target.x,t.target.y,t.target.z)),t.zoom&&(d.zoom=t.zoom)}function _(){var t=c["a"].getters["scene/metadata"],e=0;t.entry&&(e=t.entry.pano);var n=new THREE.Quaternion;t.entry&&t.entry.camera&&(n=t.entry.camera.quaternion),P(e,n)}function P(t,e){if(s["app"].player.mode!=r["a"].PANORAMA||t!=s["app"].player.currentPano.id){var n;n=e instanceof Array?(new THREE.Quaternion).fromArray(e):(new THREE.Quaternion).set(e._x,e._y,e._z,e._w);var o={mode:r["a"].PANORAMA,pano:t,qua:n};isNaN(o.qua.x)&&console.log("NaN??????"),s["app"].player.flyToItem(o,null)}}function C(){u?u.emit("startCall"):(u=Object(l["b"])({url:"",path:"/vr-node"},{role:m,roomId:w,userId:v,scene_num:i["a"].urlQueryValue("m"),customContent:window._houseInfo?window._houseInfo.customContent:""}),u.on(l["a"].Connection,(function(t){console.log(t)})),u.on(l["a"].Disconnect,(function(){s["app"].play.control.onUpdate=!0,p=!1,!1,!1,h&&clearInterval(h),f&&clearInterval(f)})),u.on("vr_request",(function(t){h&&clearInterval(h),f&&clearInterval(f),p=!1,!1,!1;var e=!1,n=!1;if(u.emit("startCall"),t.persons&&t.persons.forEach((function(t){"agent"==t.role?e=!0:"customer"==t.role&&(n=!0,a["a"].emit("vrhouse/socket/action","userId",t.userId))})),e&&n){_();var o=0,i=3;h=setInterval((function(){--i>=1?a["a"].emit("player/counting",i):(a["a"].emit("player/counting",0),p=!0,s["app"].play.control.onUpdate=!1,"agent"==m&&!0,"customer"==m&&!0,clearInterval(h),f=setInterval((function(){a["a"].emit("vrhouse/socket/action","time",++o)}),1e3),a["a"].emit("vrhouse/socket/action","time",o))}),1e3),a["a"].emit("player/counting",i),a["a"].emit("vrhouse/socket/action","sync",!0)}else a["a"].emit("vrhouse/socket/action","sync",!1),a["a"].emit("vrhouse/socket/action","time",-1)})),u.on("action",(function(t){t&&("string"===typeof t?a["a"].emit("vrhouse/socket/action",t):a["a"].emit("vrhouse/socket/action",t.name,t.data,t.role))})),u.on("vr_response",(function(t){if(t.content.drawing)a["a"].emit("vrhouse/socket/action","drawing",t);else if(p&&s["app"].player.cameraControls.activeControl){if(t.role==m)return;if("undefined"!=typeof t.content.onUpdate&&(s["app"].play.control.onUpdate=t.content.onUpdate,console.log(s["app"].play.control.onUpdate),"agent"!=m||s["app"].play.control.onUpdate||a["a"].emit("vrhouse/socket/action","operation-tips")),"undefined"!=typeof t.content.scale&&(s["app"].player.cameraControls.activeControl.absoluteScale=t.content.scale,s["app"].player.cameraControls.activeControl.updateZoom()),s["app"].play.control.onUpdate)return;if(t.content.item){if(g(t.content.item))return;(t.content.item.mode!=s["app"].player.mode||t.content.item.mode==s["app"].player.mode&&t.content.item.mode==r["a"].PANORAMA)&&P(t.content.item.pano,t.content.item.qua),s["app"].player.copyCameraProp(s["app"].player.cameraControls.activeControl,t.content.item),s["app"].player.adjustControlAngel()}else if(t.content.toPano)t.content.toPano.pano=s["app"].player.model.panos.get(t.content.toPano.panoId),s["app"].player.adjustControlAngel({target:new THREE.Vector3(s["app"].player.cameraControls.activeControl.target.x,s["app"].player.cameraControls.activeControl.target.y,s["app"].player.cameraControls.activeControl.target.z)}),s["app"].player.currentPano.id!=t.content.toPano&&s["app"].player.flyToPano(t.content.toPano);else if(t.content.newModeInfo){if(t.content.newModeInfo.panoId&&(t.content.newModeInfo.pano=s["app"].player.model.panos.get(t.content.newModeInfo.panoId)),t.content.newModeInfo.quaternion){var e=t.content.newModeInfo.quaternion;t.content.newModeInfo.quaternion=new THREE.Quaternion,t.content.newModeInfo.quaternion.set(e._x,e._y,e._z,e._w)}s["app"].player.flyToNewMode(t.content.newModeInfo)}else console.warn(t)}})))}function E(){f&&clearInterval(f),a["a"].emit("vrhouse/socket/action","time",-1),u&&(u.emit("stopCall"),u.disconnect(),u=null,"customer"==m&&a["a"].emit("vrhouse/socket/action","sync",!1))}function O(t){u&&("object"===Object(o["a"])(t)&&(t.role=m),y({action:t}))}function x(t){y({drawing:t})}s["app"].player.cameraControls.on("vr_freedom",(function(t){p&&!s["app"].play.control.onUpdate&&(u.emit(l["a"].Send,{role:m,roomId:w,userId:v,content:{onUpdate:!1}}),s["app"].play.control.onUpdate=!0)})),s["app"].player.on("vr_Rotate",(function(t){if(p){var e={};e.qua=t.quaternion,e.mode=t.mode,e.pos=t.position,t.cameraControls.activeControl.currentScale&&(e.zoom=t.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())),e.type="Rotate",g(e)||(t.mode==r["a"].PANORAMA?e.pano=t.currentPano.id:t.mode==r["a"].FLOORPLAN&&(e.pos=(new THREE.Vector3).set(t.position.x,t.position.y,t.position.z),e.zoom=t.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())),t.cameraControls.activeControl.target&&(e.pos=t.position,e.target=t.cameraControls.activeControl.target),s["app"].play.control.onUpdate&&u.emit(l["a"].Send,{role:m,roomId:w,userId:v,content:{item:e}}))}})),s["app"].player.on("vr_Zoom",(function(t){if(p){var e=t.cameraControls.activeControl.absoluteScale;u.emit(l["a"].Send,{role:m,roomId:w,userId:v,content:{scale:e}})}})),s["app"].player.on("vr_FlyToPano",(function(t){p&&(t.socketed=!0,u.emit(l["a"].Send,{role:m,roomId:w,userId:v,content:{toPano:t}}),console.log("flytopano"+t.toString()))})),s["app"].player.on("vr_FlyToNewMode",(function(t){p&&(t.socketed=!0,u.emit(l["a"].Send,{role:m,roomId:w,userId:v,content:{newModeInfo:t}}),s["app"].play.control.onUpdate=!1)})),a["a"].on("vrhouse/painting",(function(t){u.emit(l["a"].Send,{role:m,roomId:w,userId:v,content:{drawing:t}})}))},a254:function(t,e,n){"use strict";var o=n("dd00"),a=n.n(o);a.a},aa61:function(t,e,n){"use strict";var o=n("3a04"),a=n.n(o);a.a},abdb:function(t,e,n){},ad1a:function(t,e,n){"use strict";var o=n("1327"),a=n.n(o);a.a},af73:function(t,e,n){"use strict";var o=n("bc6b"),a=n.n(o);a.a},b504:function(t,e,n){"use strict";var o=n("fbbf"),a=n.n(o);a.a},b5dc:function(t,e,n){"use strict";var o=n("abdb"),a=n.n(o);a.a},b825:function(t,e,n){},bc6b:function(t,e,n){},c253:function(t,e,n){"use strict";var o=n("22f7"),a=n.n(o);a.a},c801:function(t,e,n){},cdc5:function(t,e,n){"use strict";var o=n("e7a2"),a=n.n(o);a.a},d4fb:function(t,e,n){"use strict";var o=n("fc23"),a=n.n(o);a.a},d8e3:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-layout"},[n("div",{staticClass:"app-player"},[n("player"),n("Floor")],1),t.show?n("app-header",{style:{zIndex:t.showGoods?1:9999}}):t._e(),t.show?n("app-main"):t._e(),t.showPassword?n("Password",{on:{cancel:t.onPasswordCancel}}):t._e()],1)},a=[],i=(n("8e6e"),n("ac6a"),n("456d"),n("ade3")),s=n("2f62"),r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("player",{ref:"player"})},c=[],l=n("b31b"),u=n("c7b2"),p={components:{Player:l["a"]},created:function(){var t=this;this.$store.commit("SetPlayerOptions",{showUI:!1}),this.$bus.on("ready",(function(){t.$bus.emit("rule/Visible",!1,"vrhouse")}))},mounted:function(){var t=this;this.$refs.player.start(),u["app"].player.on("player/flyToNext",(function(e){t.$bus.emit("shop/player/mode",e)}))},methods:{init:function(){}}},d=p,h=n("2877"),f=Object(h["a"])(d,r,c,!1,null,null,null),m=f.exports,v=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"header",class:{disable:t.disable}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],staticClass:"bg",on:{click:t.bgClick}}),n("h2",{staticClass:"title",class:{active:t.show},on:{click:t.changeShow}},[n("p",[t._v("\n "+t._s(t.tempdata.title)+"\n "),n("i",{directives:[{name:"show",rawName:"v-show",value:t.tempdata.description,expression:"tempdata.description"}],staticClass:"iconfont iconscene_tit_arrow"})])]),t.newView?[n("div",{staticClass:"banner-layer"},[t.show?n("Banner",{staticClass:"banner",attrs:{screens:t.banner,type:0,index:t.index},on:{changeIndex:t.changeBanner},scopedSlots:t._u([{key:"item",fn:function(e){var o=e.data;return n(o.component,t._b({tag:"component",staticClass:"item",on:{cb:function(t){return o.cb&&o.cb(t)}}},"component",o.data,!1))}}],null,!1,3555985452)}):t._e()],1),t.imgsShow?n("Dialog",{staticClass:"imgs-dialog"},[n("ImgQuery",{attrs:{info:t.info},on:{quit:t.quitImgs}})],1):t._e(),t.mapShow?n("Dialog",{on:{quit:t.quitMap}},[n("Gaode",{attrs:{lat:t.info.latitude,lng:t.info.longitude}})],1):t._e()]:n("div",{staticClass:"description",class:{show:t.show},on:{click:t.changeShow}},[n("div",[n("div",{staticClass:"stitle"},[t._v(t._s(t.tempdata.title))]),n("div",{staticClass:"content",domProps:{innerHTML:t._s(t.tempdata.description)}})])]),t.isMiniprogram?n("div",{staticClass:"share",on:{click:function(e){return e.stopPropagation(),t.onShare(e)},touchstart:function(t){t.stopPropagation()}}},[n("i",{staticClass:"iconfont iconscene_tit_share"})]):t._e(),n("Map",{directives:[{name:"show",rawName:"v-show",value:!t.show,expression:"!show"}],ref:"map"})],2)},w=[],y=(n("96cf"),n("1da1")),g=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"map",class:{hide:t.isSide,hyaline:!t.show}},[n("div",{directives:[{name:"show",rawName:"v-show",value:"pano"!=t.mode,expression:"mode!='pano'"}],staticClass:"tab-layer"},[n("div",{staticClass:"tabs",class:{disable:!t.modeCanSwitch}},[n("span",{class:{active:"2d"===t.mode},on:{click:function(e){return t.changeMode("2d")}}},[n("i",{staticClass:"iconfont iconscene_map_2d"}),t._v("\n 平面图\n ")]),n("span",{class:{active:"3d"===t.mode},on:{click:function(e){return t.changeMode("3d")}}},[n("i",{staticClass:"iconfont iconscene_map_3d"}),t._v("\n 三维模型\n ")])])]),n("div",{directives:[{name:"show",rawName:"v-show",value:"pano"==t.mode,expression:"mode=='pano'"}],staticClass:"map-layer",on:{click:function(e){return t.changeMode("2d")}}},[n("div",{ref:"cad",staticClass:"cad",staticStyle:{width:"90px",height:"110px"}}),n("p",{staticClass:"change",on:{click:function(e){return e.stopPropagation(),t.changeMode("3d")}}},[n("i",{staticClass:"iconfont iconscene_map_3d"}),t._v("\n 3D模型\n ")])]),n("span",{directives:[{name:"show",rawName:"v-show",value:"pano"==t.mode,expression:"mode=='pano'"}],staticClass:"btn-side",on:{click:function(e){e.stopPropagation(),t.isSide=!t.isSide}}},[n("i",{staticClass:"iconfont",class:[t.isSide?"icon_back":"icon_forward"]})])])},b=[],_=n("26d4"),P=n("6860");n("9a39");function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach((function(e){Object(i["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var O={props:["area"],data:function(){return{show:!1,isLock:!1,isSide:!1}},computed:E({},Object(s["b"])({mode:"mode",floor:"scene/houstFloor",modeCanSwitch:"modeCanSwitch"})),methods:{changeMode:function(t){Object(u["flyToNewMode"])(t)},hideMap:function(){this.isSide=!0}},watch:{floor:function(){var t=this;this.cad.adapt(),this.cad.loadData(this.floor),this.cad.toCanvas((function(){return t.cad.adapt()})),this.show=!0,this.cad.setSign({x:app.firstView.position.x,y:app.firstView.position.z},app.cameraControls.controls.panorama.lon),this.$bus.emit("sign/Set/angle",this.cad.processing.data.dire)}},mounted:function(){var t=this;this.cad=Object(_["a"])({data:this.floor,layer:this.$refs.cad,edit:!1,padding:1,isCanvas:!0}),this.cad.hideDire(),this.cad.setDefaultPointStyle({fillColor:"rgba(0,0,0,0)",storkeColor:"rgba(0,0,0,0)"}),this.cad.toCanvas(),this.listen=function(e){var n=e.x,o=e.y,a=e.lon;return t.cad.setSign({x:n,y:o},a)},this.$bus.on("player/position/change",this.listen),this.$bus.on("shop/player/mode",(function(e){t.isSide=!0})),this.$bus.on("shop/tag/onshow",(function(e){e&&(t.isSide=!0)}))},beforeDestroy:function(){this.cad.destroy(),this.$bus.off("player/position/change",this.listen)}},x=O,S=(n("ad1a"),Object(h["a"])(x,g,b,!1,null,"be04d16c",null)),k=S.exports,T=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"img-query"},[n("i",{staticClass:"iconfont iconclose",on:{click:function(e){return t.$emit("quit")}}}),n("div",{staticClass:"content"},[t._t("default")],2)])},j=[],I=(n("8efa"),{}),A=Object(h["a"])(I,T,j,!1,null,"9661f678",null),D=A.exports,U=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"layer"},[n("div",{staticClass:"layer head-banner"},[n("div",{staticClass:"swiper-wrapper"},t._l(t.screens,(function(e,o){return n("div",{key:o,staticClass:"swiper-slide"},[t._t("item",null,{data:e,index:o})],2)})),0)]),0===t.type?n("div",{staticClass:"head-pages"},[n("span",{style:{width:t.barWidth+"%",left:t.barWidth*t.current+"%"}})]):n("div",{staticClass:"number-pages"},[n("span",[t._v(t._s(t.current+1)+"/"+t._s(t.total))])])])},M=[];function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function V(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?R(Object(n),!0).forEach((function(e){Object(i["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var q={props:["screens","type","index"],data:function(){return{total:0,current:this.index||0,args:[{effect:"coverflow",grabCursor:!0,centeredSlides:!0,slidesPerView:"auto",coverflowEffect:{rotate:40,stretch:0,depth:100,modifier:1,slideShadows:!0}}]}},computed:{barWidth:function(){return 1/this.total*100}},watch:{current:function(){this.swiper.slideTo(this.current),this.current!==this.index&&this.$emit("changeIndex",this.current)},index:function(){this.current=this.index}},mounted:function(){var t=this,e=this.args[this.type]?V({},this.args[this.type]):{};this.swiper=new Swiper(".head-banner",V(V({},e),{},{on:{slideChange:function(){t.current=this.activeIndex}}})),this.swiper=Array.isArray(this.swiper)?this.swiper[swiper.length-1]:this.swiper,t.total=this.swiper.slidesGrid.length,this.swiper.slideTo(this.current)}},N=q,H=(n("7b35"),Object(h["a"])(N,U,M,!1,null,"68104998",null)),L=H.exports,z=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"layer"},[n("h3",[t._v(t._s(t.info.brandName))]),n("div",{staticClass:"types"},[n("span",[t._v(t._s(t.info.typeName))])]),n("div",{staticClass:"content"},[t._v("\n "+t._s(t.info.simpleDesc.length>280?t.info.simpleDesc.substr(0,280)+"...":t.info.simpleDesc)+"\n ")]),t.info.introduceVideo?n("div",{staticClass:"video"},[n("ivideo",{attrs:{info:t.info}})],1):t._e()])},B=[],Q=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"video-layer"},[n("div",{on:{click:t.clickHandle}},[n("video",{ref:"video",attrs:{src:t.info.introduceVideo,poster:t.info.introduceVideoCover,"x5-video-player-type":"h5-page",controlslist:"nodownload",disablepictureinpicture:"","webkit-playsinline":"","x-webkit-airplay":"",playsinline:""}}),t.paused?n("span",{staticClass:"pause"},[n("i",{staticClass:"iconfont iconrinfo_play"})]):n("span",{staticClass:"play"},[n("i",{staticClass:"iconfont iconCombinedShape"})])])])},F=[],G={props:["info"],data:function(){return{paused:!0}},methods:{clickHandle:function(){this.paused?this.$refs.video.play():this.$refs.video.pause()}},mounted:function(){var t=this;this.onPlay=function(){return t.paused=!1},this.onPause=function(){return t.paused=!0},this.$refs.video.addEventListener("play",this.onPlay,!1),this.$refs.video.addEventListener("pause",this.onPause,!1)},beforeDestroy:function(){this.$refs.video.pause(),this.$refs.video.removeEventListener("play",this.onPlay,!1),this.$refs.video.removeEventListener("pause",this.onPause,!1)}},W=G,J=(n("7a7a"),Object(h["a"])(W,Q,F,!1,null,"ab0692f2",null)),K=J.exports,X={0:"服饰",1:"家具",2:"数码",3:"娱乐",4:"其他"},Y={props:["info"],computed:{typeName:function(){return X[this.info.type]}},components:{ivideo:K}},Z=Y,tt=(n("30c5"),Object(h["a"])(Z,z,B,!1,null,"29bdc9e6",null)),et=tt.exports,nt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"img-layer"},[n("i",{staticClass:"iconfont iconclose",on:{click:function(e){return t.$emit("quit")}}}),t.current?n("div",{staticClass:"banner-layer",on:{touchstart:function(t){t.stopPropagation()}}},[t.showBanner?n("Banner",{staticClass:"banner",attrs:{screens:t.current,index:t.index},on:{changeIndex:t.changeIndex},scopedSlots:t._u([{key:"item",fn:function(e){var o=e.data;return n("div",{staticClass:"item"},[n("img",{attrs:{src:~t.origins.indexOf(o)?o.origin:o.abridge,alt:""}})])}}],null,!1,619343202)}):t._e(),n("a",{directives:[{name:"show",rawName:"v-show",value:!~t.origins.indexOf(t.current[t.index]),expression:"!~origins.indexOf(current[index])"}],staticClass:"query-origin",on:{click:function(e){return t.clickLoadding()}}},[~t.loads.indexOf(t.current[t.index])?[n("i",{staticClass:"iconfont icon_loading_"}),t._v("加载中\n ")]:[t._v("查看原图")]],2)],1):t._e()])},ot=[],at=(n("7514"),n("28a5"),[]),it={props:["info","estate"],data:function(){return{left:0,index:0,showBanner:!0,current:null,screens:[],origins:at,loads:[]}},watch:{current:function(){var t=this;this.showBanner=!1,this.index=0,this.$nextTick((function(){return t.showBanner=!0}))},info:function(){this.extract()}},methods:{clickLoadding:function(){this.loading()},loading:function(){var t=this,e=this.current[this.index];if(!~this.loads.indexOf(e)){var n=new Image;n.onload=function(){at.push(e),t.origins.push(e),t.loads.splice(t.loads.indexOf(e),1)},n.onerror=function(t){console.log("-0-",t)},n.src=e.origin,this.loads.push(e)}},changeIndex:function(t){this.index=t},changeCurrent:function(t,e){this.left=t.target.offsetLeft+"px",this.current=e},extract:function(){var t=this.info.picList.split("#$#"),e=[];e=t.map((function(t){return{abridge:t,origin:t}})),this.origins=e.filter((function(t){return at.some((function(e){return e.origin===t.origin}))})),console.log(this.origins,at),this.current=e}},mounted:function(){this.extract()},components:{Banner:L}},st=it,rt=(n("38b3"),Object(h["a"])(st,nt,ot,!1,null,"e521c4de",null)),ct=rt.exports,lt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"album",on:{click:t.clickHandle}},[n("div",{staticClass:"single",style:t.images[0]&&{backgroundImage:"url("+t.images[0]+")"}}),t.images.length>=2?n("div",{staticClass:"more"},[t.images[1]?n("div",{style:t.images[1]&&{backgroundImage:"url("+t.images[1]+")"}}):t._e(),n("div",{style:t.images[2]&&{backgroundImage:"url("+t.images[2]+")"}},[t.images[2]?n("div",[n("span",[n("b",[t._v("+"+t._s(t.picList.length))]),t._v("\n 查看更多\n ")])]):t._e()])]):t._e()])},ut=[],pt={props:["info"],data:function(){return{images:[],picList:[]}},methods:{clickHandle:function(){this.$emit("cb")},extract:function(){console.log(this.info.picList),this.picList=this.info.picList.split("#$#"),this.images=this.info.picList.split("#$#").splice(0,3)}},watch:{info:function(){this.extract()}},mounted:function(){this.extract()}},dt=pt,ht=(n("55a2"),Object(h["a"])(dt,lt,ut,!1,null,"27d6c28a",null)),ft=ht.exports,mt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"layer",staticClass:"map-layer",class:{abridge:t.abridge},on:{click:t.clickHandle}},[t.abridge?[n("img",{attrs:{src:t.img}}),t._m(0)]:n("div",{ref:"map",staticClass:"container"})],2)},vt=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",[t._v("\n 查看周边\n "),n("i",{staticClass:"iconfont iconmaps_enlarge"})])}],wt="e661b00bdf2c44cccf71ef6070ef41b8",yt="3bddec1685d461c2271a6099cde02fd2";function gt(){return new Promise((function(t,e){if(window.AMap)t(window.AMap);else{var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src="https://webapi.amap.com/maps?v=1.4.15&key=".concat(wt,"&plugin=AMap.Geocoder&callback=initAMap"),n.onerror=e,document.head.appendChild(n)}window.initAMap=function(){t(window.AMap)}}))}var bt="http://webapi.amap.com/theme/v1.3/markers/n/mark_b.png",_t={props:["abridge","lat","lng"],data:function(){return{width:0,height:0,zoom:13}},methods:{initAMap:function(){var t=Object(y["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,gt();case 2:e=t.sent,this.map=new e.Map(this.$refs.map,{resizeEnable:!0,zoom:this.zoom,center:[this.lng,this.lat]}),new e.Marker({position:new e.LngLat(this.lng,this.lat),map:this.map,icon:bt,clickable:!1});case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),clickHandle:function(){this.$emit("cb")}},computed:{img:function(){return 0===this.width||0===this.height?"":"https://restapi.amap.com/v3/staticmap?location=".concat(this.lng,",").concat(this.lat,"&zoom=").concat(this.zoom,"&size=").concat(this.width,"*").concat(this.height,"&key=").concat(yt,"&markers=-1,").concat(bt,",:").concat(this.lng,",").concat(this.lat)}},mounted:function(){this.abridge?(this.width=this.$refs.layer.offsetWidth,this.height=this.$refs.layer.offsetHeight):this.initAMap()}},Pt=_t,Ct=(n("0a0d"),Object(h["a"])(Pt,mt,vt,!1,null,"5a1ff6de",null)),Et=Ct.exports,Ot=n("617a"),xt=n("c75e"),St=n("80c5"),kt=n("29b2"),Tt=Ot["a"].urlQueryValue("role")||"leader",jt=Ot["a"].urlQueryValue("user_id"),It=Ot["a"].urlQueryValue("room_id");function At(){return Tt}function $t(){return jt}var Dt,Ut=null,Mt=!1,Rt=null,Vt=!1;function qt(){Dt&&clearTimeout(Dt)&&(Dt=null),u["app"].player.model.fadePanoMarkers(null,null,{vrCustomer:!1})}function Nt(){u["app"].player.model?(u["app"].player.model.fadePanoMarkers(0,0,{vrCustomer:!0,hideVideoFlag:!0}),Dt=null):Dt=setTimeout((function(){Nt()}),30)}function Ht(t,e){("leader"==Tt||e)&&Ut&&Ut.emit("webSyncAction",t)}function Lt(t,e){Ut&&Ut.emit("clientSyncAction",{sender:"h5",type:t,data:e})}function zt(t,e){Ut&&Ut.emit("action",{sender:"h5",type:t,data:e})}function Bt(t){if(null==Rt)return Qt(t),!1;if(Rt.mode!=t.mode)return Qt(t),!1;if(Rt.mode==St["a"].PANORAMA)return!!Rt.qua.equals(t.qua)||(Qt(t),!1);if(Rt.mode==St["a"].DOLLHOUSE){var e=!0;return t.qua&&Rt.qua&&(Rt.qua.equals(t.qua)||(e=!1)),t.pos&&Rt.pos&&(Rt.pos.equals(t.pos)||(e=!1)),t.target&&Rt.target&&(Rt.target.equals(t.target)||(e=!1)),Rt.zoom&&(Rt.zoom.equals(t.zoom)||(e=!1)),e||Qt(t),e}var n=!0;return Rt.qua.equals(t.qua)?(Rt.pos&&(Rt.pos.equals(t.pos)||(n=!1)),Rt.zoom&&Rt.zoom!=t.zoom&&(n=!1)):n=!1,n||Qt(t),n}function Qt(t){Rt={},Rt.mode=t.mode,t.pos&&(Rt.pos=new THREE.Vector3,Rt.pos.set(t.pos.x,t.pos.y,t.pos.z)),t.qua&&(Rt.qua=new THREE.Quaternion,Rt.qua.set(t.qua._x,t.qua._y,t.qua._z,t.qua._w)),t.target&&(Rt.target=new THREE.Vector3,Rt.target.set(t.target.x,t.target.y,t.target.z)),t.zoom&&(Rt.zoom=t.zoom)}function Ft(t,e,n,o,a,i){var s;console.log(arguments),s=e instanceof Array?(new THREE.Quaternion).fromArray(e):(new THREE.Quaternion).set(e._x,e._y,e._z,e._w);var r={mode:n,pano:t,qua:s,pos:o,target:a,zoom:i};isNaN(r.qua.x)&&console.log("NaN??????"),u["app"].player.flyToItem(r,(function(){u["app"].play.control.noFly=!0,Vt=!0}))}function Gt(t){if(!Ut&&It&&jt){var e={url:"",path:"/vr-node"},n={role:Tt,roomId:It,userId:jt,sceneNum:Ot["a"].urlQueryValue("m"),userLimitNum:5},o=Ot["a"].urlHashValue("socket");if(o)try{o=JSON.parse(decodeURIComponent(o)),e={url:o.socketHost,path:o.path},n.userLimitNum=o.options.userLimitNum,n.role=Tt=o.options.role}catch(a){console.error("socket参数转换出错")}Ut=Object(kt["b"])(e,n),Ut.on("connect",(function(){t&&(Lt("cart",!0),Lt("ready",Ot["a"].urlQueryValue("m")))})),Ut.on("disconnect",(function(){})),Ut.on("webSyncAction",(function(t){if(t.type&&xt["a"].emit("shop/sync/action",t),"leader"==Tt&&t.init){var e={follow:1,mode:u["app"].player.mode,qua:u["app"].player.quaternion,panoId:u["app"].player.currentPano.id};"floorplan"==e.mode&&(e.zoom=u["app"].player.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())),("floorplan"==e.mode||"dollhouse"==e.mode)&&(e.target=u["app"].player.cameraControls.activeControl.target,e.pos=u["app"].player.cameraControls.activeControl.camera.position),Ht(e)}if(Mt&&u["app"].player.cameraControls.activeControl){if(t.follow){var n=u["app"].model.panos.get(t.panoId);return void(n||u["app"].player.linkViewManager.inited?Ft(t.panoId,t.qua,t.mode,t.pos,t.target,t.zoom):xt["a"].on("link/data/load",(function(){Ft(t.panoId,t.qua,t.mode,t.pos,t.target,t.zoom)})))}if("undefined"!=typeof t.onUpdate&&(u["app"].play.control.onUpdate=t.onUpdate,"leader"!=Tt||u["app"].play.control.onUpdate||xt["a"].emit("vrhouse/socket/action","operation-tips")),"undefined"!=typeof t.scale&&(u["app"].player.cameraControls.activeControl.absoluteScale=t.scale,u["app"].player.cameraControls.activeControl.updateZoom()),u["app"].play.control.onUpdate)return;if(t.item){if(Bt(t.item))return;Vt?t.item.mode==St["a"].PANORAMA&&t.item.pano!=u["app"].player.currentPano.id?a():(u["app"].player.copyCameraProp(u["app"].player.cameraControls.activeControl,t.item,{transitionQua:!0}),u["app"].player.adjustControlAngel()):t.item.pano==u["app"].player.currentPano.id?(Vt=!0,u["app"].player.copyCameraProp(u["app"].player.cameraControls.activeControl,t.item),u["app"].player.adjustControlAngel()):a()}else if(t.toPano){if(t.toPano.pano=u["app"].player.model.panos.get(t.toPano.panoId),u["app"].player.currentPano.id!=t.toPano){if(t.toPano.follow=!0,t.toPano.quaternion){var o=t.toPano.quaternion;t.toPano.quaternion=new THREE.Quaternion(o._x,o._y,o._z,o._w)}u["app"].player.flyToPano(t.toPano,(function(){Vt=!0}))}}else if(t.newModeInfo){if(t.newModeInfo.panoId&&(t.newModeInfo.pano=u["app"].player.model.panos.get(t.newModeInfo.panoId)),t.newModeInfo.follow=!0,t.newModeInfo.callback=function(){Vt=!0},t.newModeInfo.quaternion){o=t.newModeInfo.quaternion;t.newModeInfo.quaternion=new THREE.Quaternion(o._x,o._y,o._z,o._w)}u["app"].player.flyToNewMode(t.newModeInfo)}}function a(){var e;e=t.item.qua instanceof Array?(new THREE.Quaternion).fromArray(t.item.qua):(new THREE.Quaternion).set(t.item.qua._x,t.item.qua._y,t.item.qua._z,t.item.qua._w);var n={mode:St["a"].PANORAMA,pano:t.item.pano,qua:e};isNaN(n.qua.x)&&console.log("NaN??????"),u["app"].play.control.noFly=!1,u["app"].player.flyToItem(n,(function(){Vt=!0})),u["app"].play.control.noFly=!0}})),Ut.on("clientSyncAction",(function(t){"sync"==t.type?Jt():"back"==t.type?Kt():"newRoom"==t.type&&t.data&&t.data.roomId&&("customer"==Tt&&qt(),Tt="fashilong"==Ot["a"].urlQueryValue("origin").toLowerCase()?t.data.role:"leader",It=t.data.roomId,jt=t.data.userId,Wt(),setTimeout((function(){Gt(!0)}),100)),xt["a"].emit("shop/app/action",t)})),Ut.on("changeVoiceStatus",(function(t){xt["a"].emit("shop/sync/action",{type:"users",data:t.roomsPerson})})),Ut.on("roomIn",(function(t){Mt=!0,!0,!0,"customer"==Tt&&(u["app"].play.control.onUpdate=!1,setTimeout((function(){u["app"].ready?Ht({init:1},!0):xt["a"].on("loaded",(function(){Ht({init:1},!0)}))}),100)),xt["a"].emit("shop/sync/action",{type:"users",data:t.roomsPerson})})),Ut.on("roomInFail",(function(t){setTimeout((function(){xt["a"].emit("shop/sync/action",{type:t.type})}),1500)})),Ut.on("roomClose",(function(t){Mt=!1,!1,!1,t&&"3002"==t.code?xt["a"].emit("shop/sync/action",{type:"dissolve"}):xt["a"].emit("shop/sync/action",{type:"close"})})),Ut.on("someOneInRoom",(function(t){xt["a"].emit("shop/sync/action",{type:"users",user:t.user,data:t.roomsPerson}),xt["a"].emit("shop/sync/action",{type:"online",user:t.user,isOnline:!0})})),Ut.on("someOneLeaveRoom",(function(t){xt["a"].emit("shop/sync/action",{type:"users",user:t.user,data:t.roomsPerson}),xt["a"].emit("shop/sync/action",{type:"online",user:t.user,isOnline:!1})})),Ut.on("roomPersonChange",(function(t){xt["a"].emit("shop/sync/action",{type:"userChange",data:t.roomsPerson,user:t.user,isOnline:"inRoom"==t.actionName})})),Ut.on("action",(function(t){}))}}function Wt(){Ut&&(Kt(),Ut.close(),Ut=null)}function Jt(){Ut&&Ut.emit("startCall"),"customer"==Tt&&Nt()}function Kt(){Ut&&Ut.emit("stopCall"),u["app"].play.control.noFly=!1,Mt=!1,!1,!1,u["app"].play.control.onUpdate=!0}function Xt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function Yt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Xt(Object(n),!0).forEach((function(e){Object(i["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}u["app"].player.cameraControls.on("vr_freedom",(function(t){Mt&&("customer"==Tt?u["app"].play.control.onUpdate=!0:Ht({onUpdate:!1}))})),u["app"].player.on("vr_Rotate",(function(t){if(Mt&&null!=t&&null!=t.currentPano&&"customer"!=Tt){var e={};e.qua=t.quaternion,e.mode=t.mode,e.pos=t.position,t.cameraControls.activeControl.currentScale&&(e.zoom=t.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())),e.type="Rotate",Bt(e)||(t.mode==St["a"].PANORAMA?e.pano=t.currentPano.id:t.mode==St["a"].FLOORPLAN&&(e.pos=(new THREE.Vector3).set(t.position.x,t.position.y,t.position.z),e.zoom=t.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())),t.cameraControls.activeControl.target&&(e.pos=t.position,e.target=t.cameraControls.activeControl.target),u["app"].play.control.onUpdate&&Ht({item:e}))}})),u["app"].player.on("vr_Zoom",(function(t){if(Mt){var e=t.cameraControls.activeControl.absoluteScale;Ht({scale:e})}})),u["app"].player.on("vr_FlyToPano",(function(t){Mt&&(t.socketed=!0,t.quaternion=u["app"].player.quaternion,"customer"==Tt&&(u["app"].play.control.noFly=!0),Ht({toPano:t,onUpdate:!1}))})),u["app"].player.on("vr_FlyToTag",(function(t){"customer"==Tt&&t.follow&&(u["app"].play.control.noFly=!1),"leader"==Tt&&(u["app"].play.control.noFly=!1)})),u["app"].player.on("vr_FlyToNewMode",(function(t){Mt&&(t.socketed=!0,t.quaternion=Ht({newModeInfo:t}))}));var Zt=Ot["a"].urlQueryValue("brandId"),te=Ot["a"].urlQueryValue("m"),ee={data:function(){return{show:!1,newView:!1,imgsShow:!1,mapShow:!1,index:0,info:null,isMiniprogram:!1,disable:!1}},computed:Yt(Yt({},Object(s["b"])({tempdata:"scene/tempdata"})),{},{banner:function(){var t=this.info.picList?[{component:"Album",cb:this.showImgQuery.bind(this),data:{info:this.info}}]:[];return[{component:"Info",data:{info:this.info}}].concat(t,[{component:"Gaode",cb:this.showMap.bind(this),data:{abridge:!0,lat:this.info.latitude,lng:this.info.longitude}}])}}),methods:{bgClick:function(){this.show=!1,Lt("cart",!0)},changeShow:function(){this.show=!this.show,this.show&&(this.$refs.map.model=null,this.$bus.emit("shop/tag/show",!1,!0)),Lt("cart",!this.show)},onShare:function(){var t=this;this._share||(Lt("share"),this._share=!0,setTimeout((function(){t._share=!1}),500))},showImgQuery:function(t){this.imgsShow=!0,this.show=!1,Lt("cart",!1)},showMap:function(t){this.mapShow=!0,this.show=!1,Lt("cart",!1)},quitImgs:function(){this.imgsShow=!1,Lt("cart",!0)},quitMap:function(){this.mapShow=!1,Lt("cart",!0)},changeBanner:function(t){this.index=t}},mounted:function(){var t=Object(y["a"])(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(Zt){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,this.$http.get("".concat("","/4dage/shop/getBrandInfo?brandId=").concat(Zt,"&sceneNum=").concat(te));case 4:if(e=t.sent,n=e.data,n){t.next=8;break}return t.abrupt("return");case 8:this.newView=!0,this.info=n;case 10:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),components:{Map:k,ImgQuery:ct,Dialog:D,Gaode:Et,Banner:L,Info:et,Album:ft,Video:K},created:function(){var t=this;Ot["a"].detectWeixin()&&-1!=window.location.href.indexOf("#socket")&&(this.isMiniprogram=!0),this.$bus.on("shop/header/disable",(function(e){t.disable=e,t.disable&&t.$refs.map.changeMode("pano")})),this.$bus.on("shop/header/hidemap",(function(){t.$refs.map.hideMap()}))}},ne=ee,oe=(n("c253"),n("b5dc"),Object(h["a"])(ne,v,w,!1,null,"21cb4d95",null)),ae=oe.exports,ie=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{mode:"out-in"}},[n("div",[t.show?n(t.page,{ref:"shopping",tag:"component"}):t._e(),n("Draw",{attrs:{"show-paint":t.showPaint}})],1)])},se=[],re=(n("4917"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return"fashilong"==t.orgin||t.hideToolBar?t._e():n("div",{staticClass:"navigation",style:{zIndex:t.showEnvTips?99999:99}},[n("div",{staticClass:"btn-switch",on:{click:t.onShowMore}},[n("i",{staticClass:"iconfont",class:[t.showMore?"icon_back":"iconmore"]})]),n("div",{staticClass:"btn-handle",class:{hide:!t.showMore}},[n("div",[n("ul",[n("li",{directives:[{name:"show",rawName:"v-show",value:t.plays.length,expression:"plays.length"}],on:{click:t.onPlayGuide}},[n("i",{staticClass:"iconfont",class:[this.status.isPlaying?"iconscene_stop":"iconscene_auto"]}),n("span",[t._v("自动导购")])]),n("li",{on:{click:t.onService}},[n("i",{staticClass:"iconfont iconscene_call1"}),n("span",[t._v("客服")])]),t.showCoupon?n("li",{on:{click:t.onCoupon}},[n("i",{staticClass:"iconfont iconscene_coupon"}),n("span",[t._v("优惠券")])]):t._e(),n("li",{on:{click:t.onShopping}},[n("i",{staticClass:"iconfont iconscene_vrlecture"}),n("span",[t._v("一起逛")])])])])]),n("x-window",{attrs:{show:t.showEnvTips,"show-close":!0},on:{close:function(e){t.showEnvTips=!1}}},[n("img",{attrs:{src:""+t.$config.getStaticResource("img/apps/vrhouse/logo.png"),alt:""}}),n("div",{staticClass:"env-tips"},[n("h4",[t._v("一起逛-同屏购物 实时沟通")]),n("div",{staticClass:"left"},[n("p",[t._v("微信识别下方二维码")]),n("p",[t._v("进入【看店4DKanKan】小程序")]),n("p",[t._v("享更多增值服务")])]),n("img",{staticClass:"qrcode",attrs:{src:t.$config.getStaticResource("img/apps/shop/qrcode.jpg"),alt:""}}),n("div",{staticClass:"txt"},[t._v("四维时代(示例)")])])])],1)}),ce=[],le=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("popup",{attrs:{show:t.show,"is-close":t.showClose},on:{close:function(e){return t.$emit("close")}}},[n("div",{staticClass:"share-x-window",style:{height:t.height},on:{touchstart:function(t){t.stopPropagation()}}},[t.showClose?n("div",{staticClass:"header"},[n("span",{staticClass:"close",on:{click:function(e){return e.stopPropagation(),t.$emit("close")},touchstart:function(e){return e.stopPropagation(),t.$emit("close")}}})]):t._e(),n("div",{staticClass:"main"},[t._t("default")],2),n("div",{staticClass:"footer"},[t._t("footer")],2)])])},ue=[],pe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{appear:"",name:"custom-classes-transition","enter-active-class":"animated fadeIn faster","leave-active-class":"animated fadeOut faster"}},[t.show?n("div",{staticClass:"x-popup-layer",style:{"z-index":t.zIndex,"background-color":t.bgColor},on:{touchmove:function(t){t.preventDefault()},touchstart:t.onClick}},[t._t("default")],2):t._e()])},de=[],he=999;function fe(){return++he}var me={name:"x-popup-layer",props:{show:Boolean,isClose:Boolean,bgColor:String},data:function(){return{zIndex:fe()}},methods:{onClick:function(){this.isClose&&this.$emit("close")}}},ve=me,we=(n("af73"),Object(h["a"])(ve,pe,de,!1,null,"0e4b0b30",null)),ye=we.exports,ge={components:{Popup:ye},props:{show:Boolean,height:String,showClose:{type:Boolean,default:function(){return!0}}}},be=ge,_e=(n("cdc5"),Object(h["a"])(be,le,ue,!1,null,"59a6c445",null)),Pe=_e.exports,Ce=n("ff11");function Ee(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function Oe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ee(Object(n),!0).forEach((function(e){Object(i["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var xe={components:{XWindow:Pe},data:function(){return{orgin:Ot["a"].urlQueryValue("origin").toLowerCase(),showMore:!0,hideToolBar:Ot["a"].urlHasValue("hideToolBar"),showCoupon:!1,showEnvTips:!1}},watch:{plays:{handler:function(t,e){Lt("guide",{length:this.plays.length})},immediate:!0},"status.isPlaying":function(){Lt("guide",{playing:this.status.isPlaying})},showEnvTips:function(){this.showEnvTips&&this.$bus.emit("shop/header/hidemap")}},computed:Oe({},Object(s["b"])({plays:"guide/plays",status:"guide/status",medias:"guide/medias"})),created:function(){var t=this;u["play"].on("guide/play/start",(function(e){t.$store.commit("guide/SetStatus",{isPlaying:!0})})),u["play"].on("guide/play/pause",(function(e){t.$store.commit("guide/SetStatus",{isPlaying:!1})})),u["play"].on("guide/play/stop",(function(){t.$store.commit("guide/SetStatus",{isPlaying:!1})})),u["play"].on("guide/play/playing",(function(e){t.$store.commit("guide/SetIndex",e)})),u["play"].on("guide/play/flyToStart",(function(e){t.$store.commit("guide/SetIndex",e)})),this.$bus.on("shop/app/action",(function(e){"showCoupon"==e.type?t.showCoupon=e.data:"guide"==e.type&&(t.status.isPlaying?u["play"].pause():u["play"].start())}))},mounted:function(){var t=this;this.$bus.on("ready",(function(){if(t.plays.length){var e="soundsync"===t.status.audio?"sync":t.status.audio;t.medias.links[e]&&Ce["c"].setSRC(t.$config.getPublishResource(t.medias.links[e]))}})),this.$nextTick((function(){$("#player").on("touchstart",(function(){t.status.isPlaying&&u["play"].pause()}))})),"discover"!=this.$config.appenv&&Lt("cart",!0),Lt("ready",this.$config.projectNum)},methods:{onShowMore:function(){this.showMore=!this.showMore},onPlayGuide:function(){this.status.isPlaying?u["play"].pause():u["play"].start()},onService:function(){var t=this;if(!Ot["a"].urlHasValue("test"))if(Ot["a"].detectWeixin())top.wx.miniProgram.getEnv((function(e){if(!e.miniprogram)return t.showEnvTips=!0}));else if(!Ot["a"].detectApp())return this.showEnvTips=!0;Lt("service")},onCoupon:function(){Lt("coupon")},onShopping:function(){var t=this;if(!Ot["a"].urlHasValue("test"))if(Ot["a"].detectWeixin())top.wx.miniProgram.getEnv((function(e){if(!e.miniprogram)return t.showEnvTips=!0}));else if(!Ot["a"].detectApp())return this.showEnvTips=!0;if("NO_LOGIN"==jt)return Lt("login");this.$parent.setPage("Shopping")}}},Se=xe,ke=(n("d4fb"),Object(h["a"])(Se,re,ce,!1,null,"2dfa066e",null)),Te=ke.exports,je=function(){var t=this,e=t.$createElement,n=t._self._c||e;return"fashilong"!=t.orgin?n("div",{staticClass:"navigation"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.users.length,expression:"users.length"}],staticClass:"wrapper sync"},[n("div",[n("ul",[t._l(t.users,(function(e,o){return n("li",{key:o,class:[e.role],on:{click:function(n){e.userId==t.userId&&t.onSetMic()}}},[n("img",{attrs:{src:e.avatar||t.$config.getStaticResource("img/apps/vrhouse/avatar_default.jpg"),alt:""}}),n("span",{directives:[{name:"show",rawName:"v-show",value:e.onlineStatus&&1!=e.voiceStatus,expression:"user.onlineStatus && user.voiceStatus != 1"}],staticClass:"voice"},[n("i",{staticClass:"iconfont",class:[2==e.voiceStatus?"iconscene_mic_open":"iconscene_mic_off"]})]),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.onlineStatus,expression:"!user.onlineStatus"}],staticClass:"status"},[n("span",[t._v(" 已离开 ")])]),e.onlineStatus?[e.userId==t.userId?n("div",[t._v("我")]):"leader"==e.role?n("div",[t._v("发起人")]):t._e()]:t._e()],2)})),t.users.length<5?n("li",{staticClass:"add",on:{click:t.onInvite}},[n("i",{staticClass:"iconfont icon_plus"})]):t._e()],2)]),n("button",{on:{click:function(e){t.showExit=!0}}},[t._v("退出")])]),n("div",{ref:"chat",staticClass:"chat"},[n("transition-group",{attrs:{appear:"",tag:"ul"}},t._l(t.message,(function(e){return n("li",{key:e.id},[n("div",[n("div",{staticClass:"message"},[n("img",{attrs:{src:e.avatar||t.$config.getStaticResource("img/apps/vrhouse/avatar_default.jpg"),alt:""}}),e.nickname?n("span",{domProps:{innerHTML:t._s("「"+e.nickname+"」")}}):t._e(),n("span",[t._v(t._s(e.content))])])])])})),0)],1),n("x-window",{attrs:{show:t.showExit,"show-close":!1}},[n("div",{staticClass:"exit-tips"},[n("h4",[t._v("温馨提示")]),n("div",[t._v("确定要结束“一起逛”吗?")]),n("button",{attrs:{type:"button"},on:{click:function(e){return t.onExit(!1)}}},[t._v("继续逛")]),n("button",{attrs:{type:"submit"},on:{click:function(e){return t.onExit(!0,!0)}}},[t._v("结束")])])]),n("x-window",{attrs:{show:t.showDissolve,"show-close":!1}},[n("div",{staticClass:"exit-tips"},[n("h4",[t._v("结束提醒")]),n("div",[t._v("\n 发起人已结束一起逛模式,房间即\n "),n("br"),t._v("将关闭\n ")]),n("button",{attrs:{type:"button"},on:{click:function(e){return t.onExit(!0,!0)}}},[t._v("确定")])])]),n("x-window",{attrs:{show:t.showFull,"show-close":!1}},[n("div",{staticClass:"exit-tips"},[n("h4",[t._v("温馨提示")]),n("div",[t._v("一起逛房间已满人,是否继续逛")]),n("button",{attrs:{type:"button"},on:{click:function(e){return t.onExit(!0,!0)}}},[t._v("\n 继续逛\n ")]),n("button",{attrs:{type:"submit"},on:{click:function(e){return t.onBack()}}},[t._v("取消")])])]),n("x-window",{attrs:{show:t.showOver,"show-close":!1}},[n("div",{staticClass:"exit-tips"},[n("h4",[t._v("温馨提示")]),n("div",[t._v("一起逛已结束了,是否继续逛")]),n("button",{attrs:{type:"button"},on:{click:function(e){return t.onExit(!0,!0)}}},[t._v("\n 继续逛\n ")]),n("button",{attrs:{type:"submit"},on:{click:function(e){return t.onBack()}}},[t._v("取消")])])]),n("Paint",{attrs:{"show-paint":t.showPaint}})],1):t._e()},Ie=[],Ae=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.showPaint&&"leader"==t.role,expression:"showPaint && role == 'leader'"}],staticClass:"paint"},[n("div",{staticClass:"toolbar"},[n("ul",[n("li",{directives:[{name:"show",rawName:"v-show",value:0==t.show,expression:"show == false"}],on:{click:t.start}},[n("i",{staticClass:"iconfont iconkd_tagging"}),n("div",[t._v("标记")])]),t.show?n("li",{on:{click:t.end}},[n("i",{staticClass:"iconfont iconclose"}),n("div",[t._v("关闭")])]):t._e()])])])},$e=[],De=(n("673e"),n("3846"),n("f121")),Ue=n("9ef6"),Me=n("bc19"),Re=n("4c16"),Ve=n("1787"),qe=n("2d47"),Ne=n("b235"),He=n("1158"),Le=null,ze=[],Be=Ve["default"].load(De["a"].getStaticResource("img/scene_tabele.png?v=1"),null,null,{antialias:!1}),Qe={props:{showPaint:Boolean},data:function(){return{role:At(),show:!1,flags:[],canUndo:!1,colorA:"#02c8ae",colorB:"#2e98fe"}},created:function(){var t=this,e=this;function n(){setTimeout((function(){e.flags.shift(),e.flags.length&&n(),e.updateCirclesDrawing(e.flags)}),1e3)}function o(t){"flags"==t.type&&(e.flags.push(t.data),e.updateCirclesDrawing(e.flags),n())}null==Le&&(Le=new THREE.Object3D,Le.name="shop-circles",u["app"].ready?u["app"].model.add(Le):this.$bus.on("ready",(function(){u["app"].model.add(Le)}))),this.$bus.on("shop/sync/action",o),this.$once("hook:beforeDestroy",(function(){t.$bus.off("shop/sync/action",o),t.show=!1,t.flags=[],t.updateCirclesDrawing(t.flags)}))},watch:{show:function(){var t=this;Lt("cart",!this.show),this.$bus.emit("shop/header/disable",this.show),setTimeout((function(){u["app"].play.control.noFly=t.show}),300)}},mounted:function(){var t=this;function e(e){if(t.show){var n=(e.touches[0]||e).clientX,o=(e.touches[0]||e).clientY,a={sid:Date.now(),pos:t.transformTo3d({x:n,y:o}),color:t.colorA};t.flags.push(a),t.updateCirclesDrawing(t.flags),setTimeout((function(){t.flags.shift(),t.updateCirclesDrawing(t.flags)}),1e3),Ht({type:"flags",data:a})}}var n=document.getElementById("player");n.addEventListener("mousedown",e),n.addEventListener("touchstart",e),this.role=At()},methods:{start:function(){this.show=!0},undo:function(){this.flags.pop(),this.updateCirclesDrawing(this.flags)},end:function(){this.show=!1,this.flags=[],this.updateCirclesDrawing(this.flags)},updateCirclesDrawing:function(t){var e=this,n=[];ze.forEach((function(e){var o=t.find((function(t){return e.sid==t.sid}));o||n.push(e)})),n.forEach((function(t){return e.fadeCircle(t)})),t.forEach((function(t){var n=Le.children.find((function(e){return e.sid==t.sid}));n||e.createCircle(t.sid,t.pos,t.color)}))},transformTo3d:function(t){var e=new THREE.Vector3,n=new THREE.Vector2;Me["a"].convertScreenPositionToNDC(t.x,t.y,n);var o=Re["a"].getMouseIntersect(P["objects"].player.camera,[P["objects"].model.skybox],n);if(o){e.copy(o.point);var a=e.clone().sub(P["objects"].player.position).normalize();e.copy(P["objects"].player.position.clone().add(a))}else console.error("no intersect ??");return e},createCircle:function(t,e,n){var o=new THREE.Sprite(this.getMat(n));o.sid=t,o.position.copy(e),o.quaternion.copy(P["objects"].player.camera.quaternion),o.scale.set(.05,.05,.05),Le.add(o),ze.push(o)},fadeCircle:function(t){var e=this,n=800;Ne["a"].start(qe["a"].property(t.material,"opacity",0),n,(function(){e.removeCircle(t)}),0,He["a"][Ue["a"].transition.blendEasing],"shop-circles-fade",Ue["a"].freeze.shopCircle);var o=ze.indexOf(t);ze.splice(o,1)},removeCircle:function(t){t.material.dispose(),t.parent.remove(t)},getMat:function(t){return new THREE.SpriteMaterial({transparent:!0,depthTest:!1,map:Be,side:THREE.DoubleSide,color:t})}}},Fe=Qe,Ge=(n("aa61"),Object(h["a"])(Fe,Ae,$e,!1,null,"c54adea4",null)),We=Ge.exports;function Je(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function Ke(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Je(Object(n),!0).forEach((function(e){Object(i["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Xe={components:{Paint:We,XWindow:Pe},data:function(){return{role:null,userId:null,users:[],showExit:!1,showDissolve:!1,showOver:!1,showFull:!1,showCart:!1,showPaint:!1,goods:null,chats:[],orgin:Ot["a"].urlQueryValue("origin").toLowerCase()}},watch:{users:function(){this.showCart||(this.showCart=!0,Lt("cart",!0))},message:function(){this.$nextTick((function(){setTimeout((function(){}),3e3)}))}},computed:Ke(Ke({},Object(s["b"])({player:"player"})),{},{message:function(){return this.chats}}),created:function(){var t=this;"4dplaza"==Ot["a"].urlQueryValue("origin").toLowerCase()&&(this.showPaint=!0),this.role=At(),this.userId=$t();var e=this;function n(t){if("full"!=t.type)if("users"==t.type){for(var n,o=0;o<t.data.length;o++)if("leader"==t.data[o].role){n=t.data.splice(o,1);break}if(n&&(t.data=n.concat(t.data)),!t.data.some((function(t){return"leader"==t.role})))return void(e.isNoTips()&&(e.showOver=!0));e.users=t.data}else if("userChange"==t.type){for(var a,i=0;i<t.data.length;i++)if("leader"==t.data[i].role){a=t.data.splice(i,1);break}a&&(t.data=a.concat(t.data)),e.users=t.data,"leader"==e.role&&"leader"!=t.user.role?e.showMessage("".concat(t.isOnline?"进入":"离开","房间"),t.user):"leader"!=e.role&&"leader"==t.user.role&&(t.user.nickname="发起人",e.showMessage("".concat(t.isOnline?"进入":"离开","房间"),t.user))}else"online"==t.type?"leader"==e.role&&"leader"!=t.user.role&&e.showMessage("".concat(t.isOnline?"进入":"退出","房间"),t.user):"dissolve"==t.type?e.isNoTips()&&(e.showDissolve=!0):"close"==t.type?e.isNoTips()&&(e.showOver=!0):"tagShow"==t.type?e.$bus.emit("shop/tag/show",t.data):"tagSwitch"==t.type?e.$bus.emit("shop/tag/switch",t.data):"tagBigimg"==t.type&&e.$bus.emit("shop/tag/bigimg",t.data);else e.isNoTips()&&(e.showFull=!0)}this.$once("hook:beforeDestroy",(function(){t.$bus.off("shop/sync/action",n),t.role})),this.$bus.on("shop/sync/action",n),"leader"==this.role&&"fashilong"!=this.orgin&&Lt("invite"),Ot["a"].urlHasValue("shopping")&&-1!=this.player.progres?this.$bus.on("loaded",(function(){Jt(),Lt("ready",t.$config.projectNum)})):(Jt(),Lt("ready",this.$config.projectNum)),window.CHECKEXIT=function(){e.showExit=!0}},destroyed:function(){window.CHECKEXIT=null},methods:{onInvite:function(){Lt("invite")},onSetMic:function(){Lt("mic")},onExit:function(t,e){var n=this;this.showExit=!1,this.showDissolve=!1,this.showFull=!1,this.showOver=!1,t&&(this.goods?this.goods.realShopUrl?(Lt("cart",!1),window.location.href=this.goods.realShopUrl):window.parent.wx.miniProgram.navigateTo({url:"/pages/goods/goods?id="+this.goods.id}):e?(Lt("newRoom"),setTimeout((function(){n.$parent.setPage("Home")}),300)):(Kt(),Lt("exit"))),this.goods=null},onBack:function(){this.showExit=!1,this.showDissolve=!1,this.showFull=!1,this.showOver=!1,Kt(),Lt("back")},isNoTips:function(){return!this.showExit&&!this.showFull&&!this.showDissolve&&!this.showOver},exitToDetail:function(t){this.goods=t,this.showExit=!0},showMessage:function(t,e){var n=this;this.chats.push({id:"".concat(Date.now()).concat(this.chats.length),avatar:e.avatar,nickname:e.nickname,content:t}),setTimeout((function(){n.chats.shift()}),1500)}}},Ye=Xe,Ze=(n("0aa5"),Object(h["a"])(Ye,je,Ie,!1,null,"dc9dcb3c",null)),tn=Ze.exports,en=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"paint"},[n("canvas",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],ref:"canvas"}),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showPaint&&"leader"==t.role,expression:"showPaint && role == 'leader'"}],staticClass:"toolbar"},[n("ul",[n("li",{directives:[{name:"show",rawName:"v-show",value:0==t.show,expression:"show == false"}],on:{click:function(e){return t.onDraw("drawStart")}}},[n("i",{staticClass:"iconfont icontagging"}),n("div",[t._v("画笔")])]),t.show?n("li",{class:{disable:!t.canUndo},on:{click:function(e){return t.onDraw("drawUndo")}}},[n("i",{staticClass:"iconfont icon_cancel"}),n("div",[t._v("撤回")])]):t._e(),t.show?n("li",{on:{click:function(e){return t.onDraw("drawStop")}}},[n("i",{staticClass:"iconfont iconclose"}),n("div",[t._v("关闭")])]):t._e()])])])},nn=[],on={props:{showPaint:Boolean},data:function(){return{role:At(),show:!1,canUndo:!1,colorA:"#02c8ae",colorB:"#2e98fe"}},watch:{showPaint:function(){this.showPaint&&(this.role=At())},show:function(){Lt("cart",!this.show),this.$bus.emit("shop/header/disable",this.show)}},created:function(){var t=this;this.$bus.on("shop/sync/action",(function(e){if("drawStart"==e.type)t.show=!0,t.draw=[],t.drawHistory=[],t.$nextTick((function(){t.onDrawStart()}));else if("drawStop"==e.type)t.show=!1,t.draw=null,t.drawHistory=null;else if("drawing"==e.type){var n=t.transformTo2d(e.data.drawing);e.data.role!=t.role&&(t.drawHistory.push(JSON.parse(JSON.stringify(n))),t.drawing(n))}else"drawUndo"==e.type&&t.drawUndo(e.data.role)}))},mounted:function(){var t,e=this;this.canvas=this.$refs.canvas,this.context=this.canvas.getContext("2d"),this.canvas.onmousedown=function(t){e.show&&(t.preventDefault(),e.beginStroke({x:t.clientX,y:t.clientY}))},this.canvas.onmouseup=function(t){e.show&&(t.preventDefault(),e.endStroke())},this.canvas.onmouseout=function(t){e.show&&(t.preventDefault(),e.endStroke())},this.canvas.onmousemove=function(t){e.show&&(t.preventDefault(),e._mouseDown&&e.moveStroke({x:t.clientX,y:t.clientY}))},this.canvas.addEventListener("touchstart",(function(n){e.show&&"leader"==e.role&&(n.preventDefault(),t=n.touches[0],e.beginStroke({x:t.pageX,y:t.pageY}))})),this.canvas.addEventListener("touchmove",(function(n){e.show&&"leader"==e.role&&(n.preventDefault(),e._mouseDown&&(t=n.touches[0],e.moveStroke({x:t.pageX,y:t.pageY})))})),this.canvas.addEventListener("touchend",(function(t){e.show&&"leader"==e.role&&(t.preventDefault(),e.endStroke())})),this.mouse=new THREE.Vector2},methods:{transformTo3d:function(t){var e=this,n=[];return 0==t.length?[]:(t.forEach((function(t,o){Me["a"].convertScreenPositionToNDC(t.x,t.y,e.mouse);var a=Re["a"].getMouseIntersect(P["objects"].player.camera,[e.intersectPlane],e.mouse);a?(t.pos3d=a.point,n.push(t)):console.error("no intersect ??")})),n)},transformTo2d:function(t){var e=[];return t.forEach((function(t){var n=new THREE.Vector3(t.pos3d.x,t.pos3d.y,t.pos3d.z),o=Re["a"].getPos2d(n,P["objects"].player.camera);t.x=o.pos.x,t.y=o.pos.y,e.push(t)})),e},onDraw:function(t){var e=this;if("drawStart"==t)this.show=!0,this.draw=[],this.drawHistory=[],this.$nextTick((function(){e.onDrawStart()}));else if("drawStop"==t)this.show=!1,this.draw=null,this.drawHistory=null;else if("drawing"==t){var n=this.transformTo2d(data.content.drawing);data.role!=role&&this.drawHistory.push(JSON.parse(JSON.stringify(n)))}else"drawUndo"==t&&this.drawUndo(this.role);Ht({type:t,data:{role:this.role}})},onPainting:function(){var t=this.transformTo3d(this.draw);this.drawHistory.push(JSON.parse(JSON.stringify(t))),Ht({type:"drawing",data:{drawing:t}}),this.draw=[],this.canUndo=!0,this._endTime=0,this._mouseDown=!1,this._lastTimestamp=0},beginStroke:function(t){this._mouseDown=!0,this._lastTimestamp=Date.now(),this._lastPosition=this.windowToCanvas(t.x,t.y),this.draw.push({role:this.role,width:0,x:this._lastPosition.x,y:this._lastPosition.y,t:5})},onDrawStart:function(){var t=window.devicePixelRatio||1,e=this.canvas.getBoundingClientRect();this.ratio=1,this.canvas.width=e.width*t,this.canvas.height=e.height*t,this.context.scale(t,t),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this._endTime=0,this._mouseDown=!1,this._lastTimestamp=0,this._lastLineWidth=-1,this._lastPosition={x:0,y:0},Me["a"].convertScreenPositionToNDC(0,0,this.mouse);var n=Re["a"].getMouseIntersect(P["objects"].player.camera,[P["objects"].model.skybox,P["objects"].sceneRenderer.scene.skyboxBG],this.mouse);this.placeIntersectPlane(n&&n.point)},moveStroke:function(t){var e=Date.now(),n=this.windowToCanvas(t.x,t.y),o=this.calcDistance(n,this._lastPosition),a=e-this._lastTimestamp,i=this.calcLineWidth(a,o);this.context.beginPath(),this.context.moveTo(this._lastPosition.x,this._lastPosition.y),this.context.lineTo(n.x,n.y),this.draw.push({role:this.role,width:i,x:n.x,y:n.y,t:5}),this.context.strokeStyle=this.colorA,this.context.lineWidth=i,this.context.lineCap="round",this.context.linJoin="round",this.context.stroke(),this._lastPosition=n,this._lastTimestamp=e,this._lastLineWidth=i},endStroke:function(){this.draw.push({role:this.role,width:0,x:this._lastPosition.x,y:this._lastPosition.y,t:0}),this.onPainting(),this._mouseDown=!1,this._endTime=Date.now()},calcLineWidth:function(t,e){var n,o=e/t;return n=o<=.1?6:o>=3?2:6-(o-.1)/2.9*2,-1==this._lastLineWidth?n:2*this._lastLineWidth/3+1*n/3},calcDistance:function(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))},windowToCanvas:function(t,e){var n=this.canvas.getBoundingClientRect();return{x:Math.round(t-n.left),y:Math.round(e-n.top)}},drawing:function(t){for(var e=this,n=function(n){t[n].t&&setTimeout((function(){e.context.beginPath(),e.context.strokeStyle=t[n].role==e.role?e.colorA:e.colorB,e.context.moveTo(t[n].x*e.ratio,t[n].y*e.ratio),e.context.lineTo(t[n+1].x*e.ratio,t[n+1].y*e.ratio),e.context.lineWidth=t[n].width*e.ratio,e.context.lineCap="round",e.context.linJoin="round",e.context.stroke()}),5)},o=0;o<t.length-1;o++)n(o)},drawUndo:function(t){var e=this;this.context.clearRect(0,0,this.canvas.width,this.canvas.height);for(var n=this.drawHistory.length-1;n>=0;n--)if(this.drawHistory[n][0].role==t){this.drawHistory.splice(n,1);break}this.drawHistory.forEach((function(t){for(var n=0;n<t.length-1;n++)t[n].t&&(e.context.beginPath(),e.context.strokeStyle=t[n].role==e.role?e.colorA:e.colorB,e.context.moveTo(t[n].x*e.ratio,t[n].y*e.ratio),e.context.lineTo(t[n+1].x*e.ratio,t[n+1].y*e.ratio),e.context.lineWidth=t[n].width*e.ratio,e.context.lineCap="round",e.context.linJoin="round",e.context.stroke())})),this.canUndo=this.drawHistory.some((function(t){return t[0].role==e.role}))},placeIntersectPlane:function(t){if(!this.intersectPlane){var e=new THREE.PlaneGeometry(8e3,8e4,1,1);this.intersectPlane=new THREE.Mesh(e,new THREE.MeshBasicMaterial({transparent:!0,wireframe:!1,opacity:0,side:THREE.DoubleSide,depthTest:!1})),this.intersectPlane.lookAt(new THREE.Vector3(0,1,0)),this.intersectPlane.name="intersectPlane",P["objects"].model.add(this.intersectPlane)}if(t){this.intersectPlane.position.copy(t);var n=P["objects"].player.getDirection(null,P["objects"].player.camera);this.intersectPlane.lookAt(t.clone().add(n))}}}},an=on,sn=(n("4431"),Object(h["a"])(an,en,nn,!1,null,"19a28197",null)),rn=sn.exports,cn={components:{Home:Te,Shopping:tn,Draw:rn},data:function(){return{page:Ot["a"].urlHasValue("shopping")?"Shopping":"Home",show:!0,showPaint:!1}},created:function(){var t=this;Ot["a"].detectWeixin()&&top.wx.miniProgram.getEnv((function(e){e.miniprogram||(t.show=!1)}));var e=!1;this.$bus.on("shop/tag/goods/detail",(function(t){if(!e)if(e=!0,setTimeout((function(){e=!1}),1e3),t.realShopUrl){var n=t.realShopUrl.match(/\/([0-9]+)\.html/);null!=n&&n[1]&&Lt("navigateToMiniProgram",{appId:"wx1edf489cb248852c",path:"pages/product/product?wareId="+n[1]})}else"leader"==At()?zt("navigateToGoods",t.id):Lt("navigateToGoods",t.id)})),this.$bus.on("shop/tag/onshow",(function(e){Lt("cart",!e),"leader"==At()&&Ht({type:"tagShow",data:e}),t.$bus.emit("shop/header/disable",e)})),this.$bus.on("shop/tag/onswitch",(function(t){"leader"==At()&&Ht({type:"tagSwitch",data:t})})),this.$bus.on("shop/tag/onbigimg",(function(t){"leader"==At()&&Ht({type:"tagBigimg",data:t})})),"fashilong"==Ot["a"].urlQueryValue("origin").toLowerCase()&&(this.$bus.on("shop/app/action",(function(e){"sync"==e.type?t.showPaint=!0:"back"!=e.type&&"newRoom"!=e.type||(t.showPaint=!1)})),Ot["a"].urlHasValue("shopping")&&"leader"==At()&&(this.showPaint=!0))},methods:{setPage:function(t){this.page=t}}},ln=cn,un=(n("636c"),Object(h["a"])(ln,ie,se,!1,null,null,null)),pn=un.exports,dn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("popup",{attrs:{show:t.show,"is-close":!1}},[n("div",{staticClass:"password"},[n("h1",[t._v("温馨提示")]),n("h4",[t._v("场景已设置密码,请先输入密码")]),n("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],attrs:{type:"password",placeholder:"请输入密码"},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}}),n("div",[t._v(t._s(t.tips))]),n("button",{attrs:{type:"submit"},on:{click:t.check}},[t._v("进入")]),n("button",{attrs:{type:"button"},on:{click:function(e){return t.$emit("cancel")}}},[t._v("取消")])])])},hn=[],fn=n("fafa");function mn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function vn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?mn(Object(n),!0).forEach((function(e){Object(i["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var wn={components:{Popup:ye},data:function(){return{tips:"",password:"",isValid:!1}},computed:vn(vn({},Object(s["b"])({metadata:"scene/metadata"})),{},{show:function(){return 1==this.metadata.needKey&&!this.isValid}}),created:function(){fn["b"].register((function(t){return new Promise((function(e){return t.resolve(e)}))}))},methods:{check:function(){var t=this;this.tips="",this.$nextTick((function(){if(!t.password)return t.tips=t.$t("show.password_require");t.$api.checkPassword(t.password).done((function(e){0==e.code?(t.isValid=!0,fn["b"].valid()):t.tips=t.$t("tips.password_error")}))}))}}},yn=wn,gn=(n("b504"),Object(h["a"])(yn,dn,hn,!1,null,"a95ec6be",null)),bn=gn.exports,_n=n("3b09");function Pn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function Cn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Pn(Object(n),!0).forEach((function(e){Object(i["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var En={components:{Player:m,AppHeader:ae,AppMain:pn,Password:bn,Floor:_n["a"]},data:function(){return{show:!1,isGuide:!1,showGoods:!1,showPassword:!1}},created:function(){var t=this;"fashilong"==Ot["a"].urlQueryValue("origin")&&(this.showPassword=!0),"discover"==this.$config.appenv||localStorage.getItem("user_guide")?this.isGuide=!0:this.$bus.on("player/user/guided",(function(){return t.show=!0})),this.$bus.on("shop/app/action",(function(t){"openTag"==t.type&&__api.tag.openById(t.data)})),this.$bus.on("shop/tag/onshow",(function(e){t.showGoods=e})),window.addEventListener("message",(function(e){e.data.cmd&&("scene"==e.data.cmd?Lt("scene",{cmd:e.data.data,num:t.$config.projectNum}):"showTabs"==e.data.cmd&&Lt(e.data.cmd,e.data.data))}))},watch:{"player.progres":function(){-1==this.player.progres&&(document.title=this.tempdata.title,this.isGuide&&!this.show&&(this.show=!0))}},computed:Cn({},Object(s["b"])({player:"player",tempdata:"scene/tempdata"})),mounted:function(){Gt()},methods:{onPasswordCancel:function(){this.showPassword=!1,Lt("back")}}},On=En,xn=(n("cb0c"),n("a254"),n("4714"),Object(h["a"])(On,o,a,!1,null,"920c4b36",null));e["default"]=xn.exports},dd00:function(t,e,n){},e7a2:function(t,e,n){},fbbf:function(t,e,n){},fc23:function(t,e,n){}}]);