app-layout.js 6.6 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/basic-component/app-layout/app-layout"],{"130e":function(t,e,n){"use strict";var o=n("f1bc"),r=n.n(o);r.a},"3dd6":function(t,e,n){"use strict";n.r(e);var o=n("7b0b"),r=n("8553");for(var a in r)"default"!==a&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("130e");var c,i=n("f0c5"),u=Object(i["a"])(r["default"],o["b"],o["c"],!1,null,"717ef5e0",null,!1,o["a"],c);e["default"]=u.exports},"7b0b":function(t,e,n){"use strict";var o,r=function(){var t=this,e=t.$createElement;t._self._c},a=[];n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}))},8553:function(t,e,n){"use strict";n.r(e);var o=n("ff0e"),r=n.n(o);for(var a in o)"default"!==a&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=r.a},f1bc:function(t,e,n){},ff0e:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("2f62"),r=a(n("1837"));function a(t){return t&&t.__esModule?t:{default:t}}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 i(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){u(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}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var p=function(){n.e("components/basic-component/app-tab-bar/app-tab-bar").then(function(){return resolve(n("c1d3"))}.bind(null,n)).catch(n.oe)},s=function(){n.e("components/basic-component/app-layout/app-payment/app-payment").then(function(){return resolve(n("4dec"))}.bind(null,n)).catch(n.oe)},l=function(){n.e("components/basic-component/app-layout/app-user-login/app-user-login").then(function(){return resolve(n("008e"))}.bind(null,n)).catch(n.oe)},f=function(){n.e("components/basic-component/app-loading/app-loading").then(function(){return resolve(n("94f9"))}.bind(null,n)).catch(n.oe)},b=function(){n.e("components/basic-component/app-report-error/app-report-error").then(function(){return resolve(n("7e094"))}.bind(null,n)).catch(n.oe)},d=function(){n.e("components/basic-component/app-prompt-box/app-prompt-box").then(function(){return resolve(n("da1e"))}.bind(null,n)).catch(n.oe)},h=function(){n.e("components/basic-component/app-layout/app-coupon-modal/app-coupon-modal").then(function(){return resolve(n("6175"))}.bind(null,n)).catch(n.oe)},g=function(){Promise.all([n.e("common/vendor"),n.e("components/basic-component/app-iphone-x/app-iphone-x")]).then(function(){return resolve(n("bd7b"))}.bind(null,n)).catch(n.oe)},m=function(){n.e("components/basic-component/app-layout/app-user-phone/app-user-phone").then(function(){return resolve(n("7a367"))}.bind(null,n)).catch(n.oe)},v={name:"app-layout",data:function(){return{currentRoute:"",tabbarbool:!0,navigationBarTitle:"",page_count:getCurrentPages().length}},components:{"app-tab-bar":p,"app-payment":s,"app-user-login":l,"app-loading":f,"app-report-error":b,"app-prompt-box":d,"app-coupon-modal":h,"app-iphone-x":g,"app-user-phone":m},props:{haveBackground:{type:Boolean,default:function(){return!0}}},computed:i({},(0,o.mapState)("mallConfig",{tabBarNavs:function(t){return t.navbar.navs},bar_title:function(t){return t.bar_title},top_background_color:function(t){return t.navbar.top_background_color},top_text_color:function(t){return t.navbar.top_text_color},bottom_background_color:function(t){return t.navbar.bottom_background_color}}),{},(0,o.mapState)("user",{accessToken:function(t){return t.accessToken}}),{},(0,o.mapState)("gConfig",{reportAndError:function(t){return t.reportAndError},promptBox:function(t){return t.promptBox},iphone:function(t){return t.iphone}}),{isGuest:function(){return""===this.$store.state.user.accessToken||null===this.$store.state.user.accessToken}},(0,o.mapState)("loading",{loadingType:function(t){return t.type},loadingText:function(t){return t.text},loadingColor:function(t){return t.color},loadingBackgroundImage:function(t){return t.backgroundImage},loadingIsShow:function(t){return t.isShow}}),{},(0,o.mapGetters)("iPhoneX",{BotHeight:"getBotHeight"})),watch:{tabBarNavs:{handler:function(){this.setTabbar(),void 0!==this.top_background_color&&t.setNavigationBarColor({backgroundColor:this.top_background_color,frontColor:this.top_text_color})},immediate:!0}},created:function(){var t=this;this.$store.dispatch("mallConfig/actionGetConfig"),this.$nextTick((function(){var e=t.$platDiff.route();r.default.setNavigationBarTitle(t.bar_title,e).then((function(e){t.navigationBarTitle=e}))})),this.$user.isLogin()&&"/pages/disabled/disabled"!=this.$platDiff.route()&&this.$store.dispatch("user/info"),this.$hideLoading()},mounted:function(){try{var e=getCurrentPages();if(e.length){var n=e[e.length-1],o=n.options,r={};"undefined"!==typeof o.custom_params&&(r=JSON.parse(decodeURIComponent(o.custom_params))),"undefined"!==typeof o.user_id?this.$store.dispatch("user/setTempParentId",o.user_id):"undefined"!==typeof r.user_id&&this.$store.dispatch("user/setTempParentId",r.user_id)}}catch(a){console.log(a)}this.currentRoute=this.$platDiff.tabBarUrl(null,this.page_count),this.setTabbar(),void 0!==this.top_background_color&&t.setNavigationBarColor({backgroundColor:this.top_background_color,frontColor:this.top_text_color})},beforeDestroy:function(){this.$hideLoading()},methods:{setTabbar:function(){var t=this.currentRoute,e=[1001,1045,1046,1058,1067,1084,1091];this.$appScene&&e.indexOf(this.$appScene)>-1&&(t.indexOf("appid")>-1||t.indexOf("appmsg_compact_url")>-1)&&(console.log("deleteUrlParam--\x3e",t),t=this.$utils.deleteUrlParam(t,["appid","appmsg_compact_url"],!0)),console.log("setTabbar $appScene--\x3e",this.$appScene),console.log("setTabbar currentRoute--\x3e",t);for(var n=0;n<this.tabBarNavs.length;n++)if(t==this.tabBarNavs[n].url)return this.tabbarbool=!0;return this.tabbarbool=!1}}};e.default=v}).call(this,n("543d")["default"])}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'components/basic-component/app-layout/app-layout-create-component',
  4. {
  5. 'components/basic-component/app-layout/app-layout-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('543d')['createComponent'](__webpack_require__("3dd6"))
  7. })
  8. },
  9. [['components/basic-component/app-layout/app-layout-create-component']]
  10. ]);