(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-9ec9a05a"],{"0579":function(t,e,a){"use strict";a.r(e);var n=a("797f"),o=a("b6c4"),s={data:()=>({table:{currentPage:1,pageSizes:[10],total:0,data:null,imgHost:""},chooseList:[{name:"首页",value:"index"},{name:"自营商城",value:"goods"},{name:"二手商城",value:"twoshop"}],choose:"index"}),methods:{reAdd(){},reloadList(){this.getImgHost(this.getData)},del(t){this.$confirm("此操作将永久删除该轮播图, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Object(n.g)({id:t}).then(t=>{this.$message({type:"success",message:"删除成功!"}),this.getImgHost(this.getData)})}).catch(()=>{})},jumpAddd(){this.$router.push({path:"/label/banner/add"})},handleSizeChange(t){},handleCurrentChange(t){},getData(t,e){Object(n.i)({}).then(t=>{this.table.currentPage=e,this.table.total=t.data.length,this.table.data=t.data;for(var a=0;a<t.data.length;a++)t.data[a].status=1==t.data[a].status;if(""!=this.choose){var n=[];for(a=0;a<this.table.data.length;a++)this.table.data[a].location==this.choose&&n.push(this.table.data[a]);this.table.data=n}})},getImgHost(t){Object(o.h)().then(e=>{this.imgHost=e.oss_domain,t()})},checkType:t=>"index"==t?"首页":"goods"==t?"自营商城":"twoshop"==t?"二手商城":void 0,edit(t){this.$router.push({path:"/label/banner/edit",query:{id:t}})},updateStatus(t,e){Object(n.j)({id:t,status:1==e})}},mounted(){this.getImgHost(this.getData)}},l=a("2877"),r=Object(l.a)(s,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{},[a("div",{staticClass:"ls-card"},[a("el-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{title:"温馨提示：轮播图用来实现广告轮播,可以推广广告。",type:"info",closable:!1,"show-icon":""}}),a("el-button",{staticStyle:{"margin-bottom":"15px"},attrs:{type:"primary",size:"mini"},on:{click:t.jumpAddd}},[t._v("增加轮播图")]),a("el-select",{staticStyle:{"margin-left":"10px"},attrs:{disabled:"",size:"mini",placeholder:"请选择"},on:{change:t.reloadList},model:{value:t.choose,callback:function(e){t.choose=e},expression:"choose"}},t._l(t.chooseList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.name,value:t.value}})})),1)],1),a("el-table",{staticClass:"m-t-16",staticStyle:{width:"100%"},attrs:{data:null==t.table.data?[]:t.table.data}},[a("el-table-column",{attrs:{prop:"id",label:"ID",width:"80"}}),a("el-table-column",{attrs:{prop:"title",label:"标题"}}),a("el-table-column",{attrs:{prop:"desc",label:"描述"}}),a("el-table-column",{attrs:{label:"图片"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-image",{staticStyle:{width:"80px"},attrs:{src:1==e.row.image.startsWith("http")?e.row.image:t.imgHost+e.row.image,fit:"contain"}})]}}])}),a("el-table-column",{attrs:{prop:"jump_path",label:"路径"}}),a("el-table-column",{attrs:{prop:"sort",label:"排序"}}),a("el-table-column",{attrs:{label:"位置"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.checkType(e.row.location)))])]}}])}),a("el-table-column",{attrs:{label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{on:{change:function(a){return t.updateStatus(e.row.id,e.row.status)}},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}})]}}])}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.edit(e.row.id)}}},[t._v("编辑")]),a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.del(e.row.id)}}},[t._v("删除")])]}}])})],1)],1)}),[],!1,null,null,null);e.default=r.exports},"797f":function(t,e,a){"use strict";a.d(e,"i",(function(){return o})),a.d(e,"h",(function(){return s})),a.d(e,"g",(function(){return l})),a.d(e,"j",(function(){return r})),a.d(e,"f",(function(){return i})),a.d(e,"n",(function(){return u})),a.d(e,"m",(function(){return c})),a.d(e,"o",(function(){return d})),a.d(e,"k",(function(){return p})),a.d(e,"l",(function(){return h})),a.d(e,"d",(function(){return m})),a.d(e,"c",(function(){return b})),a.d(e,"e",(function(){return f})),a.d(e,"b",(function(){return g})),a.d(e,"a",(function(){return v}));var n=a("6b2d");const o=t=>n.a.get("/banner/list",{params:t}),s=t=>n.a.get("/banner/detail",{params:t}),l=t=>n.a.get("/banner/del",{params:t}),r=t=>n.a.post("/banner/update",t),i=t=>n.a.post("/banner/create",t),u=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}),m=t=>n.a.get("/appBottomMenu/list",{params:t}),b=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}),v=t=>n.a.post("/appBottomMenu/create",t)}}]);