feat: 后端版本迁移修改
This commit is contained in:
@@ -61,10 +61,7 @@ Page({
|
||||
if (this.data.image) {
|
||||
const uploadRes = await request.upload(this.data.image);
|
||||
// Correctly extract ID from nested 'file' object based on API response
|
||||
if (uploadRes && uploadRes.file && uploadRes.file.id) {
|
||||
ossIds.push(uploadRes.file.id);
|
||||
} else if (uploadRes && uploadRes.id) {
|
||||
// Fallback just in case
|
||||
if (uploadRes && uploadRes.id) {
|
||||
ossIds.push(uploadRes.id);
|
||||
} else {
|
||||
console.warn('Upload response structure mismatch:', uploadRes);
|
||||
|
||||
Reference in New Issue
Block a user