feat: 登录功能

This commit is contained in:
2026-01-14 13:59:15 +08:00
parent 121d762413
commit 0953c1b6cb
7 changed files with 101 additions and 55 deletions

View File

@@ -59,19 +59,21 @@ http.interceptors.response.use(
uni.hideLoading();
const { data } = response;
// console.log(data);
// 根据业务状态码处理(可根据实际接口调整)
if (data.code === 200 || data.code === 0) {
return data;
}
// if (data.code === 200 || data.code === 0) {
// return data;
// }
// 业务错误提示
uni.showToast({
title: data.message || "请求失败",
icon: "none",
});
// // 业务错误提示
// uni.showToast({
// title: data.message || "请求失败",
// icon: "none",
// });
return Promise.reject(data);
// return Promise.reject(data);
return data;
},
(error) => {
uni.hideLoading();