1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0683fa55"],{6112:function(t,e,a){"use strict";a.r(e);var i=a("f478");function n(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function s(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}a("2f62");var r={name:"rightConfig",components:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?n(a,!0).forEach((function(e){s(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):n(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},a("2542").a),props:{name:{type:null,default:""},pageId:{type:Number,default:0}},computed:{defultArr:function(){this.$store.dispatch("admin/user/getPageName");var t=this.$store.state.admin.user.pageName;return this.$store.state.admin[t].component}},watch:{name:{handler:function(t,e){this.rCom=[];var a=this.$store.state.admin.user.pageName;if(this.configData=this.$store.state.admin[a].defaultConfig[t],this.rCom=this.$store.state.admin[a].component[t].list,this.configData.selectConfig){var i=this.configData.selectConfig.type?this.configData.selectConfig.type:"";this.configData.selectConfig.list=this.categoryList,i?this.getByCategory():this.getCategory()}},deep:!0},defultArr:{handler:function(t,e){this.rCom=[],this.objToArray(t),this.rCom=t[this.name].list},deep:!0}},data:function(){return{rCom:[],configData:{},isShow:!0,categoryList:[],status:0}},mounted:function(){this.storeStatus()},methods:{storeStatus:function(){var t=this;Object(i.v)().then((function(e){t.status=parseInt(e.data.store_status)}))},getCategory:function(){var t=this;Object(i.g)().then((function(e){var a=[];e.data.map((function(t){a.push({title:t.title,pid:t.pid,activeValue:t.id.toString()})})),t.categoryList=a,t.bus.$emit("upData",a)}))},getByCategory:function(){var t=this;Object(i.f)().then((function(e){var a=[];e.data.map((function(t){a.push({title:t.cate_name,pid:t.pid,activeValue:t.id.toString()})})),t.categoryList=a,t.bus.$emit("upData",a)}))},saveConfig:function(){var t=this,e=this.$store.state.admin.user.pageName,a=this.$store.state.admin[e].defaultConfig,n=this.$store.state.admin[e].periphery;if("z_tabBar"==this.name){if(!n||!this.status)for(var s=a.z_tabBar.tabBarList.list,r=0;r<s.length;r++)if("/pages/storeList/index"==s[r].link||"pages/storeList/index"==s[r].link)return this.$Message.error("请先开启您的周边功能(/pages/storeList/index)");if(a.z_tabBar.tabBarList.list.length<2)return this.$Message.error("您最少应添加2个导航")}Object(i.e)(this.pageId,{value:a}).then((function(e){t.$Message.success("保存成功")}))},objToArray:function(t){var e=[];for(var a in t)e.push(t[a]);return e}}},o=(a("e408"),a("2877")),c={name:"index",components:{rightConfig:Object(o.a)(r,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.rCom.length?a("div",{staticClass:"right-box"},[a("div",{staticClass:"title-bar"},[t._v("模块配置")]),t.rCom.length?a("div",{staticClass:"mobile-config"},[t._l(t.rCom,(function(e,i){return a("div",{key:i},[a(e.components.name,{tag:"component",attrs:{name:e.configNme,configData:t.configData}})],1)})),t.rCom.length?a("div",{staticStyle:{"text-align":"center"}},[a("Button",{staticStyle:{width:"100%",margin:"0 auto",height:"40px"},attrs:{type:"primary"},on:{click:t.saveConfig}},[t._v("保存")])],1):t._e()],2):t._e()]):t._e()}),[],!1,null,"be68bd50",null).exports,links:a("2250").default},data:function(){return{configName:"",iframeUrl:"",setConfig:"",updataConfig:"",pageId:0}},created:function(){var t=this,e=this.$route.query.id,a=this.$route.query.name;this.setConfig="admin/"+a+"/setConfig",this.updataConfig="admin/"+a+"/updataConfig",this.pageId=parseInt(e),this.iframeUrl="".concat(location.origin,"?type=iframeMakkMinkkJuan"),Object(i.c)(parseInt(e)).then((function(e){var a=e.data.info.value;t.upData(a)}))},mounted:function(){window.addEventListener("message",this.handleMessage,!1)},methods:{handleMessage:function(t){t.data.name&&(this.configName=t.data.name,this.add(t.data.name))},add:function(t){this.$store.commit(this.setConfig,t)},upData:function(t){this.$store.commit(this.updataConfig,t)}}},u=(a("c08f"),Object(o.a)(c,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"i-layout-page-header"},[e("PageHeader",{staticClass:"product_tabs",attrs:{"hidden-breadcrumb":""}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("router-link",{attrs:{to:{path:this.roterPre+"/setting/pages/devise"}}},[e("Button",{staticClass:"mr20",attrs:{icon:"ios-arrow-back",size:"small"}},[this._v("返回")])],1),e("span",{staticClass:"mr20",domProps:{textContent:this._s("页面设计")}})],1)])],1),e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("div",{staticClass:"flex-wrapper"},[e("iframe",{ref:"iframe",staticClass:"iframe-box",attrs:{src:this.iframeUrl,frameborder:"0"}}),e("div",[e("div",{staticClass:"content"},[e("rightConfig",{attrs:{name:this.configName,pageId:this.pageId}})],1)]),e("links")],1)])],1)}),[],!1,null,"43a57755",null));e.default=u.exports},"7fbf":function(t,e,a){},b521:function(t,e,a){},c08f:function(t,e,a){"use strict";var i=a("b521");a.n(i).a},e408:function(t,e,a){"use strict";var i=a("7fbf");a.n(i).a}}]);
|