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

@@ -7,6 +7,12 @@ const API = {
// 获取token
wx_login: (data, userId) => api_request.net.POST("/user/binding/wechat", data, true, { "userId": userId }),
// 微信登录
// upload: (data) => net.POST('/user/upload',data), // 文件上传
userinfoUpdae: (data) => api_request.net.PUT("/user/info", data),
// 更新用户信息
// 首页
getHospitalList: (data) => api_request.net.GET("/hospital/list", data),
// 获取医院信息
/*
首页信息
*/

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,