diff --git a/src/api/login.js b/src/api/login.js index 52b2b984..b21a030f 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -124,29 +124,29 @@ export const queryCurrentUser = (data) => request({ const localFilePath = '_downloads/' + filename // 先检查是否存在 - uni.getFileInfo({ - filePath: localFilePath, - success: () => { - console.log('头像已存在,无需下载'); - updateUserAvatar(localFilePath) - }, - fail: () => { - console.log('开始下载头像:', url); - const dtask = plus.downloader.createDownload( - url, { - method: 'GET', - filename: '_downloads/' + filename - }, - (download, status) => { - if (status === 200) { - console.log('头像下载成功:', download.filename); - updateUserAvatar(download.filename) - } - } - ) - dtask.start(); - } - }) + // uni.getFileInfo({ + // filePath: localFilePath, + // success: () => { + // console.log('头像已存在,无需下载'); + // updateUserAvatar(localFilePath) + // }, + // fail: () => { + // console.log('开始下载头像:', url); + // const dtask = plus.downloader.createDownload( + // url, { + // method: 'GET', + // filename: '_downloads/' + filename + // }, + // (download, status) => { + // if (status === 200) { + // console.log('头像下载成功:', download.filename); + // updateUserAvatar(download.filename) + // } + // } + // ) + // dtask.start(); + // } + // }) } catch (error) {