|
|
@ -2,7 +2,7 @@ |
|
|
|
<el-main> |
|
|
|
<el-main> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="发布证书导入" :visible.sync="importcertDeveloperVisible" :destroy-on-close="true" |
|
|
|
<el-dialog title="发布证书导入" :visible.sync="importcertDeveloperVisible" :destroy-on-close="true" |
|
|
|
:close-on-click-modal="false" style="text-align:center"> |
|
|
|
:close-on-click-modal="false" style="text-align:center" width="700px"> |
|
|
|
<el-form label-width="30%"> |
|
|
|
<el-form label-width="30%"> |
|
|
|
<el-form-item label="发布证书p12文件" style="width: 80%"> |
|
|
|
<el-form-item label="发布证书p12文件" style="width: 80%"> |
|
|
|
<el-upload |
|
|
|
<el-upload |
|
|
@ -15,19 +15,19 @@ |
|
|
|
:auto-upload="false" |
|
|
|
:auto-upload="false" |
|
|
|
:limit="1" |
|
|
|
:limit="1" |
|
|
|
> |
|
|
|
> |
|
|
|
<i class="el-icon-upload"></i> |
|
|
|
<i class="el-icon-upload"/> |
|
|
|
<div class="el-upload__text">将p12证书文件拖到此处,或<em>点击上传</em></div> |
|
|
|
<div class="el-upload__text">将p12证书文件拖到此处,或<em>点击上传</em></div> |
|
|
|
</el-upload> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="发布证书p12密码" style="width: 80%"> |
|
|
|
<el-form-item label="发布证书p12密码" style="width: 80%"> |
|
|
|
<el-input label="证书密码" v-model="import_cert_info.cert_pwd"></el-input> |
|
|
|
<el-input label="证书密码" v-model="cert_pwd"/> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-button @click="$refs.upload.submit()">确定导入</el-button> |
|
|
|
<el-button @click="$refs.upload.submit()">确定导入</el-button> |
|
|
|
<el-button @click="importcertDeveloperVisible=false">取消</el-button> |
|
|
|
<el-button @click="importcertDeveloperVisible=false">取消</el-button> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog :title="title" :visible.sync="dialogaddDeveloperVisible" :destroy-on-close="true" |
|
|
|
<el-dialog :title="title" :visible.sync="dialogaddDeveloperVisible" :destroy-on-close="true" |
|
|
|
:close-on-click-modal="false" style="text-align:center"> |
|
|
|
:close-on-click-modal="false" style="text-align:center" width="750px"> |
|
|
|
|
|
|
|
|
|
|
|
<el-form ref="storageinfoform" :model="editdeveloperinfo" |
|
|
|
<el-form ref="storageinfoform" :model="editdeveloperinfo" |
|
|
|
label-width="80px" style="margin:0 auto;"> |
|
|
|
label-width="80px" style="margin:0 auto;"> |
|
|
@ -477,7 +477,7 @@ |
|
|
|
apple_auth_type: 0, |
|
|
|
apple_auth_type: 0, |
|
|
|
loadingfun: {}, |
|
|
|
loadingfun: {}, |
|
|
|
loading: false, |
|
|
|
loading: false, |
|
|
|
import_cert_info: {cert_pwd: '', cert_content: ''} |
|
|
|
cert_pwd: '', |
|
|
|
} |
|
|
|
} |
|
|
|
}, watch: { |
|
|
|
}, watch: { |
|
|
|
'dialogaddDeveloperVisible': function () { |
|
|
|
'dialogaddDeveloperVisible': function () { |
|
|
@ -491,39 +491,39 @@ |
|
|
|
const isLt2M = file.size / 1024 / 1024 < 2; |
|
|
|
const isLt2M = file.size / 1024 / 1024 < 2; |
|
|
|
if (file.type === 'application/x-pkcs12') { |
|
|
|
if (file.type === 'application/x-pkcs12') { |
|
|
|
if (isLt2M) { |
|
|
|
if (isLt2M) { |
|
|
|
this.import_cert_info.cert_content = file; |
|
|
|
if (this.cert_pwd && this.cert_pwd.toString().trim().length > 0) { |
|
|
|
let reader = new FileReader(); |
|
|
|
let reader = new FileReader(); |
|
|
|
reader.onload = evt => { |
|
|
|
reader.onload = evt => { |
|
|
|
this.import_cert_info.cert_content = evt.target.result; |
|
|
|
developercert(data => { |
|
|
|
developercert(data => { |
|
|
|
if (data.code === 1000) { |
|
|
|
if (data.code === 1000) { |
|
|
|
this.$message.success("证书导入成功"); |
|
|
|
this.$message.success("证书导入成功"); |
|
|
|
this.importcertDeveloperVisible = false; |
|
|
|
this.importcertDeveloperVisible = false; |
|
|
|
this.dialogaddDeveloperVisible = false; |
|
|
|
this.dialogaddDeveloperVisible = false; |
|
|
|
this.handleCurrentChange(this.pagination.currentPage) |
|
|
|
this.handleCurrentChange(this.pagination.currentPage) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$message.error("证书导入失败 " + data.msg) |
|
|
|
this.$message.error("证书导入失败 " + data.msg) |
|
|
|
} |
|
|
|
} |
|
|
|
}, { |
|
|
|
}, { |
|
|
|
methods: 'POST', |
|
|
|
methods: 'POST', |
|
|
|
data: { |
|
|
|
data: { |
|
|
|
issuer_id: this.editdeveloperinfo.issuer_id, |
|
|
|
issuer_id: this.editdeveloperinfo.issuer_id, |
|
|
|
cert_pwd: this.cert_pwd, |
|
|
|
cert_pwd: this.import_cert_info.cert_pwd, |
|
|
|
cert_content: evt.target.result |
|
|
|
cert_content: this.import_cert_info.cert_content |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}; |
|
|
|
}; |
|
|
|
reader.readAsDataURL(file); |
|
|
|
reader.readAsDataURL(file); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} else { |
|
|
|
|
|
|
|
this.$message.warning('密码不能为空'); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$message.error('上传大小有误'); |
|
|
|
this.$message.warning('上传大小有误'); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$message.error('上传文件格式不正确!'); |
|
|
|
this.$message.warning('上传文件格式不正确!'); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
developer_usedColor(percentage) { |
|
|
|
developer_usedColor(percentage) { |
|
|
|
if (percentage < 20) { |
|
|
|
if (percentage < 20) { |
|
|
|