| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([[58],{1691:function(e,t,a){"use strict";a.r(t);var n=a(1747),o=a(592),i=a.n(o),s=[{title:"ID",dataIndex:"id",key:"id"},{title:"上次修改时间",dataIndex:"updated_at",key:"updated_at"},{title:"页面名称",dataIndex:"page_name",key:"page_name"},{title:"显示终端",dataIndex:"page_sort_depict",key:"page_sort_depict"},{title:"页面类型",dataIndex:"page_type",key:"page_type",scopedSlots:{customRender:"tags"}},{title:"操作",key:"action",scopedSlots:{customRender:"action"},width:250}],r={data:function(){return{columns:s,page_name:"",page_sort:"",page_scene:"1",mouse_hover_id:"",visible:!1,current_page_sort:"1",current_page_scene:"1",previewVisible:!1,previewData:{},loading:!1,main_page_list:[],main_page_pagination:{current:1,pageSize:10,total:0}}},components:{layoutPreview:n.a},computed:{},created:function(){this.currentChange(1)},methods:{copy:function(e){this.$message.success("复制链接成功")},onError:function(e){this.$message.error("复制失败")},choose:function(e,t){"page"===t?this.current_page_scene=e:this.current_page_sort=e},toPage:function(e){var t=window.location.href.substring(0,window.location.href.indexOf("route="));window.location.href=t+"route=plugin.store-decorate.admin.page.detail&store_id="+this.fun.getKey("store_id")+"&i="+this.fun.getKeyByI()+"#/store_design?page_id="+e.id+"&page_sort="+e.page_sort+"&page_scene=1"},showModal:function(){this.visible=!0},handleOk:function(e){var t=window.location.href.substring(0,window.location.href.indexOf("route="));window.location.href=t+"route=plugin.store-decorate.admin.page.detail&store_id="+this.fun.getKey("store_id")+"&i="+this.fun.getKeyByI()+"#/store_design?page_sort="+this.current_page_sort+"&page_scene="+this.current_page_scene,this.visible=!1},mouseenter:function(e){this.mouse_hover_id=e},onChange:function(e,t){var a=this;"0"===e[e.length-1]?t.page_type=["0"]:e.includes("0")?t.page_type=e.filter((function(e){return"0"!==e})):t.page_type=e,e.length<=0&&(t.page_type=["0"]),$http.post("plugin.store-decorate.admin.store-decorate.edit-decorate-type",{decorate_id:t.id,page_type:t.page_type.join(",")},"loading").then((function(e){1===e.result&&a.currentChange(a.main_page_pagination.current)})).catch((function(e){console.log(e)}))},handleChange:function(e){this.currentChange(1)},currentChange:function(e){var t=this;this.main_page_pagination.current=e,$http.post("plugin.store-decorate.admin.store-decorate.get-list",{page:e,page_name:this.page_name,page_sort:this.page_sort,page_scene:this.page_scene},"loading").then((function(e){1===e.result?(t.main_page_pagination.total=e.data.total,t.main_page_pagination.pageSize=e.data.per_page,t.main_page_list=e.data.data):(t.main_page_list=[],-1===e.data.status&&t.currentChange(1))})).catch((function(e){console.error(e)}))},deleteIt:function(e){var t=this;this.$confirm({title:"确认删除该装修页面?",onOk:function(){$http.post("plugin.store-decorate.admin.store-decorate.del",{id:e},"loading").then((function(e){1===e.result?(t.currentChange(t.main_page_pagination.current),t.$message.success("删除成功")):e.msg&&t.$message.error(e.msg)})).catch((function(e){console.log(e)}))}})},copyIt:function(e){var t=this;$http.post("plugin.store-decorate.admin.store-decorate.copy-page",{id:e},"loading").then((function(e){1===e.result?(t.currentChange(t.main_page_pagination.current),t.$message.success("复制成功")):e.msg&&t.$message.error(e.msg)})).catch((function(e){console.log(e)}))},previewIt:function(e){var t=this;$http.post("plugin.store-decorate.admin.store-decorate.get-decorate",{decorate_id:e},"loading").then((function(e){1===e.result?(t.previewData=JSON.parse(e.data.datas).map((function(e){return new i.a({id:e.id,component_key:e.component_key,component_title:e.component_title,template_id:e.template_id,remote_data:e.remote_data,remote_style:{}})})),t.previewVisible=!0):(t.previewVisible=!1,e.msg&&t.$message.error(e.msg))})).catch((function(e){console.log(e)}))},close:function(){this.previewVisible=!1}}},c=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"page-activity"}},[a("div",{staticClass:"page-head"},[a("a-select",{staticStyle:{width:"25%","margin-left":"5%"},on:{change:e.handleChange},model:{value:e.page_sort,callback:function(t){e.page_sort=t},expression:"page_sort"}},[a("a-select-option",{attrs:{value:""}},[e._v("\n 页面类型\n ")]),e._v(" "),a("a-select-option",{attrs:{value:"1"}},[e._v("\n H5\n ")]),e._v(" "),a("a-select-option",{attrs:{value:"2"}},[e._v("\n 微信小程序\n ")])],1),e._v(" "),a("a-input",{staticStyle:{width:"30%","margin-left":"5%"},attrs:{placeholder:"请输入页面名称进行搜索"},model:{value:e.page_name,callback:function(t){e.page_name="string"==typeof t?t.trim():t},expression:"page_name"}},[a("a-icon",{attrs:{slot:"prefix",type:"search"},slot:"prefix"})],1),e._v(" "),a("a-button",{staticStyle:{width:"10%","margin-left":"5%"},attrs:{type:"primary"},on:{click:function(t){return e.currentChange(1)}}},[e._v("\n 搜索\n ")])],1),e._v(" "),a("div",{staticClass:"page-content"},[a("div",{staticClass:"content-head"},[a("div",{staticClass:"left"},[e._v("\n 页面总数: "+e._s(e.main_page_pagination.total)+"\n ")]),e._v(" "),a("div",{attrs:{content:"right"}},[a("a-button",{staticStyle:{"margin-right":"10px"},attrs:{icon:"plus"},on:{click:e.showModal}},[e._v("添加页面")]),e._v(" "),a("a-tooltip",[a("template",{slot:"title"},[e._v("\n Tips: 同一类型仅允许设置一个门店默认首页,其他页面为自定义页面\n ")]),e._v(" "),a("a-icon",{staticStyle:{color:"#ff9b19","font-size":"18px"},attrs:{type:"alert"}})],2)],1)]),e._v(" "),a("a-spin",{attrs:{spinning:e.loading}},[a("div",{staticClass:"main-page-list"},[a("div",{staticClass:"table-box"},[a("a-table",{attrs:{pagination:{pageSize:e.main_page_pagination.pageSize,current:e.main_page_pagination.current,total:e.main_page_pagination.total,showQuickJumper:!0,onChange:e.currentChange},columns:e.columns,"data-source":e.main_page_list,rowKey:function(e){return e.id}},scopedSlots:e._u([{key:"tags",fn:function(t,n){return a("span",{staticClass:"type-box",on:{mouseenter:function(t){return e.mouseenter(n.id)}}},[a("a-tooltip",{directives:[{name:"show",rawName:"v-show",value:n.page_type.includes("5"),expression:"record.page_type.includes('5')"}]},[a("template",{slot:"title"},[e._v("\n wap\n ")]),e._v(" "),a("i",{staticClass:"iconfont icon-ht_btn_wap",staticStyle:{color:"#5f20fe"}})],2),e._v(" "),a("a-tooltip",{directives:[{name:"show",rawName:"v-show",value:n.page_type.includes("4"),expression:"record.page_type.includes('4')"}]},[a("template",{slot:"title"},[e._v("\n 支付宝\n ")]),e._v(" "),a("i",{staticClass:"iconfont icon-ht_btn_alipay",staticStyle:{color:"#4184ff"}})],2),e._v(" "),a("a-tooltip",{directives:[{name:"show",rawName:"v-show",value:n.page_type.includes("3"),expression:"record.page_type.includes('3')"}]},[a("template",{slot:"title"},[e._v("\n APP\n ")]),e._v(" "),a("i",{staticClass:"iconfont icon-ht_btn_app",staticStyle:{color:"#ffa800"}})],2),e._v(" "),a("a-tooltip",{directives:[{name:"show",rawName:"v-show",value:n.page_type.includes("2"),expression:"record.page_type.includes('2')"}]},[a("template",{slot:"title"},[e._v("\n 小程序\n ")]),e._v(" "),a("i",{staticClass:"iconfont icon-ht_btn_smallprogram",staticStyle:{color:"#00dfb9"}})],2),e._v(" "),a("a-tooltip",{directives:[{name:"show",rawName:"v-show",value:n.page_type.includes("1"),expression:"record.page_type.includes('1')"}]},[a("template",{slot:"title"},[e._v("\n 公众号\n ")]),e._v(" "),a("i",{staticClass:"iconfont icon-ht_btn_gongzhonghao",staticStyle:{color:"#29ba9c"}})],2),e._v(" "),a("a-tooltip",{directives:[{name:"show",rawName:"v-show",value:n.page_type.includes("0"),expression:"record.page_type.includes('0')"}]},[a("template",{slot:"title"},[e._v("\n 其他页面\n ")]),e._v(" "),a("i",{staticClass:"iconfont icon-ht_btn_otherpage",staticStyle:{color:"#ff3d38"}})],2),e._v(" "),a("a-popover",[a("template",{slot:"content"},[1==n.page_sort?a("a-checkbox-group",{attrs:{name:"checkboxgroup"},on:{change:function(t){return e.onChange(t,n)}},model:{value:n.page_type,callback:function(t){e.$set(n,"page_type",t)},expression:"record.page_type"}},[a("a-checkbox",{attrs:{value:"1"}},[e._v(" 公众号")]),a("br"),e._v(" "),a("a-checkbox",{attrs:{value:"3"}},[e._v(" APP")]),a("br"),e._v(" "),a("a-checkbox",{attrs:{value:"4"}},[e._v(" 支付宝")]),a("br"),e._v(" "),a("a-checkbox",{attrs:{value:"5"}},[e._v(" wap")]),a("br"),e._v(" "),a("a-checkbox",{attrs:{value:"0"}},[e._v(" 其他页面")])],1):e._e(),e._v(" "),2==n.page_sort?a("a-checkbox-group",{attrs:{name:"checkboxgroup"},on:{change:function(t){return e.onChange(t,n)}},model:{value:n.page_type,callback:function(t){e.$set(n,"page_type",t)},expression:"record.page_type"}},[a("a-checkbox",{attrs:{value:"2"}},[e._v(" 小程序")]),a("br"),e._v(" "),a("a-checkbox",{attrs:{value:"0"}},[e._v(" 其他页面")])],1):e._e()],1),e._v(" "),a("div",{staticStyle:{position:"relative"}},[a("a-icon",{directives:[{name:"show",rawName:"v-show",value:e.mouse_hover_id==n.id,expression:"mouse_hover_id == record.id"}],staticStyle:{color:"#29ba9c",cursor:"pointer","font-size":"18px","margin-top":"3px"},attrs:{type:"form"}})],1)],2)],1)}},{key:"action",fn:function(t,n){return a("span",{staticClass:"edit-box"},[a("a-tooltip",[a("template",{slot:"title"},[e._v("\n 预览\n ")]),e._v(" "),a("i",{staticClass:"iconfont icon-ht_operation_perview",on:{click:function(t){return t.stopPropagation(),e.previewIt(n.id)}}})],2),e._v(" "),a("a-tooltip",[a("template",{slot:"title"},[e._v("\n 编辑\n ")]),e._v(" "),a("i",{staticClass:"iconfont icon-ht_operation_edit",on:{click:function(t){return t.stopPropagation(),e.toPage(n)}}})],2),e._v(" "),a("a-tooltip",[a("template",{slot:"title"},[e._v("\n 复制链接\n ")]),e._v(" "),a("i",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:2==n.page_sort?"/packageG/newDiy/newDiy?page_id="+n.id+"&store_id="+e.fun.getKey("store_id"):e.fun.getSiteRoot()+"/addons/yun_shop/?menu#/newDiy?page_id="+n.id+"&store_id="+e.fun.getKey("store_id")+"&i="+e.fun.getKeyByI(),expression:"`${record.page_sort == 2 ? '/packageG/newDiy/newDiy?page_id='+record.id + '&store_id='+ fun.getKey('store_id') : fun.getSiteRoot()+'/addons/yun_shop/?menu#/newDiy?page_id='+record.id+ '&store_id='+ fun.getKey('store_id') +'&i='+fun.getKeyByI()}`",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:e.copy,expression:"copy",arg:"success"},{name:"clipboard",rawName:"v-clipboard:error",value:e.onError,expression:"onError",arg:"error"}],staticClass:"iconfont icon-ht_operation_copyline"})],2),e._v(" "),a("a-tooltip",[a("template",{slot:"title"},[e._v("\n 复制页面\n ")]),e._v(" "),a("i",{staticClass:"iconfont icon-ht_operation_copypage",on:{click:function(t){return t.stopPropagation(),e.copyIt(n.id)}}})],2),e._v(" "),a("a-tooltip",[a("template",{slot:"title"},[e._v("\n 删除\n ")]),e._v(" "),a("i",{staticClass:"iconfont icon-ht_operation_delete",on:{click:function(t){return t.stopPropagation(),e.deleteIt(n.id)}}})],2)],1)}}])})],1)])])],1),e._v(" "),a("a-modal",{attrs:{width:"800px",title:"预览"},on:{ok:e.close},model:{value:e.previewVisible,callback:function(t){e.previewVisible=t},expression:"previewVisible"}},[a("div",[a("layout-preview",{attrs:{previewData:e.previewData}})],1)]),e._v(" "),a("a-modal",{attrs:{title:"选择页面类型"},on:{ok:e.handleOk},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[a("div",{staticClass:"modal-box"},[a("p",{staticClass:"modal-title"},[e._v("页面类型")]),e._v(" "),a("div",{staticClass:"page-type-box"},[a("span",{class:["1"===e.current_page_sort?"active":""],on:{click:function(t){return e.choose("1")}}},[e._v("H5(含公众号)")]),e._v(" "),a("span",{class:["2"===e.current_page_sort?"active":""],on:{click:function(t){return e.choose("2")}}},[e._v("微信小程序")])])])])],1)};c._withStripped=!0;var p=a(11);var l=function(e){a(2075)},d=Object(p.a)(r,c,[],!1,l,"data-v-625b72aa",null);d.options.__file="src\\views\\home\\store_index.vue";t.default=d.exports},2075:function(e,t,a){var n=a(2076);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);(0,a(19).default)("7487ae42",n,!1,{})},2076:function(e,t,a){(e.exports=a(16)(!1)).push([e.i,'\n#page-activity[data-v-625b72aa] {\n padding: 30px 20px 20px 20px;\n position: relative;\n}\n.page-head[data-v-625b72aa] {\n display: flex;\n}\n.main-page-list[data-v-625b72aa] {\n width: 100%;\n margin-top: 15px;\n}\n.main-page-list .ant-pagination[data-v-625b72aa] {\n text-align: center;\n margin-top: 24px;\n}\n.table-box[data-v-625b72aa] {\n font-weight: bold;\n}\n.content-head[data-v-625b72aa] {\n display: flex;\n margin-top: 15px;\n}\n.content-head .left[data-v-625b72aa] {\n position: relative;\n font-weight: bold;\n font-size: 16px;\n margin-left: 10px;\n display: flex;\n align-self: center;\n justify-self: center;\n flex: 1;\n}\n.content-head .left[data-v-625b72aa]::before {\n content: "";\n width: 5px;\n height: 25px;\n position: absolute;\n top: 0;\n left: -10px;\n background: #29ba9c;\n}\n.content-head .right[data-v-625b72aa] {\n display: flex;\n align-self: center;\n justify-self: center;\n flex: 0 0 100px;\n}\n.edit-box[data-v-625b72aa] {\n display: flex;\n margin-right: 30px;\n}\n.edit-box i[data-v-625b72aa] {\n flex: 1;\n color: #999999;\n margin-left: 15px;\n cursor: pointer;\n}\n.edit-box i[data-v-625b72aa]:hover {\n color: #ffa800;\n}\n.type-box[data-v-625b72aa] {\n display: flex;\n}\n.type-box i[data-v-625b72aa] {\n margin-left: 8px;\n}\n.modal-box[data-v-625b72aa] {\n font-weight: bold;\n margin-top: 10px;\n justify-self: center;\n align-self: center;\n}\n.modal-box .page-type-box[data-v-625b72aa] {\n margin: 10px 0 0 30px;\n display: flex;\n flex-wrap: wrap;\n}\n.modal-box .page-type-box span[data-v-625b72aa] {\n background: white;\n padding: 5px 20px;\n border-radius: 15px;\n cursor: pointer;\n}\n.modal-box .page-type-box .active[data-v-625b72aa] {\n background: #29ba9c;\n color: white;\n padding: 5px 20px;\n border-radius: 15px;\n}\n',""])}}]);
|