canvas.532d5fdd.js
36.1 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["canvas"],{"03fc":function(e,n,t){},"063a":function(e,n,t){},"0a7f":function(e,n,t){"use strict";t("bf08")},1:function(e,n,t){e.exports=t("a3d5")},"184c":function(e,n,t){},"186a":function(e,n,t){},"34ef":function(e,n,t){"use strict";t("186a")},"35c6":function(e,n,t){},"784c":function(e,n,t){},"7a32":function(e,n,t){"use strict";var a=Object({NODE_ENV:"production",VUE_APP_BASE_API:"/prod-api",VUE_APP_DOMAIN_PREFIX_1:"https://h5.028wlkj.com/cdwlMall/admin-server",VUE_APP_DOMAIN_PREFIX_2:"https://h5.028wlkj.com/cdwlMall/api",BASE_URL:"/cdwlMall/"}).VUE_APP_DOMAIN_PREFIX,o={fileUpload:a+"/file/upload",getClassify:a+"/canvas/getClassify",getProducts:a+"/canvas/getProducts",saveCanvas:a+"/canvas/saveCanvas",getCanvas:a+"/canvas/getCanvas",getShops:a+"/canvas/getShops",getCoupons:a+"/canvas/getCoupons",getShopCoupons:a+"/canvas/getShopCoupons",takeCoupon:a+"/coupon/takeCoupon",selectCanvasCustomList:a+"/canvas/selectCanvasCustomList",getPlatformSeckills:"".concat(a,"/canvas/getPlatformSeckills"),getSeckills:"".concat(a,"/renovation/getSeckills"),getMinDiscount:"".concat(a,"/canvas/getMinDiscount"),getDiscounts:"".concat(a,"/renovation/getDiscounts"),getAdminGroupWorks:"".concat(a,"/canvas/getGroupWorks"),getGroupWorks:"".concat(a,"/renovation/getGroupWorks"),getPriceProducts:"".concat(a,"/canvas/getPriceProducts"),getPrices:"".concat(a,"/canvas/getPrices"),getMemberProducts:"".concat(a,"/canvas/getMemberProducts"),getNotices:"".concat(a,"/canvas/getNotices")};n["a"]=o},"86ee":function(e,n,t){"use strict";t("35c6")},"8d3b":function(e,n,t){"use strict";t("93fe")},9366:function(e,n,t){"use strict";t("d53d")},"93fe":function(e,n,t){},9508:function(e,n,t){"use strict";t("784c")},a3d5:function(e,n,t){"use strict";t.r(n);var a={};t.r(a),t.d(a,"terminal",(function(){return ce})),t.d(a,"activeComponent",(function(){return ue})),t.d(a,"componentsData",(function(){return se})),t.d(a,"typeId",(function(){return re})),t.d(a,"couponNum",(function(){return le})),t.d(a,"discountNum",(function(){return de})),t.d(a,"groupNum",(function(){return pe})),t.d(a,"newProductNum",(function(){return he})),t.d(a,"priceNum",(function(){return me})),t.d(a,"productNum",(function(){return fe})),t.d(a,"spikeNum",(function(){return be}));t("e260"),t("e6cf"),t("cca6"),t("a79d");var o=t("a026"),i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{attrs:{id:"app"}},[t("router-view")],1)},c=[],u={name:"App"},s=u,r=t("2877"),l=Object(r["a"])(s,i,c,!1,null,null,null),d=l.exports,p=t("8c4f"),h=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"layout hom-layout"},e._l(e.componentsData,(function(n,a){return t("div",{key:a,staticClass:"list-group-item"},[t(e.componentMap[e.terminal-1].get(n.type),{tag:"component",attrs:{componentContent:n.componentContent,terminal:e.terminal,typeId:e.typeId,shopId:e.shopId}})],1)})),0)},m=[],f=(t("4de4"),t("e9c4"),t("a9e3"),t("b64b"),t("d3b7"),t("4ec9"),t("3ca3"),t("ddb0"),[new Map([["header",function(){return t.e("chunk-2b080126").then(t.bind(null,"d09e"))}],["banner",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-9afc38da")]).then(t.bind(null,"11bd"))}],["text",function(){return t.e("chunk-30bbbc48").then(t.bind(null,"cbf7"))}],["imageText",function(){return t.e("chunk-33b51090").then(t.bind(null,"7244"))}],["brandList",function(){return t.e("chunk-d1a0890c").then(t.bind(null,"a74a"))}],["categoryList",function(){return t.e("chunk-e7e53338").then(t.bind(null,"0e13"))}],["imageTextList",function(){return t.e("chunk-640b9ce5").then(t.bind(null,"0d24"))}],["assistDiv",function(){return t.e("chunk-e11157a0").then(t.bind(null,"b77d"))}],["imageTextNav",function(){return t.e("chunk-7ed45b1c").then(t.bind(null,"11e6"))}],["productList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-b598993c")]).then(t.bind(null,"10b4"))}],["videoBox",function(){return t.e("chunk-1e686272").then(t.bind(null,"fbe8"))}],["coupon",function(){return t.e("chunk-ce423116").then(t.bind(null,"e5f6"))}],["custom",function(){return t.e("chunk-033cefa7").then(t.bind(null,"3739"))}],["notice",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-6689d494")]).then(t.bind(null,"a41d"))}],["vip",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-b2eb8e38")]).then(t.bind(null,"3ffe"))}],["groupList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-3e8090da")]).then(t.bind(null,"8422"))}],["spikeList",function(){return t.e("chunk-6a705108").then(t.bind(null,"a678"))}],["priceList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-d7a79912")]).then(t.bind(null,"602f"))}],["discountList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-c5ada7ce")]).then(t.bind(null,"46d0"))}],["newProduct",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-e652f88c")]).then(t.bind(null,"68ce"))}],["live",function(){return t.e("chunk-5a7cce80").then(t.bind(null,"b7a1"))}],["shop",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-5d0a9130")]).then(t.bind(null,"c16f"))}]]),new Map([["header",function(){return t.e("chunk-2b080126").then(t.bind(null,"d09e"))}],["banner",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-9afc38da")]).then(t.bind(null,"11bd"))}],["text",function(){return t.e("chunk-30bbbc48").then(t.bind(null,"cbf7"))}],["imageText",function(){return t.e("chunk-33b51090").then(t.bind(null,"7244"))}],["brandList",function(){return t.e("chunk-d1a0890c").then(t.bind(null,"a74a"))}],["categoryList",function(){return t.e("chunk-e7e53338").then(t.bind(null,"0e13"))}],["imageTextList",function(){return t.e("chunk-640b9ce5").then(t.bind(null,"0d24"))}],["assistDiv",function(){return t.e("chunk-e11157a0").then(t.bind(null,"b77d"))}],["imageTextNav",function(){return t.e("chunk-7ed45b1c").then(t.bind(null,"11e6"))}],["productList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-b598993c")]).then(t.bind(null,"10b4"))}],["videoBox",function(){return t.e("chunk-1e686272").then(t.bind(null,"fbe8"))}],["coupon",function(){return t.e("chunk-ce423116").then(t.bind(null,"e5f6"))}],["custom",function(){return t.e("chunk-033cefa7").then(t.bind(null,"3739"))}],["notice",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-6689d494")]).then(t.bind(null,"a41d"))}],["vip",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-b2eb8e38")]).then(t.bind(null,"3ffe"))}],["groupList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-3e8090da")]).then(t.bind(null,"8422"))}],["spikeList",function(){return t.e("chunk-6a705108").then(t.bind(null,"a678"))}],["priceList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-d7a79912")]).then(t.bind(null,"602f"))}],["discountList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-c5ada7ce")]).then(t.bind(null,"46d0"))}],["newProduct",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-e652f88c")]).then(t.bind(null,"68ce"))}],["live",function(){return t.e("chunk-5a7cce80").then(t.bind(null,"b7a1"))}],["shop",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-5d0a9130")]).then(t.bind(null,"c16f"))}]]),new Map([["header",function(){return t.e("chunk-2b080126").then(t.bind(null,"d09e"))}],["banner",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-9afc38da")]).then(t.bind(null,"11bd"))}],["text",function(){return t.e("chunk-30bbbc48").then(t.bind(null,"cbf7"))}],["imageText",function(){return t.e("chunk-33b51090").then(t.bind(null,"7244"))}],["brandList",function(){return t.e("chunk-d1a0890c").then(t.bind(null,"a74a"))}],["categoryList",function(){return t.e("chunk-e7e53338").then(t.bind(null,"0e13"))}],["imageTextList",function(){return t.e("chunk-640b9ce5").then(t.bind(null,"0d24"))}],["assistDiv",function(){return t.e("chunk-e11157a0").then(t.bind(null,"b77d"))}],["imageTextNav",function(){return t.e("chunk-7ed45b1c").then(t.bind(null,"11e6"))}],["productList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-b598993c")]).then(t.bind(null,"10b4"))}],["videoBox",function(){return t.e("chunk-1e686272").then(t.bind(null,"fbe8"))}],["coupon",function(){return t.e("chunk-ce423116").then(t.bind(null,"e5f6"))}],["custom",function(){return t.e("chunk-033cefa7").then(t.bind(null,"3739"))}],["notice",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-6689d494")]).then(t.bind(null,"a41d"))}],["vip",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-b2eb8e38")]).then(t.bind(null,"3ffe"))}],["groupList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-3e8090da")]).then(t.bind(null,"8422"))}],["spikeList",function(){return t.e("chunk-6a705108").then(t.bind(null,"a678"))}],["priceList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-d7a79912")]).then(t.bind(null,"602f"))}],["discountList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-c5ada7ce")]).then(t.bind(null,"46d0"))}],["newProduct",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-e652f88c")]).then(t.bind(null,"68ce"))}],["live",function(){return t.e("chunk-5a7cce80").then(t.bind(null,"b7a1"))}],["shop",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-5d0a9130")]).then(t.bind(null,"c16f"))}]]),new Map([["header",function(){return t.e("chunk-b992cf08").then(t.bind(null,"499e"))}],["banner",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-9afc38da")]).then(t.bind(null,"11bd"))}],["text",function(){return t.e("chunk-30bbbc48").then(t.bind(null,"cbf7"))}],["imageText",function(){return t.e("chunk-33b51090").then(t.bind(null,"7244"))}],["brandList",function(){return t.e("chunk-d1a0890c").then(t.bind(null,"a74a"))}],["categoryList",function(){return t.e("chunk-e7e53338").then(t.bind(null,"0e13"))}],["imageTextList",function(){return t.e("chunk-640b9ce5").then(t.bind(null,"0d24"))}],["assistDiv",function(){return t.e("chunk-e11157a0").then(t.bind(null,"b77d"))}],["imageTextNav",function(){return t.e("chunk-7ed45b1c").then(t.bind(null,"11e6"))}],["productList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-610d690f")]).then(t.bind(null,"53fa"))}],["videoBox",function(){return t.e("chunk-1e686272").then(t.bind(null,"fbe8"))}],["coupon",function(){return t.e("chunk-c3ebddde").then(t.bind(null,"3cbe"))}],["custom",function(){return t.e("chunk-033cefa7").then(t.bind(null,"3739"))}],["notice",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-6689d494")]).then(t.bind(null,"a41d"))}],["vip",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-b68d6d76")]).then(t.bind(null,"4985"))}],["groupList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-39b68452")]).then(t.bind(null,"9f7d"))}],["spikeList",function(){return t.e("chunk-71dfc732").then(t.bind(null,"8d96"))}],["priceList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-07caece2")]).then(t.bind(null,"6c8a"))}],["discountList",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-773291c3")]).then(t.bind(null,"546e"))}],["newProduct",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-e652f88c")]).then(t.bind(null,"68ce"))}],["shop",function(){return Promise.all([t.e("chunk-e3d9f73e"),t.e("chunk-5d0a9130")]).then(t.bind(null,"c16f"))}]])]),b=f,g=t("7a32"),k=t("f270"),v={name:"canvasPage",mixins:[k["b"]],data:function(){return{componentsData:[],activeComponent:-1,componentMap:b}},props:{terminal:{type:Number,default:4},typeId:{type:Number,default:1},shopId:{type:Number,default:0}},mounted:function(){this.canvasGet()},methods:{canvasGet:function(){var e=this,n=this,t=g["a"].getCanvas+"?terminal="+this.terminal+"&type="+this.typeId;this.shopId&&(t+="&shopId="+this.shopId);var a={url:t,method:"GET"};this.sendReq(a,(function(t){if("{}"!==JSON.stringify(t.data)){n.canvasId=t.data.canvasId;for(var a,o=JSON.parse(t.data.json),i=function(t){"shopHeader"===o[t].type&&4===e.terminal&&o[t].componentContent.category&&0!==o[t].componentContent.category.length&&(a=o[t].componentContent.category,n.sendReq({url:"".concat(g["a"].getClassify),method:"GET"},(function(e){o[t].componentContent.category=e.data.filter((function(e){for(var n=0;n<a.length;n++)if(a[n].id===e.id)return!0}))})))},c=0;c<o.length;c++)i(c);n.componentsData=o}else n.canvasId=""}))}}},y=v,C=(t("9508"),t("e3ff"),Object(r["a"])(y,h,m,!1,null,"11503ea0",null)),N=C.exports,I=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:e.loading,expression:"loading",modifiers:{fullscreen:!0,lock:!0}}],staticClass:"layout hom-layout"},[t("draggable",{staticClass:"dragArea list-group",attrs:{list:e.componentsData,group:"pageEdit",move:e.checkMove,filter:".undraggable"},on:{end:e.pageAdd,change:e.pageChange}},e._l(e.componentsData,(function(n,a){return t("div",{key:a,staticClass:"list-group-item",class:[{on:e.activeComponent==a,undraggable:n.undraggable},"item-"+n.type],on:{click:function(t){return e.selectComponent(n,a)}}},[t(e.componentMap[e.terminal-1].get(n.type),{directives:[{name:"show",rawName:"v-show",value:!n.isEmpty,expression:"!item.isEmpty"}],tag:"component",attrs:{isNoData:n.isEmpty,componentContent:n.componentContent,terminal:e.terminal,typeId:e.typeId,shopId:e.shopId},on:{"update:isNoData":function(t){return e.$set(n,"isEmpty",t)},"update:is-no-data":function(t){return e.$set(n,"isEmpty",t)},cleckLoading:e.cleckLoading}}),t("div",{directives:[{name:"show",rawName:"v-show",value:n.isEmpty,expression:"item.isEmpty"}],staticClass:"no-data"},[t("i",{staticClass:"iconfont icon-kong"}),t("p",[e._v("暂无数据"),t("br"),e._v("请在右边窗口编辑内容")])]),t("div",{staticClass:"btns"},[t("span",{on:{click:function(t){return e.delComponent(n,a)}}},[t("i",{staticClass:"iconfont icon-shanchu"})])])],1)})),0)],1)},x=[],P=t("5530"),T=(t("a434"),t("159b"),t("b76a")),L=t.n(T),D=t("2f62"),w={name:"canvasEditPage",components:{draggable:L.a},props:{terminal:{type:Number,default:4},typeId:{type:Number,default:1},shopId:{type:Number,default:0}},data:function(){return{activeComponent:-1,componentMap:b,loading:!1}},mounted:function(){},computed:Object(P["a"])({},Object(D["b"])(["componentsData"])),methods:Object(P["a"])(Object(P["a"])({},Object(D["c"])({setActiveComponent:"SET_ACTIVECOMPONENT",setComponentsData:"SET_COMPONENTSDATA"})),{},{pageChange:function(e){if(e.added)if("header"==e.added.element.type){var n=this.componentsData.filter((function(e){return"header"===e.type}));n.length>=2?(this.componentsData.splice(e.added.newIndex,1),this.$message.warning("头部组件最多只能存在一个。")):1===n.length&&"header"!==this.componentsData[0].type&&(this.componentsData.splice(e.added.newIndex,1),this.componentsData.unshift(e.added.element)),this.activeComponent=0,e.added.element.index=0,this.setActiveComponent(e.added.element)}else this.activeComponent=e.added.newIndex,e.added.element.index=e.added.newIndex,this.setActiveComponent(e.added.element);e.moved&&(this.activeComponent=e.moved.newIndex,e.moved.element.index=e.moved.newIndex,this.setActiveComponent(e.moved.element)),this.$emit("showRightBox",!0)},checkMove:function(e){return console.log(e,"checkMove"),"header"!=e.relatedContext.element.type&&("header"!=e.draggedContext.element.type&&void 0)},pageAdd:function(e){return console.log(e,"pageAdd"),!1},selectComponent:function(e,n){this.activeComponent=n,e.index=n,this.setActiveComponent(e),this.$emit("showRightBox",!0)},delComponent:function(e,n){var t=this;this.$confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.activeComponent=-1,t.componentsData.splice(n,1),t.$emit("showRightBox",!1)})).catch((function(){}))},cleckLoading:function(){if("undefined"!==typeof uni)uni.getStorage({key:"sendNum",success:function(e){var n=e.data;this.loading=0!==parseInt(n)}});else{var e=localStorage.getItem("sendNum");this.loading=0!==parseInt(e)}},checkIsNoData:function(e){for(var n=this,t=function(){var t=e[a].componentContent,o=!0,i="";switch(e[a].type){case"banner":i=t.bannerData,i.forEach((function(e){e.bannerUrl&&(o=!1)}));break;case"header":case"notice":case"text":case"imageTextNav":case"imageText":case"imageTextList":case"brandList":case"categoryList":case"assistDiv":case"vip":case"live":case"videoBox":o=!1;break;case"productList":i=t.productData,("1"==i.sourceType&&i.productIdList.length>0||"2"==i.sourceType&&0!=i.categoryId)&&(o=!1);break;case"custom":i=t.imgData,i.forEach((function(e){e.src&&(o=!1)}));break;case"groupList":(1===n.typeId||t.shopGroupWorkId)&&(o=!1);break;case"spikeList":t.shopSeckillId&&(o=!1);break;case"discountList":t.discountId&&(o=!1);break;case"priceList":t.priceId&&(o=!1);break;case"coupon":t.selectedCoupon.length>0&&(o=!1);break;case"newProduct":i=t.productData,("1"==i.sourceType&&i.productIdList.length>0||"2"==i.sourceType&&0!=i.categoryId)&&(o=!1);break;case"shop":i=t.imgTextData,i.forEach((function(e){e.img&&(o=!1)}));break}e[a].isEmpty=o,n.$forceUpdate()},a=0;a<e.length;a++)t();console.log(e)}}),watch:{componentsData:{handler:function(e,n){this.checkIsNoData(e)},deep:!0}}},O=w,S=(t("0a7f"),t("34ef"),Object(r["a"])(O,I,x,!1,null,"32e01b11",null)),j=S.exports,E=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"canvas"},[t("div",{staticClass:"topBox"},[t("ul",e._l(e.deviceList,(function(n,a){return t("li",{key:a,class:{on:e.terminal==n.id},on:{click:function(t){return e.toggleDevice(n.id)}}},[t("i",{staticClass:"iconfont",class:"icon-"+n.name})])})),0),t("el-button",{staticClass:"btn-save",attrs:{type:"primary"},on:{click:e.canvasSave}},[e._v("保存画布")])],1),t("div",{staticClass:"bottomWarp"},[t("div",{staticClass:"leftBox"},[t("left-bar")],1),t("div",{staticClass:"mainContentWarp"},[t("div",{staticClass:"mainContent",class:"view-"+e.terminal},[t("cereshop-layout",{attrs:{terminal:e.terminal,typeId:e.typeId,shopId:e.shopId},on:{showRightBox:e.showRightBox}})],1)]),t("div",{staticClass:"RightBox"},[e.comChoose?t("tool-panel"):t("div",{staticClass:"noChoose"},[t("div",[t("i",{staticClass:"iconfont icon-kong"}),t("p",[e._v("没有选定的组件"),t("br"),e._v("请拖拽左侧组件栏添加或者选择一个组件")])])])],1)])])},A=[],_=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"panelBoxWarp"},[t("div",{staticClass:"panelBox",class:{on:e.sidebarShow}},[t("div",{staticClass:"categoryList"},e._l(e.panelShowList,(function(n,a){return t("div",{key:a,staticClass:"itemBox"},[t("h3",[e._v(e._s(n.title))]),t("div",{staticClass:"childList"},[t("draggable",{staticClass:"dragArea list-group",attrs:{list:n.classList,clone:e.cloneItem,group:{name:"pageEdit",pull:"clone",put:!1},options:{sort:!1}}},e._l(n.classList,(function(n,a){return t("div",{key:a,staticClass:"childItem list-group-item",on:{mouseover:function(t){e.hoverItem(n)},mouseout:e.hoverItemOut}},[t("div",{staticClass:"childItemWarp"},[t("div",{staticClass:"contentBox"},[t("i",{staticClass:"iconfont",class:n.iconClass}),t("span",[e._v(e._s(n.title))])]),t("div",{staticClass:"cloneText"},[e._v(" 组件放置区域 ")])])])})),0)],1)])})),0)]),t("div",{staticClass:"btnToggle",class:{on:e.sidebarShow},on:{click:function(n){e.sidebarShow=!e.sidebarShow}}},[t("i",{staticClass:"iconfont icon-arrow-right"}),t("i",{staticClass:"iconfont icon-arrow-left"})])])},M=[],V=(t("caad"),[{title:"基础组件",type:1,classList:[{title:"商城头部",iconClass:"icon-dianputoubu",type:"header",undraggable:!0,onlyAdmin:!0,onlyApp:!0,componentContent:{logoType:1,imageUrl:"",title:"",fontSizeNum:"",textFontW:"normal",titColor:"#CD5353"}},{title:"轮播图",iconClass:"icon-lunbo",type:"banner",componentContent:{height:500,bannerData:[{bannerUrl:"",linkObj:{selsectValue:"",selectName:"",typeText:"",url:""}}]}},{title:"标题文本",iconClass:"icon-wenben",type:"text",componentContent:{title:"标题",describe:"描述",textPos:"left",fontSizeNum:"16",describeSizeNum:"14",textFontW:"normal",describeFontW:"normal",titColor:"#333333",describeColor:"#666666",bgColor:"#FFFFFF",showLine:!1,showMore:!1,styleValue:"1",link:""}},{title:"公告",iconClass:"icon-gonggao1",type:"notice",onlyAdmin:!0,componentContent:{titColor:"#FFFFFF",bgColor:"#333333"}},{title:"品牌列表",iconClass:"icon-pinpailiebiao",type:"brandList",componentContent:{title:"品牌列表",imgList:[{title:"标题一",imgData:"",linkObj:{selsectValue:"",selectName:"",typeText:"",url:""}},{title:"标题二",imgData:"",linkObj:{selsectValue:"",selectName:"",typeText:"",url:""}},{title:"标题三",imgData:"",linkObj:{selsectValue:"",selectName:"",typeText:"",url:""}},{title:"标题四",imgData:"",linkObj:{selsectValue:"",selectName:"",typeText:"",url:""}}],textAlign:"left",imgCurrent:null}},{title:"图文",iconClass:"icon-tuwen",type:"imageText",componentContent:{imageUrl:"",linkObj:{selsectValue:"",selectName:"",typeText:"",url:""},positionValue:"left",title:"title",content:""}},{title:"图文列表",iconClass:"icon-tuwenliebiao",type:"imageTextList",componentContent:{title:"标题",textAlign:"left",imgTextData:[{linkObj:{selsectValue:"",selectName:"",typeText:"",url:""},isShow:!0,title:"图文标题",describe:"告别生活,畅享便携生活",imgData:""},{linkObj:{selsectValue:"",selectName:"",typeText:"",url:""},isShow:!0,title:"图文标题",text:"告别生活,畅享便携生活",imgData:""},{linkObj:{selsectValue:"",selectName:"",typeText:"",url:""},isShow:!0,title:"图文标题",describe:"告别生活,畅享便携生活",imgData:""}]}},{title:"图文导航",iconClass:"icon-tuwendaohang",type:"imageTextNav",componentContent:{imgTextData:[{linkObj:{selsectValue:"",selectName:"",typeText:"",url:""},title:"标题",img:""},{linkObj:{selsectValue:"",selectName:"",typeText:"",url:""},title:"标题",img:""},{linkObj:{selsectValue:"",selectName:"",typeText:"",url:""},title:"标题",img:""}]}},{title:"铺助分割",iconClass:"icon-fuzhufenge",type:"assistDiv",componentContent:{height:20,bgColor:"#ffffff"}},{title:"自定义",iconClass:"icon-mofang1",type:"custom",componentContent:{layoutType:"L1",density:"4",maxH:0,imgClearance:0,pageSpacing:0,averageBoxData:[],imgBoxActive:0,elementNum:1,imgData:[{src:"",linkObj:{selsectValue:"",selectName:"",typeText:"",url:""}},{src:"",linkObj:{selsectValue:"",selectName:"",typeText:"",url:""}}]}},{title:"视频",iconClass:"icon-shipin",type:"videoBox",componentContent:{title:"标题",mainBody:"描述",coverImg:""}},{title:"直播",iconClass:"icon-zhibo",onlyAdmin:!0,onlyWeixin:!0,type:"live",componentContent:{showMore:!1}}]},{title:"商品组件",type:1,classList:[{title:"商品列表",iconClass:"icon-shangpin",type:"productList",componentContent:{title:"商品列表",productData:{sourceType:"1",categoryId:0,categoryName:"",imgTextData:[],productIdList:[]},productRowNum:1,productNum:4,arrangeType:"多行多列",showMore:!1,styleValue:"1",linkObj:{selsectValue:"",selectName:"",typeText:"",url:""}}},{title:"类别列表",iconClass:"icon-leibieliebiao",type:"categoryList",componentContent:{title:"类别列表",categoryData:[{id:1,selClassData:[],img:""},{id:2,selClassData:[],img:""},{id:3,selClassData:[],img:""},{id:4,selClassData:[],img:""}],textAlign:"center"}}]},{title:"店铺组件",type:2,classList:[{title:"拼团专区",iconClass:"icon-pintuan1",type:"groupList",componentContent:{productData:{products:[]},productRowNum:1,productNum:4,arrangeType:"多行多列",showMore:!1,styleValue:"1",shopGroupWorkId:""}},{title:"秒杀专区",iconClass:"icon-miaosha1",type:"spikeList",componentContent:{productData:{products:[]},shopSeckillId:""}},{title:"限时折扣",iconClass:"icon-zhekou1",type:"discountList",componentContent:{productData:{},discountId:"",arrangeType:"多行多列",moreBg:""}},{title:"定价捆绑",iconClass:"icon-price",type:"priceList",onlyMerchant:!0,componentContent:{productData:{composeProducts:[]},productRowNum:1,productNum:4,arrangeType:"多行多列",showMore:!1,styleValue:"1",priceId:""}},{title:"会员专区",iconClass:"icon-huiyuan",type:"vip",onlyAdmin:!0,componentContent:{productData:{productIdList:[]},productRowNum:1,productNum:4,arrangeType:"多行多列",showMore:!1,styleValue:"1"}},{title:"优惠券",iconClass:"icon-youhuiquan",type:"coupon",componentContent:{arrangeActiveIndex:2,cardActiveIndex:1,colorActiveIndex:0,selectedCoupon:[]}},{title:"每日上新",iconClass:"icon-new",type:"newProduct",onlyApp:!0,componentContent:{productData:{sourceType:"1",imgTextData:[],productIdList:[]},showMore:!1,styleValue:"1",linkObj:{selsectValue:"",selectName:"",typeText:"",url:""}}},{title:"每日好店",iconClass:"icon-toubu",type:"shop",onlyApp:!0,componentContent:{imgTextData:[{linkObj:{selsectValue:"",selectName:"",typeText:"",url:""},img:""}]}}]}]),B=V,R={name:"panel",components:{draggable:L.a},data:function(){return{sidebarShow:!0,componentActive:0,componentList:["组件","组件"],panelList:B,isHover:""}},methods:{hoverItem:function(e){this.isHover=e.title},hoverItemOut:function(){this.isHover=""},cloneItem:function(e){return JSON.parse(JSON.stringify(e))}},computed:Object(P["a"])(Object(P["a"])({},Object(D["b"])(["terminal","typeId"])),{},{panelShowList:function(){var e=this,n=JSON.parse(JSON.stringify(this.panelList)),t=n.filter((function(n){var t=n.classList.filter((function(n){return console.log(n.title,!(n.onlyApp&&4==e.terminal),!(n.onlyAdmin&&3==e.typeId),!(n.onlyMerchant&&1==e.typeId)),!(n.onlyApp&&4==e.terminal)&&!(n.onlyWeixin&&[2,3,4].includes(e.terminal))&&!(n.onlyAdmin&&3==e.typeId)&&!(n.onlyMerchant&&1==e.typeId)}));return n.classList=t,n}));return console.log(this.panelList),t}})},$=R,U=(t("86ee"),Object(r["a"])($,_,M,!1,null,"5d10930a",null)),W=U.exports,F=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"toolWarp"},[t("div",{staticClass:"toolPanel"},[t(e.componentMap.get(e.activeComponent.type),{tag:"component"})],1)])},G=[],J=new Map([["header",function(){return t.e("chunk-369a6eb0").then(t.bind(null,"af4b"))}],["banner",function(){return Promise.all([t.e("chunk-67d18f4c"),t.e("chunk-4aca53f0"),t.e("chunk-90022852")]).then(t.bind(null,"fcf2"))}],["text",function(){return Promise.all([t.e("chunk-4aca53f0"),t.e("chunk-1b2cd68c")]).then(t.bind(null,"5c72"))}],["videoBox",function(){return Promise.all([t.e("chunk-3052b5c2"),t.e("chunk-7d21141d"),t.e("chunk-c38f08da")]).then(t.bind(null,"3853"))}],["imageText",function(){return Promise.all([t.e("chunk-3052b5c2"),t.e("chunk-4aca53f0"),t.e("chunk-23aff0af")]).then(t.bind(null,"fb97"))}],["imageTextNav",function(){return Promise.all([t.e("chunk-4aca53f0"),t.e("chunk-793f89bd")]).then(t.bind(null,"a6ed"))}],["assistDiv",function(){return t.e("chunk-22d7e6e6").then(t.bind(null,"0ab9"))}],["custom",function(){return Promise.all([t.e("chunk-67d18f4c"),t.e("chunk-4aca53f0"),t.e("chunk-66732ac2")]).then(t.bind(null,"c83c"))}],["brandList",function(){return Promise.all([t.e("chunk-67d18f4c"),t.e("chunk-4aca53f0"),t.e("chunk-f1f23c4e")]).then(t.bind(null,"3e5e"))}],["imageTextList",function(){return Promise.all([t.e("chunk-4aca53f0"),t.e("chunk-3d8cc7ff")]).then(t.bind(null,"55db"))}],["notice",function(){return t.e("chunk-7a85137e").then(t.bind(null,"9ee7"))}],["coupon",function(){return t.e("chunk-8eaa345c").then(t.bind(null,"2e4c"))}],["categoryList",function(){return t.e("chunk-14445430").then(t.bind(null,"82e8"))}],["productList",function(){return Promise.all([t.e("chunk-67d18f4c"),t.e("chunk-4aca53f0"),t.e("chunk-a90e45fa"),t.e("chunk-0cfb9570")]).then(t.bind(null,"43aa"))}],["groupList",function(){return Promise.all([t.e("chunk-4aca53f0"),t.e("chunk-96c03b36")]).then(t.bind(null,"8330"))}],["spikeList",function(){return Promise.all([t.e("chunk-4aca53f0"),t.e("chunk-bd110c2e")]).then(t.bind(null,"3dd4"))}],["priceList",function(){return Promise.all([t.e("chunk-4aca53f0"),t.e("chunk-8d78867a")]).then(t.bind(null,"2f25"))}],["discountList",function(){return Promise.all([t.e("chunk-4aca53f0"),t.e("chunk-34fe86c7")]).then(t.bind(null,"1689"))}],["vip",function(){return Promise.all([t.e("chunk-67d18f4c"),t.e("chunk-4aca53f0"),t.e("chunk-a90e45fa"),t.e("chunk-5543c222")]).then(t.bind(null,"630e"))}],["newProduct",function(){return Promise.all([t.e("chunk-67d18f4c"),t.e("chunk-4aca53f0"),t.e("chunk-a90e45fa"),t.e("chunk-71d56a02")]).then(t.bind(null,"d2a6"))}],["live",function(){return t.e("chunk-f91bf0e2").then(t.bind(null,"f9db"))}],["shop",function(){return Promise.all([t.e("chunk-4aca53f0"),t.e("chunk-70e9c263")]).then(t.bind(null,"7b45"))}]]),q=J,z={name:"toolPanel",data:function(){return{componentMap:q}},computed:Object(P["a"])({},Object(D["b"])(["activeComponent","typeId"]))},H=z,X=(t("8d3b"),Object(r["a"])(H,F,G,!1,null,"4f3255da",null)),K=X.exports,Y=t("a78e"),Q=t.n(Y),Z={name:"canvasContainer",mixins:[k["b"]],components:{CereshopLayout:j,leftBar:W,toolPanel:K},data:function(){return{comChoose:!1,deviceList:[{id:1,name:"xiaochengxu"},{id:2,name:"h5"},{id:4,name:"pc"},{id:3,name:"app"}],canvasId:"",shopId:0}},computed:Object(P["a"])({},Object(D["b"])(["terminal","componentsData","typeId"])),mounted:function(){this.shopId=parseInt(Q.a.get("cereShopId")),this.canvasGet()},methods:Object(P["a"])(Object(P["a"])({},Object(D["c"])({setTerminal:"SET_TERMINAL",setActiveComponent:"SET_ACTIVECOMPONENT",setComponentsData:"SET_COMPONENTSDATA"})),{},{toggleDevice:function(e){this.setActiveComponent({}),this.setTerminal(e),this.canvasGet()},canvasSave:function(){for(var e=this,n=JSON.parse(JSON.stringify(this.componentsData)),t=0;t<n.length;t++)delete n[t].iconClass,"productList"===n[t].type&&(n[t].componentContent.productData.imgTextData=[]);var a={terminal:this.terminal,json:JSON.stringify(n)};this.canvasId&&(a.canvasId=this.canvasId),this.shopId&&3==this.typeId&&(a.shopId=this.shopId),a.type=this.typeId,console.log(a);var o={url:g["a"].saveCanvas,method:"POST",data:a};this.sendReq(o,(function(n){n.message?e.$message.error(n.message):e.$message({message:"保存成功!",type:"success"})}))},canvasGet:function(){var e=this;this.setComponentsData([]);var n=g["a"].getCanvas+"?terminal="+this.terminal+"&type="+this.typeId;this.shopId&&3==this.typeId&&(n+="&shopId="+this.shopId);var t={url:n,method:"GET"};this.sendReq(t,(function(n){if("undefined"!==typeof uni?uni.setStorage({key:"sendNum",data:0}):localStorage.setItem("sendNum",0),"{}"!==JSON.stringify(n.data)){e.canvasId=n.data.canvasId;for(var t=JSON.parse(n.data.json),a=0;a<t.length;a++)t[a].componentContent.hasDatas=!0;e.setComponentsData(t)}else e.canvasId=""}),(function(e){}))},showRightBox:function(e){this.comChoose=e}})},ee=Z,ne=(t("9366"),Object(r["a"])(ee,E,A,!1,null,"038d0ad4",null)),te=ne.exports;o["default"].use(p["a"]);var ae,oe=new p["a"]({routes:[{path:"/canvasShowPage",name:"canvasShowPage",component:N},{path:"/canvasEditPage",name:"canvasEditPage",component:j},{path:"/",name:"canvasContainer",component:te}]}),ie=oe,ce=function(e){return e.terminal},ue=function(e){return e.activeComponent},se=function(e){return e.componentsData},re=function(e){return e.typeId},le=function(e){return e.couponNum},de=function(e){return e.discountNum},pe=function(e){return e.groupNum},he=function(e){return e.newProductNum},me=function(e){return e.priceNum},fe=function(e){return e.productNum},be=function(e){return e.spikeNum},ge=t("a446"),ke={terminal:ge["a"].terminal,activeComponent:{},componentsData:[],typeId:ge["a"].typeId,couponNum:0,discountNum:0,groupNum:0,newProductNum:0,priceNum:0,productNum:0,spikeNum:0},ve=ke,ye=t("ade3"),Ce="SET_TERMINAL",Ne="SET_ACTIVECOMPONENT",Ie="SET_COMPONENTSDATA",xe="SET_TYPEID",Pe="SET_COUPONNUM",Te="SET_DISCOUNTNUM",Le="SET_GROUPNUM",De="SET_NEWPRODUCTNUM",we="SET_PRICENUM",Oe="SET_PRODUCTNUM",Se="SET_SPIKENUM",je=(ae={},Object(ye["a"])(Object(ye["a"])(Object(ye["a"])(Object(ye["a"])(Object(ye["a"])(Object(ye["a"])(Object(ye["a"])(Object(ye["a"])(Object(ye["a"])(Object(ye["a"])(ae,Ce,(function(e,n){e.terminal=n})),Ne,(function(e,n){e.activeComponent=n})),Ie,(function(e,n){e.componentsData=n})),xe,(function(e,n){e.typeId=n})),Pe,(function(e){e.couponNum=e.couponNum+1})),Te,(function(e){e.discountNum=e.discountNum+1})),Le,(function(e){e.groupNum=e.groupNum+1})),De,(function(e){e.newProductNum=e.newProductNum+1})),we,(function(e){e.priceNum=e.priceNum+1})),Oe,(function(e){e.productNum=e.productNum+1})),Object(ye["a"])(ae,Se,(function(e){e.spikeNum=e.spikeNum+1}))),Ee=je;o["default"].use(D["a"]),console.log({getters:a,state:ve,mutations:Ee});var Ae=new D["a"].Store({getters:a,state:ve,mutations:Ee}),_e=(t("f5df1"),t("5c96")),Me=t.n(_e);t("03fc"),t("d156"),t("063a"),t("a7539"),t("8096"),t("14e1");o["default"].use(Me.a),o["default"].prototype.$message=Me.a.Message,o["default"].config.productionTip=!1,new o["default"]({el:"#canvas",router:ie,store:Ae,components:{App:d},template:"<App/>"})},a446:function(e,n,t){"use strict";var a=t("a78e"),o=t.n(a),i={terminal:4,typeId:1,getToken:function(){return o.a.get("cereShopAdminToken")}};n["a"]=i},bf08:function(e,n,t){},d156:function(e,n,t){},d53d:function(e,n,t){},e3ff:function(e,n,t){"use strict";t("184c")},f270:function(e,n,t){"use strict";t.d(n,"a",(function(){return h})),t.d(n,"b",(function(){return m}));var a=t("5530"),o=(t("e9c4"),t("7a32")),i=(t("d3b7"),t("a026")),c=t("bc3a"),u=t.n(c),s=t("a446"),r=u.a.create({headers:{"X-Requested-With":"XMLHttpRequest"},withCredentials:!0,timeout:2e4});r.interceptors.request.use((function(e){var n=s["a"].getToken();return n&&(1===s["a"].typeId?e.headers["Authorization-admin"]=n:3===s["a"].typeId?e.headers["Authorization-business"]=n:e.headers["Authorization"]=n),e}),(function(e){return Promise.reject(e)})),r.interceptors.response.use((function(e){return e.data.code&&"200"!==e.data.code&&e.data.message&&i["default"].prototype.$message.error(e.data.message),e}),(function(e){if(e&&e.response){switch(e.response.status){case 400:e.message="请求无效,请检查参数是否正确!";break;case 401:e.message="未经授权,访问被拒!";break;case 403:e.message="拒绝访问!";break;case 404:e.message="地址不存在!";break;case 408:e.message="请求超时!";break;case 500:e.message="系统错误!";break;case 501:e.message="该方法未实现!";break;case 502:e.message="网关出错!";break;case 503:e.message="服务不可用!";break;case 504:e.message="网关请求超时";break;case 505:e.message="HTTP版本不受支持";break;default:}e.response.data.error&&(e.message=e.response.data.error),i["default"].prototype.$message.closeAll(),i["default"].prototype.$message.error(e.message)}return Promise.reject(e)}));var l=r,d={data:function(){return{loading:!1}},methods:{sendReq:function(e,n,t){l({method:e.method||"POST",url:e.url,data:e.data||{},withCredentials:!0,headers:{"Content-type":e.contentType||"application/json;charset=utf-8"}}).then((function(e){e&&e.data&&n&&n(e.data)})).catch((function(e){e&&t&&t(e)}))}}},p={mixins:[d],props:{isNoData:{type:Boolean,default:!1}},methods:{beforeGetData:function(){if("undefined"!==typeof uni)uni.getStorage({key:"sendNum",success:function(e){var n=e.data;console.log("sendNum",parseInt(n)+1),uni.setStorage({key:"sendNum",data:parseInt(n)+1}),this.$emit("cleckLoading")}});else{var e=localStorage.getItem("sendNum");console.log("sendNum",parseInt(e)+1),localStorage.setItem("sendNum",parseInt(e)+1),this.$emit("cleckLoading")}},afterGetData:function(){if("undefined"!==typeof uni)uni.getStorage({key:"sendNum",success:function(e){var n=e.data;console.log("sendNum",parseInt(n)-1),uni.setStorage({key:"sendNum",data:parseInt(n)-1}),this.$emit("cleckLoading")}});else{var e=localStorage.getItem("sendNum");console.log("sendNum",parseInt(e)-1),localStorage.setItem("sendNum",parseInt(e)-1),this.$emit("cleckLoading")}},jumpLink:function(e){var n="";if(e&&e.typeText&&e.data)switch(e.typeText){case"类别":router.push({name:"category",query:{classifyData:JSON.stringify(e.data)}});break;case"店辅":router.push({path:"/store",query:{shopId:e.data.shopId}});break;case"商品":this.setCurrentPro(e.data),router.push("/productDetail");break;case"自定义":break}else"/index"===e.selsectValue&&router.push("/index");return n},jumpCategory:function(e){},jumpStore:function(e){},jumpProductDetail:function(e){},jumpSeckills:function(e){},jumpGroupWorks:function(e){},jumpDiscount:function(e){},jumpVip:function(){},jumpNoticeDetail:function(e){},receiveCoupon:function(e){var n=this,t=s["a"].getToken();if(t){var a={};1===this.typeId?a.couponId=e.couponId:3===this.typeId&&(a.shopCouponId=e.shopCouponId,a.shopId=this.shopId);var i={url:o["a"].takeCoupon,method:"POST",data:a};this.sendReq(i,(function(e){n.$message({message:"领取成功!",type:"success"}),n.getData()}))}else this.$message({message:"请先登录"}),this.$router.push({path:"/login"})},addCart:function(e){console.log(e)}}},h=Object(a["a"])({},p),m=Object(a["a"])({},d)}},[[1,"runtime","chunk-elementUI","chunk-libs"]]]);