代码优化

This commit is contained in:
kron
2025-06-05 17:43:22 +08:00
parent 18fb0ee7d4
commit 219fdc54ad
5 changed files with 18 additions and 13 deletions

View File

@@ -33,20 +33,20 @@ export const getHomeData = () => {
return request("GET", "/user/myHome");
};
// 获取省份及下属城市列表
export const getProvinceData = () => {
return request("GET", "/index/provinces/list");
};
// 获取省份及下属城市列表
export const loginAPI = (nickName, avatarUrl, code) => {
return request("POST", "/index/code", {
export const loginAPI = async (nickName, avatarUrl, code) => {
const result = await request("POST", "/index/code", {
appName: "shoot",
appId: "wxa8f5989dcd45cc23",
nickName,
avatarUrl,
code,
});
uni.setStorageSync("token", result.token);
return result;
};
export const bindDeviceAPI = (device) => {