diff --git a/src/api/attachment.js b/src/api/attachment.js index b5e02bc0..21584ad7 100644 --- a/src/api/attachment.js +++ b/src/api/attachment.js @@ -76,23 +76,23 @@ attachmentApi.type = { type: 'smms', text: 'SM.MS' }, - UPYUN: { + UPOSS: { type: 'upyun', text: '又拍云' }, - QNYUN: { + QINIUOSS: { type: 'qnyun', text: '七牛云' }, - ALIYUN: { + ALIOSS: { type: 'aliyun', text: '阿里云' }, - BAIDUYUN: { + BAIDUBOS: { type: 'baiduyun', text: '百度云' }, - TENCENTYUN: { + TENCENTCOS: { type: 'tencentyun', text: '腾讯云' } diff --git a/src/views/system/OptionForm.vue b/src/views/system/OptionForm.vue index 9ce6e9a8..2e5196d4 100644 --- a/src/views/system/OptionForm.vue +++ b/src/views/system/OptionForm.vue @@ -222,10 +222,7 @@ /> - +
@@ -286,8 +283,8 @@
@@ -303,7 +300,7 @@ @@ -334,8 +331,8 @@
@@ -378,8 +375,8 @@
@@ -422,8 +419,8 @@
@@ -445,7 +442,7 @@ @@ -663,17 +660,11 @@ export default { sm: { span: 12 }, xs: { span: 24 } }, - smmsFormVisible: false, - upyunFormVisible: false, - qnyunFormVisible: false, - aliyunFormVisible: false, - baiduyunFormVisible: false, - tencentyunFormVisible: false, logoDrawerVisible: false, faviconDrawerVisible: false, options: [], mailParam: {}, - tencentyunRegions: [ + tencentCosRegions: [ { text: '北京一区', value: 'ap-beijing-1' @@ -699,7 +690,7 @@ export default { value: 'ap-chongqing' } ], - qiniuZones: [ + qiniuOssZones: [ { text: '自动选择', value: 'auto' @@ -752,7 +743,6 @@ export default { loadFormOptions() { optionApi.listAll().then(response => { this.options = response.data.data - this.handleAttachChange(this.options['attachment_type']) }) }, handleSaveOptions() { @@ -794,7 +784,7 @@ export default { return } break - case 'UPYUN': + case 'UPOSS': if (!this.options.oss_upyun_domain) { this.$notification['error']({ message: '提示', @@ -831,7 +821,7 @@ export default { return } break - case 'QNYUN': + case 'QINIUOSS': if (!this.options.oss_qiniu_domain) { this.$notification['error']({ message: '提示', @@ -861,7 +851,7 @@ export default { return } break - case 'ALIYUN': + case 'ALIOSS': if (!this.options.oss_aliyun_bucket_name) { this.$notification['error']({ message: '提示', @@ -891,7 +881,7 @@ export default { return } break - case 'BAIDUYUN': + case 'BAIDUBOS': if (!this.options.bos_baiduyun_bucket_name) { this.$notification['error']({ message: '提示', @@ -921,7 +911,7 @@ export default { return } break - case 'TENCENTYUN': + case 'TENCENTCOS': if (!this.options.cos_tencentyun_bucket_name) { this.$notification['error']({ message: '提示', @@ -1017,66 +1007,6 @@ export default { this.$message.success('保存成功!') }) }, - handleAttachChange(e) { - switch (e) { - case 'LOCAL': - this.upyunFormVisible = false - this.qnyunFormVisible = false - this.aliyunFormVisible = false - this.baiduyunFormVisible = false - this.tencentyunFormVisible = false - this.smmsFormVisible = false - break - case 'SMMS': - this.smmsFormVisible = true - this.upyunFormVisible = false - this.qnyunFormVisible = false - this.aliyunFormVisible = false - this.baiduyunFormVisible = false - this.tencentyunFormVisible = false - break - case 'UPYUN': - this.smmsFormVisible = false - this.upyunFormVisible = true - this.qnyunFormVisible = false - this.aliyunFormVisible = false - this.baiduyunFormVisible = false - this.tencentyunFormVisible = false - break - case 'QNYUN': - this.smmsFormVisible = false - this.qnyunFormVisible = true - this.upyunFormVisible = false - this.aliyunFormVisible = false - this.baiduyunFormVisible = false - this.tencentyunFormVisible = false - break - case 'ALIYUN': - this.smmsFormVisible = false - this.aliyunFormVisible = true - this.qnyunFormVisible = false - this.upyunFormVisible = false - this.baiduyunFormVisible = false - this.tencentyunFormVisible = false - break - case 'BAIDUYUN': - this.smmsFormVisible = false - this.aliyunFormVisible = false - this.qnyunFormVisible = false - this.upyunFormVisible = false - this.baiduyunFormVisible = true - this.tencentyunFormVisible = false - break - case 'TENCENTYUN': - this.smmsFormVisible = false - this.aliyunFormVisible = false - this.qnyunFormVisible = false - this.upyunFormVisible = false - this.baiduyunFormVisible = false - this.tencentyunFormVisible = true - break - } - }, handleSelectLogo(data) { this.$set(this.options, 'blog_logo', encodeURI(data.path)) this.logoDrawerVisible = false