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 lines
6.3 KiB
1 lines
6.3 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-8f3b19da"],{3078:function(t,e,a){"use strict";a.r(e),a("a9e3"),a("b0c0");var i=a("f478"),n=a("5530"),s=(a("b64b"),a("e9c4"),a("d81d"),a("14d9"),a("d3b7"),a("25f0"),a("9911"),a("2542")),o=(n={name:"rightConfig",components:Object(n.a)({},s.a),props:{name:{type:Object,default:{}},pageId:{type:Number,default:0},configNum:{type:Number|String,default:"default"}},computed:{defultArr:function(){return this.$store.state.moren.component}},watch:{name:{handler:function(t,e){this.rCom=[],this.configData=this.$store.state.moren.defaultConfig[t.name],this.configData.hasOwnProperty(this.configNum)||(a=JSON.parse(JSON.stringify(this.configData.defaultVal)),this.configData[t.num]=a,this.$store.commit("moren/upDataName",this.configData));var a,i=this;setTimeout((function(){i.rCom=i.$store.state.moren.component[t.name].list}),30),this.configData[t.num].selectConfig&&(this.configData[t.num].selectConfig.type?this.getByCategory():this.getCategory())},deep:!0},defultArr:{handler:function(t,e){this.rCom=[],this.objToArray(t),this.rCom=t[this.name.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.w)().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.configData[t.name.num].selectConfig.list=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.configData[t.name.num].selectConfig.list=a,t.bus.$emit("upData",a)}))},saveConfig:function(){var t=this,e=this.$store.state.moren.defaultConfig;if("tabBar"==this.name.name){if(!this.status)for(var a=e.tabBar.default.tabBarList.list,n=0;n<a.length;n++)if("/pages/storeList/index"==a[n].link||"pages/storeList/index"==a[n].link)return this.$message.error("请先开启您的周边功能(/pages/storeList/index)");if(e.tabBar.default.tabBarList.list.length<2)return this.$message.error("您最少应添加2个导航")}Object(i.e)(this.pageId,{value:e}).then((function(e){t.$message.success("保存成功")}))},objToArray:function(t){var e,a=[];for(e in t)a.push(t[e]);return a}}},s=(a("3dc0"),a("2877")),n=Object(s.a)(n,(function(){var t=this,e=t._self._c;return t.rCom.length?e("div",{staticClass:"right-box"},[e("div",{staticClass:"title-bar"},[t._v("模块配置")]),t.rCom.length?e("div",{staticClass:"mobile-config"},[t._l(t.rCom,(function(a,i){return e("div",{key:i},[e(a.components.name,{tag:"component",attrs:{moduleName:t.name.name,name:a.configNme,configData:t.configData,configNum:t.configNum}})],1)})),t.rCom.length?e("div",{staticStyle:{"text-align":"center"}},[e("el-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,"bb7cf036",null).exports,a("b311")),r=a.n(o),c=(o={name:"links",data:function(){return{list:[{name:"商城首页",url:"/pages/goods/order_list/index",parameter:[{}],example:"/pages/activity/bargain/index"},{name:"商城首页",url:"/pages/goods/order_list/index",parameter:[{}],example:"/pages/activity/bargain/index"}],clipboard:void 0}},created:function(){var t=this;Object(i.o)().then((function(e){t.list=e.data.url}))},mounted:function(){this.$nextTick((function(){var t=this;this.clipboard=new r.a(".copy-data"),this.clipboard.on("success",(function(){t.$message.success("复制成功")}))}))},destroyed:function(){this.clipboard.destroy()},methods:{onCopy:function(t){var e=this;this.$copyText(t).then((function(t){e.$message.success("复制成功")})).catch((function(t){e.$message.error("复制失败")}))}}},o=(a("47cba"),Object(s.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"right-box"},t._l(t.list,(function(a,i){return e("div",{key:i,staticClass:"link-item"},[e("div",{staticClass:"title"},[t._v(t._s(a.name))]),e("div",{staticClass:"txt"},[e("span",[t._v("地址:")]),t._v(t._s(a.url))]),a.parameter?e("div",{staticClass:"txt"},[t._m(0,!0),e("span",[t._v(t._s(a.parameter))])]):t._e(),e("div",{staticClass:"tips"},[t._v("\n 例如:"+t._s(a.example)+"\n "),e("span",{staticClass:"copy copy-data",on:{click:function(e){return t.onCopy(a.example)}}},[t._v("复制")])])])})),0)}),[function(){var t=this._self._c;return t("p",[t("span",[this._v("参数:")])])}],!1,null,"61f9f972",null).exports),a("c276"));n={name:"index",components:{rightConfig:n,links:o},data:function(){return{configName:{},configNum:"default",iframeUrl:"",setConfig:"",updataConfig:"",pageId:0}},created:function(){var t=this,e=(this.show=!0,this.$route.query.id),a=this.$store.state.moren.defaultConfig,n=(this.pageId=parseInt(e),Object(c.c)("moveLink"));1===Number(this.$route.query.type)?this.iframeUrl="".concat(n,"/pages/index/index?mdType=iframeWindow"):this.iframeUrl="".concat(location.origin,"/pages/index/index?mdType=iframeWindow"),Object(i.c)(parseInt(e)).then((function(n){n=n.data.info.value,n?t.upData(n):Object(i.e)(parseInt(e),{value:a}).then((function(t){}))}))},mounted:function(){window.addEventListener("message",this.handleMessage,!1)},methods:{handleMessage:function(t){var e;t.data.name&&(e={name:t.data.name,num:t.data.dataName},this.configName=e,this.configNum=t.data.dataName,this.add(t.data.name))},add:function(t){this.$store.commit("moren/setConfig",t)},upData:function(t){this.$store.commit("moren/updataConfig",t)}}},a("3982"),o=Object(s.a)(n,(function(){var t=this,e=t._self._c;return e("div",[e("pages-header",{ref:"pageHeader",attrs:{title:"页面设计",backUrl:t.$routeProStr+"/setting/pages/devise"}}),e("el-card",{staticClass:"ivu-mt mt15",attrs:{bordered:!1,shadow:"never"}},[e("div",{staticClass:"flex-wrapper"},[e("iframe",{ref:"iframe",staticClass:"iframe-box",attrs:{src:t.iframeUrl,frameborder:"0"}}),e("div",[e("div",{staticClass:"content"},[e("rightConfig",{attrs:{name:t.configName,pageId:t.pageId,configNum:t.configNum}})],1)])])])],1)}),[],!1,null,"2bb545bc",null);e.default=o.exports},3982:function(t,e,a){"use strict";a("c079")},"3dc0":function(t,e,a){"use strict";a("7b07")},"47cba":function(t,e,a){"use strict";a("7ae7")},"7ae7":function(t,e,a){},"7b07":function(t,e,a){},c079:function(t,e,a){}}]); |