This commit is contained in:
2026-01-16 14:05:37 +08:00
parent 6eaec08a6d
commit 4faf6f14c3
144 changed files with 149 additions and 151 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 176 KiB

View File

@@ -268,39 +268,37 @@
});
},
// 正面
handleUploadSuccess1(response) {
const { status,uri } = response
if(status === "OK"){
this.ruleForm.imageUrl1 = uploadApi.aliyunFileUrl + uri
}
handleUploadSuccess1(response, file) {
// OSS直接上传模式无callback
const key = this.uploadData.key
const fileUrl = 'https://coin-exchange117.oss-cn-shanghai.aliyuncs.com/'
this.ruleForm.imageUrl1 = fileUrl + key
},
// 反面
handleUploadSuccess2(response) {
const { status,uri } = response
if(status === "OK"){
this.ruleForm.imageUrl2 = uploadApi.aliyunFileUrl + uri
}
handleUploadSuccess2(response, file) {
const key = this.uploadData.key
const fileUrl = 'https://coin-exchange117.oss-cn-shanghai.aliyuncs.com/'
this.ruleForm.imageUrl2 = fileUrl + key
},
// 手持
handleUploadSuccess3(response) {
const { status,uri } = response
if(status === "OK"){
this.ruleForm.imageUrl3 = uploadApi.aliyunFileUrl + uri
}
handleUploadSuccess3(response, file) {
const key = this.uploadData.key
const fileUrl = 'https://coin-exchange117.oss-cn-shanghai.aliyuncs.com/'
this.ruleForm.imageUrl3 = fileUrl + key
},
async beforeUpload(){
let res = await uploadApi.getPreUpload()
if(res.data){
let preUploadData = res.data
let {dir,policy,signature,callback,accessid,host} = preUploadData
let {dir,policy,signature,accessid,host} = preUploadData
this.uploadHost = host
this.uploadData.name=signature
this.uploadData.key=`${dir}${new Date().getTime()}.jpg`
this.uploadData.policy=policy
this.uploadData.OSSAccessKeyId=accessid
this.uploadData.success_action_status=200
this.uploadData.callback=callback
// 移除callback参数避免OSS回调失败 (CallbackFailed 307)
// this.uploadData.callback=callback
this.uploadData.signature=signature
}else{
return Promise.reject()