(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-713c4fb3"],{6337:function(e,t,a){"use strict";var s=function(){var e=this,t=e._self._c;return e.show?t("VanDialog",{staticClass:"dialog-service",attrs:{value:e.show,"show-confirm-button":!1},scopedSlots:e._u([{key:"default",fn:function(){return[t("div",{staticClass:"relative dialog-service-height"},[t("iframe",{staticStyle:{border:"none"},attrs:{src:e.servicesUrl,width:"100%",height:"100%"}})]),t("div",{staticClass:"absolute top-0 left-0 w-14 h-14",on:{click:e.closeDialog}})]},proxy:!0}],null,!1,466908637)}):e._e()},i=[],o={name:"DialogService",props:{show:{type:Boolean,default:!1},servicesUrl:{type:String,require:!0}},methods:{closeDialog(){this.$emit("close")}}},r=o,n=(a("8208"),a("2877")),c=Object(n["a"])(r,s,i,!1,null,"6b71ba02",null);t["a"]=c.exports},6373:function(e,t,a){var s=a("76dd");function i(){var e=arguments,t=s(e[0]);return e.length<3?t:t.replace(e[1],e[2])}e.exports=i},8208:function(e,t,a){"use strict";a("a225")},"97a3":function(e,t,a){},a225:function(e,t,a){},a8dc:function(e,t,a){"use strict";a("97a3")},f652:function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"shopping_mall_view",class:[e.setHeightView]},[e.isShoopLoading?t("van-loading",{attrs:{type:"spinner",color:"#24c08e",size:"40"}}):t("iframe",{attrs:{frameborder:"0",height:"100%",width:"100%",scrolling:"auto",src:e.shoopPath}}),t("DialogService",{attrs:{"services-url":e.servicesUrl,show:e.dialogShow},on:{close:function(t){e.dialogShow=!1}}}),t("van-popup",{staticClass:"h-screen bg-transparent",attrs:{position:"bottom"},model:{value:e.rechargeShow,callback:function(t){e.rechargeShow=t},expression:"rechargeShow"}},[e.payUrl?t("iframe",{staticClass:"bottom-position",attrs:{src:e.payUrl,frameborder:"0"}}):e._e()])],1)},i=[],o=(a("14d9"),a("7bee")),r=a("6337"),n=a("04e3"),c=a("2f62"),h=a("6373"),l=a.n(h),d={name:"ShoppingMallIndex",components:{DialogService:r["a"]},data(){return{isShoopLoading:!1,shoopPath:"",servicesUrl:"",dialogShow:!1,rechargeShow:!1,payUrl:"",standalone:navigator.standalone||window.matchMedia("(display-mode: standalone)").matches}},computed:{...Object(c["e"])("user",["nickname","vip_type","schedule","is_vip","coins"]),setHeightView(){return this.standalone?"pwaHeight":""}},mounted(){this.getShoopMallLink(),this.customerServicesUrl(),window.addEventListener("message",this.openPage),window.addEventListener("message",this.payPage)},beforeDestroy(){window.removeEventListener("message",this.openPage),window.removeEventListener("message",this.payPage)},methods:{...Object(c["d"])("popup",["OPEN_POPUP"]),async getShoopMallLink(){this.isShoopLoading=!0;const{data:{data:{url:e}}}=await Object(o["a"])({ad_id:285});this.isShoopLoading=!1;const t=l()(e,"http://","https://");this.shoopPath=t},async customerServicesUrl(){const{data:e}=await Object(n["b"])();200===e.code&&(this.servicesUrl=e.data.value)},openPage(e){const{to:t,code:a,payUrl:s}=JSON.parse(e.data);if(200==a)switch(t){case"service-page":this.dialogShow=!0;break;case"recharge":if(!s)return void this.$toast({message:"支付链接错误",duration:3e3});this.schedule?(this.payUrl=s+"&isRn=2",this.rechargeShow=!0):(this.$toast({message:"请登录后支付",duration:3e3}),this.$router.replace({name:"Mine"}),setTimeout(()=>{this.OPEN_POPUP("Login")},3e3));break;case"home-page":this.$router.push({name:"Index"});break;default:break}},payPage(e){const{type:t}=JSON.parse(e.data);"depositFinish"==t&&(this.payUrl="",this.rechargeShow=!1)}}},p=d,u=(a("a8dc"),a("2877")),g=Object(u["a"])(p,s,i,!1,null,"60d37160",null);t["default"]=g.exports}}]);