This commit is contained in:
pengxiaolong
2025-05-21 22:52:33 +08:00
parent 0b9353de84
commit af10ed06db
61 changed files with 8429 additions and 1087 deletions

View File

@@ -4,34 +4,38 @@ export default function request(urldata) {
"http://192.168.0.218:8086/"
+ url;
if (userInfo) {
uni.getStorage({
key: "userinfo",
success: (res) => {
if (res.data) {
if (res.data.nickName) {
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
uni.getStorage({
key: "userinfo",
success: (res) => {
if (res.data) {
if (res.data.nickName) {
uni.request({
url: baseUrl,
data: data,
method: method,
header: header,
success: function (res) {
console.log("请求成功1", res.data);
resolve(res.data);
},
fail: function (res) {
reject(res);
}
});
});
} else {
this.$global.lastPage = uni.page.route;
uni.reLaunch({ url: "/pages/UserInformation/UserInformation" })
}
} else {
this.$global.lastPage = uni.page.route;
uni.reLaunch({ url: "/pages/UserInformation/UserInformation" })
uni.navigateTo({ url: '/pages/login/login' })
}
} else {
this.$global.lastPage = uni.page.route;
uni.navigateTo({ url: '/pages/login/login' })
},
fail: function (res) {
reject(res);
}
}
});
});
} else {
return new Promise((resolve, reject) => {
@@ -41,6 +45,7 @@ export default function request(urldata) {
method: method,
header: header,
success: function (res) {
console.log("请求成功2", res);
resolve(res.data);
},
fail: function (res) {