This commit is contained in:
pengxiaolong
2025-05-19 18:34:04 +08:00
parent e05d72fccf
commit ff546bd9a9
31 changed files with 174 additions and 195 deletions

View File

@@ -1,15 +1,15 @@
export default function request(urldata) {
const {url, data, method, header,userInfo} = urldata;
const baseUrl =
"http://192.168.0.218:8086"
+url;
console.log("``````````````````````````````````",userInfo);
const { url, data, method, header, userInfo } = urldata;
const baseUrl =
"http://192.168.0.218:8086/"
+ url;
console.log("``````````````````````````````````", userInfo);
if (userInfo) {
uni.getStorage({
key: "userinfo",
success: (res) => {
if(res.data){
if(res.data.nickName){
if (res.data) {
if (res.data.nickName) {
return new Promise((resolve, reject) => {
uni.request({
url: baseUrl,
@@ -24,16 +24,18 @@ export default function request(urldata) {
}
});
});
}else{
uni.reLaunch({ url: "/pages/UserInformation/UserInformation"})
} else {
this.$global.lastPage = uni.page.route;
uni.reLaunch({ url: "/pages/UserInformation/UserInformation" })
}
}else{
} else {
this.$global.lastPage = uni.page.route;
uni.navigateTo({ url: '/pages/login/login' })
}
}
});
}else{
return new Promise((resolve, reject) => {
});
} else {
return new Promise((resolve, reject) => {
uni.request({
url: baseUrl,
data: data,