43 lines
827 B
JavaScript
43 lines
827 B
JavaScript
"use strict";
|
|
const utils_http = require("../utils/http.js");
|
|
const mark = (code) => {
|
|
return utils_http.http({
|
|
url: "/api/wxLogin",
|
|
data: {
|
|
code
|
|
},
|
|
method: "POST"
|
|
});
|
|
};
|
|
const getImageById = (userId) => {
|
|
return utils_http.http({
|
|
url: "/api/getUserInfoById",
|
|
method: "GET",
|
|
data: {
|
|
userId
|
|
}
|
|
});
|
|
};
|
|
const updateUserImage = (profilePicture) => {
|
|
return utils_http.http({
|
|
url: "/api/updateUserImage",
|
|
method: "POST",
|
|
data: {
|
|
profilePicture
|
|
}
|
|
});
|
|
};
|
|
const updateUserName = (username) => {
|
|
return utils_http.http({
|
|
url: "/api/updateUserName",
|
|
method: "POST",
|
|
data: {
|
|
username
|
|
}
|
|
});
|
|
};
|
|
exports.getImageById = getImageById;
|
|
exports.mark = mark;
|
|
exports.updateUserImage = updateUserImage;
|
|
exports.updateUserName = updateUserName;
|