(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-51f408d0"],{"797f":function(t,a,e){"use strict";e.d(a,"i",(function(){return l})),e.d(a,"h",(function(){return r})),e.d(a,"g",(function(){return o})),e.d(a,"j",(function(){return u})),e.d(a,"f",(function(){return s})),e.d(a,"n",(function(){return i})),e.d(a,"m",(function(){return c})),e.d(a,"o",(function(){return d})),e.d(a,"k",(function(){return p})),e.d(a,"l",(function(){return h})),e.d(a,"d",(function(){return b})),e.d(a,"c",(function(){return m})),e.d(a,"e",(function(){return f})),e.d(a,"b",(function(){return g})),e.d(a,"a",(function(){return y}));var n=e("6b2d");const l=t=>n.a.get("/banner/list",{params:t}),r=t=>n.a.get("/banner/detail",{params:t}),o=t=>n.a.get("/banner/del",{params:t}),u=t=>n.a.post("/banner/update",t),s=t=>n.a.post("/banner/create",t),i=t=>n.a.get("/nav/list",{params:t}),c=t=>n.a.get("/nav/detail",{params:t}),d=t=>n.a.post("/nav/update",t),p=t=>n.a.post("/nav/create",t),h=t=>n.a.get("/nav/del",{params:t}),b=t=>n.a.get("/appBottomMenu/list",{params:t}),m=t=>n.a.get("/appBottomMenu/details",{params:t}),f=t=>n.a.post("/appBottomMenu/update",t),g=t=>n.a.get("/AppBottomMenu/del",{params:t}),y=t=>n.a.post("/appBottomMenu/create",t)},ea6d:function(t,a,e){"use strict";e.r(a);var n=e("797f"),l={data:()=>({table:{currentPage:1,pageSizes:[10],total:0,data:null},chooseID:"merchant_plugin_index",types:[{label:"商家插件首页",value:"merchant_plugin_index"},{label:"猜你想搜",value:"merchant_plugin_search"}]}),methods:{handleSizeChange(t){},handleCurrentChange(t){},getData(){Object(n.n)({location:this.chooseID}).then(t=>{this.table.total=t.data.length,this.table.data=t.data;for(var a=0;a<this.table.data.length;a++)"web"==this.table.data[a].type&&(this.table.data[a].type="网页"),"app"==this.table.data[a].type&&(this.table.data[a].type="程序");for(a=0;a<t.data.length;a++)t.data[a].status=1==t.data[a].status;if(""!=this.chooseID){var e=[];for(a=0;a<t.data.length;a++)t.data[a].location==this.chooseID&&e.push(t.data[a]);this.table.data=e}})},updateStatus(t,a){Object(n.o)({id:t,status:1==a})},jumpEdit(t){this.$router.push({path:"/application/my/merchant/navEdit",query:{id:t}})},checkType:t=>"index_image"==t?"图片":"index_tab"==t?"按钮":void 0,del(t){this.$confirm("此操作将永久删除该内容, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Object(n.l)({id:t}).then(t=>{this.$message({type:"success",message:"删除成功!"}),this.getData()})}).catch(()=>{})},change(){this.getData()},jumpAdd(){this.$router.push({path:"/application/my/merchant/navAdd",query:{}})}},mounted(){this.getData()}},r=e("2877"),o=Object(r.a)(l,(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{},[e("div",{staticClass:"ls-card m-b-12"},[e("span",{staticStyle:{"margin-right":"10px"}},[t._v("选择位置")]),t._l(t.types,(function(a,n){return e("el-button",{key:n,attrs:{size:"mini",type:t.chooseID==a.value?"danger":"primary"},on:{click:function(e){t.chooseID=a.value,t.getData()}}},[t._v(t._s(a.label))])})),e("el-button",{attrs:{size:"mini",type:"primary"},on:{click:t.jumpAdd}},[t._v("新建")])],2),e("el-table",{staticStyle:{width:"100%"},attrs:{data:null==t.table.data?[]:t.table.data}},[e("el-table-column",{attrs:{prop:"id",label:"ID",width:"80"}}),e("el-table-column",{attrs:{prop:"name",label:"标题"}}),e("el-table-column",{attrs:{label:"图片"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("el-image",{staticStyle:{width:"80px",height:"80px"},attrs:{src:t.row.image}})]}}])}),e("el-table-column",{attrs:{prop:"path",label:"跳转路径"}}),e("el-table-column",{attrs:{prop:"type",label:"跳转的类型"}}),e("el-table-column",{attrs:{label:"显示模式"},scopedSlots:t._u([{key:"default",fn:function(a){return[t._v(" "+t._s(t.checkType(a.row.location))+" ")]}}])}),e("el-table-column",{attrs:{label:"状态"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-switch",{on:{change:function(e){return t.updateStatus(a.row.id,a.row.status)}},model:{value:a.row.status,callback:function(e){t.$set(a.row,"status",e)},expression:"scope.row.status"}})]}}])}),e("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.jumpEdit(a.row.id)}}},[t._v("编辑")]),e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.del(a.row.id)}}},[t._v("删除")])]}}])})],1)],1)}),[],!1,null,null,null);a.default=o.exports}}]);