(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-1a2a146c"],{"0501":function(e,t,s){"use strict";s.r(t);var r=s("9ab4"),i=s("1b40"),a=s("6be0");let o=class extends i.e{constructor(){super(...arguments),this.engine="",this.form={bucket:"",access_key:"",secret_key:"",domain:"",region:"",status:0},this.formRules={bucket:[{required:!0,message:"请输入存储空间名称",trigger:"blur"}],access_key:[{required:!0,message:"请输入ACCESS_KEY",trigger:"blur"}],secret_key:[{required:!0,message:"请输入SECRET_KEY",trigger:"blur"}],domain:[{required:!0,message:"请输入空间域名",trigger:"blur"}],region:[{required:!0,message:"请输入REGION",trigger:"blur"}]}}onSubmit(){this.$refs.formRef.validate(e=>{e&&Object(a.d)({...this.form,engine:this.engine}).then(e=>{setTimeout(()=>this.$router.go(-1),500)}).catch(e=>{})})}getStorageIndex(){Object(a.b)({engine:this.engine}).then(e=>{this.form=e}).catch(e=>{})}created(){const e=this.$route.query;e.engine&&(this.engine=e.engine),this.getStorageIndex()}};o=Object(r.a)([Object(i.a)({components:{}})],o);var n=o,l=(s("100e"),s("2877")),c=Object(l.a)(n,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"storage-setting"},[s("div",{staticClass:"ls-card"},[s("el-page-header",{attrs:{content:"存储设置"},on:{back:function(t){return e.$router.go(-1)}}})],1),"local"!==e.engine?s("div",{staticClass:"ls-card m-t-16"},["qiniu"==e.engine?s("el-alert",{attrs:{title:"温馨提示：切换七牛云存储后，素材库需要重新上传至七牛云。",type:"info",closable:!1,"show-icon":""}}):e._e(),"aliyun"==e.engine?s("el-alert",{attrs:{title:"温馨提示：切换阿里云OSS后，素材库需要重新上传至阿里云OSS。",type:"info",closable:!1,"show-icon":""}}):e._e(),"qcloud"==e.engine?s("el-alert",{attrs:{title:"温馨提示：切换腾讯云OSS后，素材库需要重新上传至腾讯云OSS。",type:"info",closable:!1,"show-icon":""}}):e._e()],1):e._e(),s("el-form",{ref:"formRef",attrs:{model:e.form,rules:e.formRules,"label-width":"240px",size:"small"}},[s("div",{staticClass:"ls-card m-t-16"},[s("div",{staticClass:"card-content m-t-24"},[s("el-form-item",{attrs:{label:"存储方式"}},["local"==e.engine?s("div",[e._v("本地存储")]):e._e(),"qiniu"==e.engine?s("div",[e._v("七牛云存储")]):e._e(),"aliyun"==e.engine?s("div",[e._v("阿里云OSS")]):e._e(),"qcloud"==e.engine?s("div",[e._v("腾讯云OSS")]):e._e(),"local"==e.engine?s("div",{staticClass:"muted xs m-r-16"},[e._v("本地存储方式不需要配置其他参数")]):e._e()])],1),"local"!==e.engine?s("div",[s("el-form-item",{attrs:{label:" 存储空间名称(Bucket)",prop:"bucket"}},[s("el-input",{attrs:{placeholder:"请输入存储空间名称(Bucket)"},model:{value:e.form.bucket,callback:function(t){e.$set(e.form,"bucket",t)},expression:"form.bucket"}})],1),s("el-form-item",{attrs:{label:"ACCESS_KEY（AK）",prop:"access_key"}},[s("el-input",{attrs:{placeholder:"请输入ACCESS_KEY"},model:{value:e.form.access_key,callback:function(t){e.$set(e.form,"access_key",t)},expression:"form.access_key"}})],1),s("el-form-item",{attrs:{label:"SECRET_KEY（SK）",prop:"secret_key"}},[s("el-input",{attrs:{placeholder:"请输入SECRET_KEY"},model:{value:e.form.secret_key,callback:function(t){e.$set(e.form,"secret_key",t)},expression:"form.secret_key"}})],1),s("el-form-item",{attrs:{label:"空间域名（Domain）",prop:"domain"}},[s("el-input",{attrs:{placeholder:"请输入空间域名"},model:{value:e.form.domain,callback:function(t){e.$set(e.form,"domain",t)},expression:"form.domain"}}),s("div",{staticClass:"muted xs m-r-16"},[e._v("请补全http://或https://，例如https://static.cloud.com")])],1),"qcloud"==e.engine?s("el-form-item",{attrs:{label:"REGION",prop:"region"}},[s("el-input",{attrs:{placeholder:"请输入region"},model:{value:e.form.region,callback:function(t){e.$set(e.form,"region",t)},expression:"form.region"}})],1):e._e()],1):e._e(),s("el-form-item",{attrs:{label:"状态",prop:"status"}},[s("el-radio-group",{staticClass:"m-r-16",model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},[s("el-radio",{attrs:{label:0}},[e._v("停用·")]),s("el-radio",{attrs:{label:1}},[e._v("启用")])],1)],1)],1)]),s("div",{staticClass:"bg-white ls-fixed-footer"},[s("div",{staticClass:"row-center flex",staticStyle:{height:"100%"}},[s("el-button",{attrs:{size:"small"},on:{click:function(t){return e.$router.go(-1)}}},[e._v("取消")]),s("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.onSubmit()}}},[e._v("保存")])],1)])],1)}),[],!1,null,"94409e74",null);t.default=c.exports},"100e":function(e,t,s){"use strict";s("9cc4")},"6be0":function(e,t,s){"use strict";s.d(t,"c",(function(){return i})),s.d(t,"b",(function(){return a})),s.d(t,"d",(function(){return o})),s.d(t,"a",(function(){return n}));var r=s("f175");const i=()=>r.a.get("/settings.shop.Storage/lists"),a=e=>r.a.get("/settings.shop.Storage/index",{params:e}),o=e=>r.a.post("/settings.shop.Storage/setup",e),n=e=>r.a.post("/settings.shop.Storage/change",e)},"9cc4":function(e,t,s){}}]);