diff --git a/api/index.js b/api/index.js new file mode 100644 index 0000000..ec65915 --- /dev/null +++ b/api/index.js @@ -0,0 +1,14 @@ +import fetch from '@/common/fetch.js'; +import BASE_URL from './base.js'; +import useNetWork from '@/common/useNetWork.js'; + +const UPDATE_IMG = BASE_URL + '/user/updateUserImg'; + +export function updateImg(fileId, uid) { + useNetWork(); + const params = { + fileId: fileId, + uid: uid, + }; + return fetch.post(UPDATE_IMG, params).then(res => res); +} \ No newline at end of file