|
|
|
@ -195,18 +195,11 @@ Page({ |
|
|
|
if (result && result.fileName) { |
|
|
|
// 获取上传后的文件路径
|
|
|
|
const uploadedFilePath = result.fileName |
|
|
|
console.log(uploadedFilePath); |
|
|
|
this.setData({ |
|
|
|
avatarUrl: uploadedFilePath, |
|
|
|
}) |
|
|
|
|
|
|
|
// 更新缓存中的用户信息
|
|
|
|
const cachedUserInfo = wx.getStorageSync('userInfo') || {} |
|
|
|
if (!cachedUserInfo.user) { |
|
|
|
cachedUserInfo.user = {} |
|
|
|
} |
|
|
|
cachedUserInfo.user.avatar = uploadedFilePath |
|
|
|
wx.setStorageSync('userInfo', cachedUserInfo) |
|
|
|
|
|
|
|
// 更新头像的API
|
|
|
|
http.revise({ |
|
|
|
data: { |
|
|
|
@ -410,7 +403,7 @@ Page({ |
|
|
|
http.feedback({ |
|
|
|
data: { |
|
|
|
content: content, |
|
|
|
feedbackType: this.data.currentFeedbackType // 添加反馈类型字段
|
|
|
|
type: this.data.currentFeedbackType // 添加反馈类型字段
|
|
|
|
}, |
|
|
|
success: res => { |
|
|
|
if (res.code == 200) { |
|
|
|
|