(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=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"})},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"]]]);