shop_mer_admin/mer/js/chunk-0d279611.8e27e3d3.js

1 line
13 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0d279611"],{"0116":function(t,e,i){"use strict";i("c8fd")},a7a4:function(t,e,i){"use strict";i.d(e,"a",(function(){return r})),i.d(e,"k",(function(){return a})),i.d(e,"b",(function(){return s})),i.d(e,"e",(function(){return o})),i.d(e,"d",(function(){return c})),i.d(e,"f",(function(){return u})),i.d(e,"g",(function(){return l})),i.d(e,"j",(function(){return d})),i.d(e,"h",(function(){return m})),i.d(e,"c",(function(){return f})),i.d(e,"i",(function(){return g})),i.d(e,"l",(function(){return p})),i.d(e,"o",(function(){return v})),i.d(e,"m",(function(){return h})),i.d(e,"n",(function(){return y})),i.d(e,"p",(function(){return w}));var n=i("0c6d");function r(t){return n["a"].get("config/".concat(t))}function a(){return n["a"].get("delivery/station/business")}function s(t){return n["a"].post("delivery/station/create",t)}function o(t){return n["a"].get("delivery/station/lst",t)}function c(t){return n["a"].get("delivery/station/detail/".concat(t))}function u(t){return n["a"].get("delivery/station/mark/".concat(t,"/form"))}function l(t,e){return n["a"].post("delivery/station/status/".concat(t),e)}function d(){return n["a"].get("config")}function m(t,e){return n["a"].post("delivery/station/update/".concat(t),e)}function f(t){return n["a"].delete("delivery/station/delete/".concat(t))}function g(){return n["a"].get("delivery/station/getCity")}function p(t){return n["a"].post("service/reply/create",t)}function v(t,e){return n["a"].get("service/reply/list",{page:t,limit:e})}function h(t){return n["a"].delete("service/reply/delete/".concat(t))}function y(t,e){return n["a"].post("service/reply/update/".concat(t),e)}function w(t,e){return n["a"].post("service/reply/status/".concat(t),{status:e})}},c8fd:function(t,e,i){},f478:function(t,e,i){"use strict";i.d(e,"f",(function(){return r})),i.d(e,"e",(function(){return a})),i.d(e,"d",(function(){return s})),i.d(e,"m",(function(){return o})),i.d(e,"c",(function(){return c})),i.d(e,"b",(function(){return u})),i.d(e,"l",(function(){return l})),i.d(e,"k",(function(){return d})),i.d(e,"h",(function(){return m})),i.d(e,"g",(function(){return f})),i.d(e,"i",(function(){return g})),i.d(e,"j",(function(){return p})),i.d(e,"a",(function(){return v}));var n=i("0c6d");function r(t){return n["a"].get("diy/product/lst",t)}function a(t,e){return n["a"].post("diy/create/".concat(t),e)}function s(t){return n["a"].get("diy/lst",t)}function o(t){return n["a"].get("diy/default_lst",t)}function c(t){return n["a"].get("diy/detail/".concat(t))}function u(t,e){return n["a"].delete("diy/delete/".concat(t),e)}function l(t){return n["a"].post("diy/status/".concat(t))}function d(t){return n["a"].get("diy/recovery/".concat(t))}function m(t){return n["a"].get("diy/link/lst",t)}function f(t){return n["a"].get("diy/review/".concat(t))}function g(){return n["a"].get("diy/categroy/options")}function p(t,e){return n["a"].get("diy/link/getLinks/".concat(t),e)}function v(t){return n["a"].get("diy/copy/".concat(t))}},f672:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"divBox"},[i("div",{staticClass:"ivu-mt box-wrapper"},[i("div",{staticClass:"right-wrapper"},[0==t.cardShow?i("el-card",[0==t.cardShow?i("div",{staticClass:"acea-row"},[t.isDiy?i("div",{staticStyle:{width:"310px",height:"550px","margin-right":"40px",position:"relative"}},[i("iframe",{ref:"iframe",staticClass:"iframe-box",attrs:{src:t.imgUrl,frameborder:"0"}})]):t._e(),t._v(" "),i("div",{class:t.isDiy?"table":""},[i("div",{staticClass:"acea-row row-between-wrapper"},[i("div",[i("div",[i("div",{staticClass:"acea-row row-between-wrapper"},[i("div",{staticClass:"button acea-row row-middle"},[i("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.add}},[i("i",{staticClass:"el-icon-plus",staticStyle:{"margin-right":"4px"}}),t._v("添加")]),t._v(" "),i("el-button",{attrs:{type:"success",size:"small"},on:{click:t.getTemplate}},[t._v("使用模板")])],1),t._v(" "),i("div",{staticStyle:{color:"#F56464","font-size":"13px"}},[t._v("  注:初次进入该页面,可点击[添加]创建店铺首页模板,也可点击[使用模板],选择使用平台创建的店铺模板。")])])])])]),t._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",staticClass:"tables",attrs:{data:t.list,"highlight-current-row":"",size:"small"}},[i("el-table-column",{attrs:{prop:"id",label:"页面ID","min-width":"50"}}),t._v(" "),i("el-table-column",{attrs:{prop:"name",label:"模板名称","min-width":"180"}}),t._v(" "),i("el-table-column",{attrs:{prop:"add_time",label:"添加时间","min-width":"100"}}),t._v(" "),i("el-table-column",{attrs:{prop:"update_time",label:"更新时间","min-width":"100"}}),t._v(" "),i("el-table-column",{attrs:{label:"操作","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[(e.row.status||e.row.is_diy)&&0==e.row.is_default?i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return t.edit(e.row)}}},[t._v("编辑")]):t._e(),t._v(" "),1!=e.row.id&&e.row.is_diy&&0==e.row.is_default?i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return t.del(e.row.id,e.$index)}}},[t._v("删除")]):t._e(),t._v(" "),1!=e.row.status?i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return t.setStatus(e.row,e.$index)}}},[t._v("设为首页")]):t._e(),t._v(" "),e.row.status||e.row.is_diy?i("el-button",{staticClass:"copy-data",attrs:{type:"text",size:"small"},on:{click:function(i){return t.preview(e.row)}}},[t._v("预览")]):t._e(),t._v(" "),e.row.is_diy?t._e():i("div",{staticStyle:{display:"inline-block"}},[i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return t.recovery(e.row,e.$index)}}},[t._v("恢复初始设置")]),t._v(" "),i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return t.del(e.row,e.$index)}}},[t._v("删除")])],1),t._v(" "),e.row.status||e.row.is_diy?i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return t.onDiyCopy(e.row)}}},[t._v("复制")]):t._e()]}}],null,!1,4114588722)})],1),t._v(" "),i("div",{staticClass:"block"},[i("el-pagination",{attrs:{background:"","page-size":t.diyFrom.limit,"current-page":t.diyFrom.page,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)]):t._e()]):t._e()],1)]),t._v(" "),i("el-dialog",{attrs:{visible:t.modal,title:"店铺装修模板(平台创建)"},on:{"update:visible":function(e){t.modal=e}}},[i("div",[i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.sysLoading,expression:"sysLoading"}],ref:"sysTable",attrs:{data:t.sysList,"highlight-current-row":"",size:"mini"}},[i("el-table-column",{attrs:{prop:"id",label:"页面ID","min-width":"80"}}),t._v(" "),i("el-table-column",{attrs:{prop:"name",label:"模板名称","min-width":"120"}}),t._v(" "),i("el-table-column",{attrs:{prop:"add_time",label:"添加时间","min-width":"120"}}),t._v(" "),i("el-table-column",{attrs:{prop:"update_time",label:"更新时间","min-width":"120"}}),t._v(" "),i("el-table-column",{attrs:{label:"操作","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return t.onDiyCopy(e.row,e.$index)}}},[t._v("选择模板")]),t._v(" "),i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return t.onPreview(e.row)}}},[t._v("预览")])]}}])})],1),t._v(" "),i("div",{staticClass:"block"},[i("el-pagination",{attrs:{"page-size":t.sysFrom.limit,"current-page":t.sysFrom.page,layout:"prev, pager, next, jumper",total:t.sysTotal},on:{"size-change":t.sysSizeChange,"current-change":t.sysPageChange}})],1)],1)]),t._v(" "),i("el-dialog",{attrs:{visible:t.previewModal,width:"520px","custom-class":"customClass",title:"预览"},on:{"update:visible":function(e){t.previewModal=e}}},[i("div",[i("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"acea-row row-around code"},[i("div",{staticClass:"acea-row row-column-around row-between-wrapper"},[i("div",{ref:"qrCodeUrl",staticClass:"QRpic"}),t._v(" "),i("span",{staticClass:"mt10"},[t._v("公众号二维码")])]),t._v(" "),i("div",{staticClass:"acea-row row-column-around row-between-wrapper"},[i("div",{staticClass:"QRpic"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.qrcodeImg,expression:"qrcodeImg"}]})]),t._v(" "),i("span",{staticClass:"mt10"},[t._v("小程序二维码")])])])])])],1)},r=[],a=i("c7eb"),s=(i("96cf"),i("1da1")),o=i("5530"),c=i("bbcc"),u=i("83d6"),l=i("f478"),d=i("d044"),m=i.n(d),f=i("a7a4"),g=i("2f62"),p={name:"devise_list",computed:Object(o["a"])({},Object(g["d"])("layout",["menuCollapse"])),components:{},data:function(){return{grid:{sm:10,md:12,lg:19},loading:!1,sysLoading:!1,theme3:"light",roterPre:u["roterPre"],list:[],sysList:[],imgUrl:"",modal:!1,previewModal:!1,BaseURL:c["a"].httpUrl||"http://localhost:8080",cardShow:0,loadingExist:!1,isDiy:1,qrcodeImg:"",diyFrom:{page:1,limit:10},sysFrom:{page:1,limit:20},total:0,sysTotal:0,mer_id:"",isPreview:!1}},created:function(){this.getMerId(),this.getList()},mounted:function(){},methods:{getChildData:function(t){this.loadingExist=t},getMerId:function(){var t=this,e=window.localStorage;this.imgUrl=e.getItem("imgUrl"),Object(f["j"])().then((function(i){t.mer_id=i.data.mer_id;var n=1e3*(new Date).getTime(),r="".concat(t.BaseURL,"/pages/store/home/index?id=").concat(t.mer_id,"&inner_frame=1&time=").concat(n);e.setItem("imgUrl",r),t.imgUrl=r})).catch((function(e){t.$message.error(e.message)}))},onCopy:function(){this.$message.success("复制预览链接成功")},onError:function(){this.$mssage.error("复制预览链接失败")},onPreview:function(t){var e=this;this.previewModal=!0,this.$nextTick((function(){e.creatQrCode(t.id,t.status),e.routineCode(t.id)}))},creatQrCode:function(t,e){this.$refs.qrCodeUrl.innerHTML="";var i="",n=1e3*(new Date).getTime();i="".concat(this.BaseURL,"/pages/admin/storeDiy/index?inner_frame=1&time=").concat(n,"&id=").concat(this.mer_id,"&diy_id=").concat(t);new m.a(this.$refs.qrCodeUrl,{text:i,width:160,height:160,colorDark:"#000000",colorLight:"#ffffff",correctLevel:m.a.CorrectLevel.H})},routineCode:function(t){var e=this;Object(l["g"])(t).then((function(t){e.qrcodeImg=t.data.image})).catch((function(t){e.$message.error(t)}))},preview:function(t){this.isPreview=!0;var e=1e3*(new Date).getTime(),i="".concat(this.BaseURL,"/pages/admin/storeDiy/index?id=").concat(this.mer_id,"&diy_id=").concat(t.id,"&inner_frame=1&time=").concat(e);this.imgUrl=i},getList:function(){var t=this;this.loading=!0,Object(l["d"])(this.diyFrom).then((function(e){t.loading=!1;var i=e.data;t.list=i.list,t.total=i.count}))},getTemplate:function(){this.modal=!0,this.diyFrom.page=1,this.getSysList()},getSysList:function(){var t=this;this.sysLoading=!0,Object(l["m"])(this.sysFrom).then((function(e){t.sysLoading=!1;var i=e.data;t.sysList=i.list,t.sysTotal=i.count})).catch((function(e){t.$message.error(e),t.sysLoading=!1}))},pageChange:function(t){this.diyFrom.page=t,this.getList()},handleSizeChange:function(t){this.diyFrom.limit=t,this.getList()},sysSizeChange:function(t){this.sysFrom.limit=t,this.getSysList()},sysPageChange:function(t){this.sysFrom.page=t,this.getSysList()},edit:function(t){this.$router.push({path:"".concat(u["roterPre"],"/devise/diy/index"),query:{id:t.id,name:t.template_name||"moren"}})},add:function(){this.$router.push({path:"".concat(u["roterPre"],"/devise/diy/index"),query:{id:0,name:"首页",types:1}})},del:function(t,e){var i=this;this.$modalSure("删除模板吗").then((function(){Object(l["b"])(t).then((function(t){var e=t.message;i.$message.success(e),i.getList()})).catch((function(t){var e=t.message;i.$message.error(e)}))}))},setStatus:function(){var t=Object(s["a"])(Object(a["a"])().mark((function t(e){var i,n=this;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:i=this,i.$modalSure("把该模板设为首页").then((function(){Object(l["l"])(e.id).then((function(t){i.$message.success(t.message);var r=1e3*(new Date).getTime(),a="".concat(n.BaseURL,"/pages/admin/storeDiy/index?id=").concat(n.mer_id,"&diy_id=").concat(e.id,"&inner_frame=1&time=").concat(r);i.imgUrl=a,i.getList()})).catch((function(t){i.$message.error(t.message)}))}));case 2:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),recovery:function(t){var e=this;Object(l["k"])(t.id).then((function(t){e.$message.success(t.message),e.getList()}))},onDiyCopy:function(t){var e=this;Object(l["a"])(t.id).then((function(t){e.modal=!1,e.$message.success(t.message),e.getList()})).catch((function(t){e.$message.error(t.message)}))}}},v=p,h=(i("0116"),i("2877")),y=Object(h["a"])(v,n,r,!1,null,"6032ceac",null);e["default"]=y.exports}}]);