10.18前的开发
This commit is contained in:
6
unpackage/dist/dev/mp-weixin/api/index.js
vendored
6
unpackage/dist/dev/mp-weixin/api/index.js
vendored
@@ -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),
|
||||
// 获取医院信息
|
||||
/*
|
||||
首页信息
|
||||
*/
|
||||
|
10
unpackage/dist/dev/mp-weixin/api/request.js
vendored
10
unpackage/dist/dev/mp-weixin/api/request.js
vendored
@@ -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,
|
||||
|
Reference in New Issue
Block a user