You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
5.4 KiB
1 line
5.4 KiB
4 months ago
|
(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.y)().then((function(e){t.status=parseInt(e.data.store_status)}))},getCategory:function(){var t=this;Object(i.h)().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.g)().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((functi
|