|
|
@@ -4,6 +4,7 @@
|
|
|
var base64 = require('/base64');
|
|
|
const app = getApp();
|
|
|
const config = require('../config/config.js');
|
|
|
+const constants = require('../utils/Constants');
|
|
|
|
|
|
/* 服务端IP+端口 */
|
|
|
export const API_URI = config.server_add+':'+config.server_port
|
|
|
@@ -65,6 +66,8 @@ function wxRequest(url, requestType, params) {
|
|
|
// 请求的Authorization
|
|
|
header['Authorization'] = "Bearer " + app.globalData.token
|
|
|
}
|
|
|
+ // 语言
|
|
|
+ header['i18n'] = constants.lan
|
|
|
wx.request({
|
|
|
url: `${API_URI}/${url}`,
|
|
|
header: header,
|