10.18前的开发

This commit is contained in:
2023-10-18 21:00:42 +08:00
parent 4fa658db18
commit aa47166ae7
70 changed files with 9936 additions and 172 deletions

View File

@@ -4,10 +4,10 @@ const config_index = require("../config/index.js");
const loginUrl = "pages/user/login";
const net = {
REQUEST(url, method = "GET", data, checkLogin = true, header) {
let token = common_vendor.index.getStorageSync("access_token") || "Basic ZGV20mRldjEyMw==";
let token = common_vendor.index.getStorageSync("access_token") || "Basic ZGV2OmRldjEyMw==";
const headers = {
"Content-Type": "application/json",
// "Content-Type": "application/x-www-form-urlencoded",
// "Content-Type": "application/json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": token,
"x-token": token,
"token": token
@@ -16,10 +16,6 @@ const net = {
};
var pages = getCurrentPages();
var page = pages[pages.length - 1];
if (!header) {
headers["Content-Type"] = "application/x-www-form-urlencode";
}
console.log("headers :", headers);
return common_vendor.index.request({
url: config_index.config.baseUrl + url,
method,