gree_leran/unpackage/dist/dev/mp-weixin/apis/user.js

53 lines
1019 B
JavaScript
Raw Normal View History

2024-06-20 15:36:19 +00:00
"use strict";
const utils_http = require("../utils/http.js");
const mark = (code) => {
return utils_http.http({
url: "/api/wxLogin",
data: {
code
},
method: "POST"
});
};
2024-06-22 07:20:39 +00:00
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
}
});
};
2024-06-23 11:48:33 +00:00
const getUserNameById = (id) => {
return utils_http.http({
url: "/api/getUserNameById",
method: "GET",
data: {
id
}
});
};
2024-06-22 07:20:39 +00:00
exports.getImageById = getImageById;
2024-06-23 11:48:33 +00:00
exports.getUserNameById = getUserNameById;
2024-06-20 15:36:19 +00:00
exports.mark = mark;
2024-06-22 07:20:39 +00:00
exports.updateUserImage = updateUserImage;
exports.updateUserName = updateUserName;