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
14 KiB
1 lines
14 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-767c6316"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),Math.easeInOutQuad=function(e,t,a,n){return e/=n/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function r(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(e,t,a){var i=o(),s=e-i,c=20,u=0;t="undefined"===typeof t?500:t;var d=function e(){u+=c;var o=Math.easeInOutQuad(u,i,s,t);r(o),u<t?n(e):a&&"function"===typeof a&&a()};d()}},"25f4":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"custom-page"},[a("div",{staticClass:"toolbar"},[a("el-button",{attrs:{type:"success",size:"mini"},on:{click:e.addBar}},[e._v("添加页面")])],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData.records,border:"","row-key":"id"}},[a("el-table-column",{attrs:{prop:"name",label:"页面名称"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间"}}),a("el-table-column",{attrs:{prop:"status",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.preventDefault(),e.renovation(t.row)}}},[e._v(" 装修 ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.preventDefault(),e.checkRow(t.row)}}},[e._v(" 查看 ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.preventDefault(),e.editRow(t.row)}}},[e._v(" 修改 ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.preventDefault(),e.deleteRow(t.row)}}},[e._v(" 删除 ")])]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.tableData.total>0,expression:"tableData.total > 0"}],attrs:{limit:e.formParams.pageSize,page:e.formParams.start,total:Number(e.tableData.total)},on:{"update:limit":function(t){return e.$set(e.formParams,"pageSize",t)},"update:page":function(t){return e.$set(e.formParams,"start",t)},pagination:e.getProductCategory}}),a("edit-dialog",{ref:"edit",attrs:{"dialog-visible":e.dialog.isVisible,type:e.dialog.type},on:{close:e.editClose,success:e.getProductCategory}})],1)},r=[],o=(a("96cf"),a("1da1")),i=a("6d0e"),s=a("333d"),c=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{staticClass:"group-dialog",attrs:{"close-on-click-modal":!1,title:e.title,type:e.type,visible:e.isVisible,width:"60%",top:"50px"},on:{"update:visible":function(t){e.isVisible=t}}},[a("div",{staticClass:"add-dialog-component"},[a("el-form",{ref:"form",attrs:{model:e.params,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"页面名称"}},[a("el-input",{attrs:{disabled:e.isCheck},model:{value:e.params.name,callback:function(t){e.$set(e.params,"name",t)},expression:"params.name"}})],1)],1),a("div",{staticClass:"add-btn-wrap"},[a("el-button",{staticClass:"add",attrs:{type:"primary",size:"small"},on:{click:e.onSubmit}},[e._v("确定")]),a("el-button",{staticClass:"add",attrs:{size:"small"},on:{click:e.close}},[e._v("取消")])],1)],1)])},u=[],d=(a("c740"),a("a434"),1e3),l={props:{dialogVisible:{type:Boolean,default:!1},type:{type:String,default:"add"}},data:function(){return{params:{config:"",isCustom:!0,isDelete:0,name:""},treeData:[]}},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close(),this.reset()}},title:function(){var e={add:"添加页面",edit:"修改页面",check:"查看页面"};return e[this.type]},isCheck:function(){return"check"===this.type}},methods:{close:function(){this.$emit("close")},reset:function(){this.params={config:"",isCustom:!0,isDelete:0,name:""},this.treeData=[]},addCustom:function(){this.treeData.push({placeholder:"输入一级索引",addTips:"添加二级目录",categoryName:"",categoryPath:"",depth:1,id:d++}),console.log(this.treeData)},append:function(e){var t,a=e.categoryName,n=e.depth+1;n<3?(t={placeholder:"输入二级索引",addTips:"添加三级目录",depth:n,parentName:a,categoryName:"",categoryPath:"",childs:[],id:d++},e.childs||this.$set(e,"childs",[])):t={parentName:a,categoryName:"",id:d++},e.childs.push(t)},remove:function(e,t){var a=e.parent,n=a.data.childs||a.data,r=n.findIndex((function(e){return e.id===t.id}));n.splice(r,1)},onSubmit:function(){"add"===this.type&&this.addGroup(),"edit"===this.type?this.updateGroup():this.isVisible=!1},addGroup:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var a,n,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,i["a"].addTemplate(e.params);case 2:a=t.sent,n=a.data,r=n.code,0===r&&(e.isVisible=!1,e.$message({message:e.$t("tips.createSuccess"),type:"success"}),e.$emit("success"));case 6:case"end":return t.stop()}}),t)})))()},updateGroup:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var a,n,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,i["a"].updateTemplate(e.params);case 2:a=t.sent,n=a.data,r=n.code,0===r&&(e.isVisible=!1,e.$message({message:e.$t("tips.updateSuccess"),type:"success"}),e.$emit("success"));case 6:case"end":return t.stop()}}),t)})))()},setParams:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this;e["params"]&&(t.params=e["params"])}}},f=l,p=(a("5b0e"),a("930b"),a("2877")),m=Object(p["a"])(f,c,u,!1,null,"23919a02",null),h=m.exports,g={components:{EditDialog:h,Pagination:s["a"]},data:function(){return{dialogVisible:!1,formParams:{current:1,map:{},model:{config:"",isCustom:!0,isDelete:0,name:""},order:"descending",size:10,sort:"id"},tableData:{records:[]},dialog:{type:"add",isVisible:!1}}},created:function(){this.getProductCategory()},methods:{addBar:function(){this.dialog={type:"add",isVisible:!0},this.$refs.edit.setParams({treeData:[]})},editClose:function(){this.dialog.isVisible=!1},renovation:function(e){var t=e.id;this.$router.push({name:"renovation",params:{id:t}})},checkRow:function(e){this.dialog={type:"check",isVisible:!0},this.$refs.edit.setParams({params:e})},editRow:function(e){this.dialog={type:"edit",isVisible:!0},this.$refs.edit.setParams({params:e})},deleteRow:function(e){var t=this,a=e.id;this.$confirm(this.$t("tips.confirmDelete"),this.$t("common.tips"),{confirmButtonText:this.$t("common.confirm"),cancelButtonText:this.$t("common.cancel"),type:"warning"}).then((function(){t.delete({ids:[a]})})).catch((function(){}))},delete:function(e){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function a(){var n,r,o;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,i["a"].deleteTemplate(e);case 2:n=a.sent,r=n.data,o=r.code,0===o&&(t.$message({message:t.$t("tips.deleteSuccess"),type:"success"}),t.getProductCategory());case 6:case"end":return a.stop()}}),a)})))()},getProductCategory:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,i["a"].cmsTemplatePage(e.formParams);case 2:a=t.sent,e.tableData=a.data.data;case 4:case"end":return t.stop()}}),t)})))()}}},b=g,v=(a("872d"),Object(p["a"])(b,n,r,!1,null,"10c83895",null));t["default"]=v.exports},"27ae":function(e,t,a){(function(a){var n,r;(function(t,a){e.exports=a(t)})("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof a?a:this,(function(a){"use strict";a=a||{};var o,i=a.Base64,s="2.6.4",c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=function(e){for(var t={},a=0,n=e.length;a<n;a++)t[e.charAt(a)]=a;return t}(c),d=String.fromCharCode,l=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?d(192|t>>>6)+d(128|63&t):d(224|t>>>12&15)+d(128|t>>>6&63)+d(128|63&t)}t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return d(240|t>>>18&7)+d(128|t>>>12&63)+d(128|t>>>6&63)+d(128|63&t)},f=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,p=function(e){return e.replace(f,l)},m=function(e){var t=[0,2,1][e.length%3],a=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0),n=[c.charAt(a>>>18),c.charAt(a>>>12&63),t>=2?"=":c.charAt(a>>>6&63),t>=1?"=":c.charAt(63&a)];return n.join("")},h=a.btoa&&"function"==typeof a.btoa?function(e){return a.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,m)},g=function(e){return h(p(String(e)))},b=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},v=function(e,t){return t?b(g(e)):g(e)},y=function(e){return v(e,!0)};a.Uint8Array&&(o=function(e,t){for(var a="",n=0,r=e.length;n<r;n+=3){var o=e[n],i=e[n+1],s=e[n+2],u=o<<16|i<<8|s;a+=c.charAt(u>>>18)+c.charAt(u>>>12&63)+("undefined"!=typeof i?c.charAt(u>>>6&63):"=")+("undefined"!=typeof s?c.charAt(63&u):"=")}return t?b(a):a});var w,x=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,T=function(e){switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),a=t-65536;return d(55296+(a>>>10))+d(56320+(1023&a));case 3:return d((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return d((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},C=function(e){return e.replace(x,T)},A=function(e){var t=e.length,a=t%4,n=(t>0?u[e.charAt(0)]<<18:0)|(t>1?u[e.charAt(1)]<<12:0)|(t>2?u[e.charAt(2)]<<6:0)|(t>3?u[e.charAt(3)]:0),r=[d(n>>>16),d(n>>>8&255),d(255&n)];return r.length-=[0,0,2,1][a],r.join("")},P=a.atob&&"function"==typeof a.atob?function(e){return a.atob(e)}:function(e){return e.replace(/\S{1,4}/g,A)},O=function(e){return P(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},B=function(e){return C(P(e))},k=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},D=function(e){return B(k(e))};a.Uint8Array&&(w=function(e){return Uint8Array.from(O(k(e)),(function(e){return e.charCodeAt(0)}))});var j=function(){var e=a.Base64;return a.Base64=i,e};if(a.Base64={VERSION:s,atob:O,btoa:h,fromBase64:D,toBase64:v,utob:p,encode:v,encodeURI:y,btou:C,decode:D,noConflict:j,fromUint8Array:o,toUint8Array:w},"function"===typeof Object.defineProperty){var S=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};a.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",S((function(){return D(this)}))),Object.defineProperty(String.prototype,"toBase64",S((function(e){return v(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",S((function(){return v(this,!0)})))}}return a["Meteor"]&&(Base64=a.Base64),e.exports?e.exports.Base64=a.Base64:(n=[],r=function(){return a.Base64}.apply(t,n),void 0===r||(e.exports=r)),{Base64:a.Base64}}))}).call(this,a("c8ba"))},"4fad":function(e,t,a){var n=a("23e7"),r=a("6f53").entries;n({target:"Object",stat:!0},{entries:function(e){return r(e)}})},"5b0e":function(e,t,a){"use strict";var n=a("88cc"),r=a.n(n);r.a},"6d0e":function(e,t,a){"use strict";var n=a("9256"),r={cmsTemplatePage:"/cmsTemplate/page",addTemplate:"/cmsTemplate",deleteTemplate:"/cmsTemplate"};t["a"]={cmsTemplatePage:function(e){return Object(n["a"])({method:"POST",url:r.cmsTemplatePage,data:e})},addTemplate:function(e){return Object(n["a"])({method:"POST",url:r.addTemplate,data:e})},deleteTemplate:function(e){return Object(n["a"])({method:"DELETE",url:r.deleteTemplate,data:e})},updateTemplate:function(e){return Object(n["a"])({method:"PUT",url:r.deleteTemplate,data:e})}}},"6f53":function(e,t,a){var n=a("83ab"),r=a("df75"),o=a("fc6a"),i=a("d1e7").f,s=function(e){return function(t){var a,s=o(t),c=r(s),u=c.length,d=0,l=[];while(u>d)a=c[d++],n&&!i.call(s,a)||l.push(e?[a,s[a]]:s[a]);return l}};e.exports={entries:s(!0),values:s(!1)}},8073:function(e,t,a){},"872d":function(e,t,a){"use strict";var n=a("d8a9"),r=a.n(n);r.a},"88cc":function(e,t,a){},9256:function(e,t,a){"use strict";a("99af"),a("4160"),a("caad"),a("4fad"),a("d3b7"),a("159b");var n=a("5530"),r=a("bc3a"),o=a.n(r),i=a("5c96"),s=a("5657");a("27ae");function c(e,t){"ECONNABORTED"===e.code?Object(i["Message"])({message:"请求超时"}):e.response&&e.response.data?Object(i["Message"])({message:e.response.data}):e.message&&Object(i["Message"])({message:e.message}),t(e)}function u(e,t){e.data.isError&&(4e4===e.data.code||40001===e.data.code||40002===e.data.code||40003===e.data.code||40005===e.data.code||40006===e.data.code||40008===e.data.code?i["MessageBox"].alert(e.data.msg,"提醒",{confirmButtonText:"确定",callback:function(){window.location.hash="/login"}}):i["Message"].error(e.data.msg)),t(e)}o.a.interceptors.request.use((function(e){var t=!1!==e.headers["X-isToken"]||e.headers["X-isToken"],a=s["a"].get("TOKEN","");a&&t&&(e.headers.token="Bearer "+a);var n="ceres_admin_web",r="ceres_admin_web";return e.headers["Authorization"]="Basic ".concat("".concat(n,":").concat(r)),e}),(function(e){return Promise.reject(e)})),o.a.interceptors.response.use((function(e){return e}),(function(e){return Promise.reject(e)}));var d=function(e){console.log(e,"opts");var t={ts:Date.now()},a=e.method.toUpperCase(),r={method:a,url:"".concat("https://pos.admin.api.lotus-wallet.com").concat(e.url),responseType:e.responseType||"",timeout:2e4},i=["PUT","POST","PATCH"];i.includes(a)?r.data=e.data||{}:r.params=Object(n["a"])(Object(n["a"])({},t),e.data||{}),e.formData&&(r.transformRequest=[function(e){var t=new FormData;return e&&Object.entries(e).forEach((function(e){t.append(e[0],e[1])})),t}]);var s=new Promise((function(e,t){o()(r).then((function(t){u(t,e)})).catch((function(e){c(e,t)}))}));return s};t["a"]=d},"930b":function(e,t,a){"use strict";var n=a("8073"),r=a.n(n);r.a},d8a9:function(e,t,a){}}]); |