7823.7e87d160.js 1.6 KB

12
  1. "use strict";(self["webpackChunkscproject"]=self["webpackChunkscproject"]||[]).push([[7823],{67823:function(e,t,s){s.r(t),s.d(t,{default:function(){return r}});var a=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{id:"system"}},[e._m(0),t("hr"),t("div",{attrs:{id:"SystemBtn"}},[t("div",{staticClass:"setSystemBtn"},[t("span",[e._v("关闭网站")]),t("el-switch",{attrs:{"active-color":"#13ce66","inactive-color":"#ff4949"},on:{change:e.ChangeCloseWebState},model:{value:e.closeWeb,callback:function(t){e.closeWeb=t},expression:"closeWeb"}})],1)])])},i=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"pAHeader"},[t("div",{staticClass:"pAHeader1"},[e._v("系统管理")])])}],o={components:{},data(){return{closeWeb:!1,loading:!1}},methods:{ChangeCloseWebState(){this.loading=!0,this.ajax.post(this.$store.state.api+"/setSystemState",{uid:this.$store.state.userInfo.userid,name:"systemOpen",st:Number(this.closeWeb)}).then((e=>{1==e["data"]&&(this.$message.success("更改系统状态成功"),this.getCloseData())})).catch((e=>{console.log(e)}))},getCloseData(){this.loading=!0,this.ajax.get(this.$store.state.api+"/getSystemState",{uid:this.$store.state.userInfo.userid,name:"systemOpen"}).then((e=>{let t=e["data"][0][0]["state"];this.closeWeb=Boolean(t),this.loading=!1})).catch((e=>{console.log(e)}))}},watch:{},mounted(){},activated(){this.getCloseData()}},n=o,l=s(43736),c=(0,l.Z)(n,a,i,!1,null,"7f980910",null),r=c.exports}}]);
  2. //# sourceMappingURL=7823.7e87d160.js.map