Merge pull request #35 from secondarycoder/dev-addBaiduYunOss

新增百度云oss文件上传下载功能
pull/36/head
John Niang 2019-07-21 09:03:14 +08:00 committed by GitHub
commit 24d9b2169a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 50 additions and 0 deletions

View File

@ -87,6 +87,10 @@ attachmentApi.type = {
ALIYUN: { ALIYUN: {
type: 'aliyun', type: 'aliyun',
text: '阿里云' text: '阿里云'
},
BAIDUYUN: {
type: 'baiduyun',
text: '百度云'
} }
} }

View File

@ -388,6 +388,41 @@
<a-input v-model="options.oss_aliyun_style_rule" /> <a-input v-model="options.oss_aliyun_style_rule" />
</a-form-item> </a-form-item>
</div> </div>
<div
class="baiduyunForm"
v-show="baiduyunFormHidden"
>
<a-form-item
label="Bucket"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_baiduyun_bucket_name" />
</a-form-item>
<a-form-item
label="EndPoint地域节点"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_baiduyun_endpoint" />
</a-form-item>
<a-form-item
label="Access Key"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_baiduyun_access_key" />
</a-form-item>
<a-form-item
label="Access Secret"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_baiduyun_access_secret" />
</a-form-item>
<a-form-item
label="缩略图处理策略:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_baiduyun_style_rule" />
</a-form-item>
</div>
<a-form-item> <a-form-item>
<a-button <a-button
type="primary" type="primary"
@ -599,6 +634,7 @@ export default {
upyunFormHidden: false, upyunFormHidden: false,
qnyunFormHidden: false, qnyunFormHidden: false,
aliyunFormHidden: false, aliyunFormHidden: false,
baiduyunFormHidden: false,
logoDrawerVisible: false, logoDrawerVisible: false,
faviconDrawerVisible: false, faviconDrawerVisible: false,
options: [], options: [],
@ -630,21 +666,31 @@ export default {
this.upyunFormHidden = false this.upyunFormHidden = false
this.qnyunFormHidden = false this.qnyunFormHidden = false
this.aliyunFormHidden = false this.aliyunFormHidden = false
this.baiduyunFormHidden = false
break break
case 'UPYUN': case 'UPYUN':
this.upyunFormHidden = true this.upyunFormHidden = true
this.qnyunFormHidden = false this.qnyunFormHidden = false
this.aliyunFormHidden = false this.aliyunFormHidden = false
this.baiduyunFormHidden = false
break break
case 'QNYUN': case 'QNYUN':
this.qnyunFormHidden = true this.qnyunFormHidden = true
this.upyunFormHidden = false this.upyunFormHidden = false
this.aliyunFormHidden = false this.aliyunFormHidden = false
this.baiduyunFormHidden = false
break break
case 'ALIYUN': case 'ALIYUN':
this.aliyunFormHidden = true this.aliyunFormHidden = true
this.qnyunFormHidden = false this.qnyunFormHidden = false
this.upyunFormHidden = false this.upyunFormHidden = false
this.baiduyunFormHidden = false
break
case 'BAIDUYUN':
this.aliyunFormHidden = false
this.qnyunFormHidden = false
this.upyunFormHidden = false
this.baiduyunFormHidden = true
break break
} }
}, },