弹窗
This commit is contained in:
@@ -4,34 +4,38 @@ function request(urldata) {
|
||||
const { url, data, method, header, userInfo } = urldata;
|
||||
const baseUrl = "http://192.168.0.218:8086/" + url;
|
||||
if (userInfo) {
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
if (res.data) {
|
||||
if (res.data.nickName) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
if (res.data) {
|
||||
if (res.data.nickName) {
|
||||
common_vendor.index.request({
|
||||
url: baseUrl,
|
||||
data,
|
||||
method,
|
||||
header,
|
||||
success: function(res2) {
|
||||
common_vendor.index.__f__("log", "at components/request.js:19", "请求成功1", res2.data);
|
||||
resolve(res2.data);
|
||||
},
|
||||
fail: function(res2) {
|
||||
reject(res2);
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$global.lastPage = common_vendor.index.page.route;
|
||||
common_vendor.index.reLaunch({ url: "/pages/UserInformation/UserInformation" });
|
||||
}
|
||||
} else {
|
||||
this.$global.lastPage = common_vendor.index.page.route;
|
||||
common_vendor.index.reLaunch({ url: "/pages/UserInformation/UserInformation" });
|
||||
common_vendor.index.navigateTo({ url: "/pages/login/login" });
|
||||
}
|
||||
} else {
|
||||
this.$global.lastPage = common_vendor.index.page.route;
|
||||
common_vendor.index.navigateTo({ url: "/pages/login/login" });
|
||||
},
|
||||
fail: function(res) {
|
||||
reject(res);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -41,6 +45,7 @@ function request(urldata) {
|
||||
method,
|
||||
header,
|
||||
success: function(res) {
|
||||
common_vendor.index.__f__("log", "at components/request.js:48", "请求成功2", res);
|
||||
resolve(res.data);
|
||||
},
|
||||
fail: function(res) {
|
||||
|
||||
Reference in New Issue
Block a user