feat: 后端版本迁移修改
This commit is contained in:
@@ -97,11 +97,9 @@ Page({
|
||||
request.upload(tempFilePath).then(data => {
|
||||
wx.hideLoading();
|
||||
|
||||
// User provided response format: { data: { file: { url: ..., id: ... } } }
|
||||
// request.js unwraps 'data', so 'data' here is { file: { ... } }
|
||||
const fileData = data?.file || {};
|
||||
const imageUrl = fileData.url;
|
||||
const imageId = fileData.id;
|
||||
// request.js unwraps data, response is flat FileInfo {id, url, name, ...}
|
||||
const imageUrl = data?.url || '';
|
||||
const imageId = data?.id || '';
|
||||
|
||||
if (imageUrl && imageId) {
|
||||
this.setData({
|
||||
|
||||
Reference in New Issue
Block a user