Переглянути джерело

修改dev_winpc基本分支

sophieChenyx 6 роки тому
батько
коміт
64aa00274c
2 змінених файлів з 6 додано та 0 видалено
  1. 1 0
      src/res/values/api.json
  2. 5 0
      src/util/API/APIClient.js

+ 1 - 0
src/res/values/api.json

@@ -1,4 +1,5 @@
 {
     "api_url_kid": "http://kid-app.lingjiao.cn",
+    "api_url_": "https://21st-winapp.lingjiao.cn",
     "api_url": "http://tt-web.api.ai160.com"
 }

+ 5 - 0
src/util/API/APIClient.js

@@ -25,6 +25,10 @@ class APIClient {
 	// 账户登录,获取token,绑定设备
 	static userLoginAndBindDevice(data, callback) {
 		let deviceCode = localStorage.getItem('deviceCode');
+		let deviceType = "";
+    if(window.efunbox) {
+      deviceType = window.efunbox.getTypeForDevice();
+		}
 		if (!deviceCode) {
 			if (window.efunbox) {
 				deviceCode = window.efunbox.getUuidForDevice();
@@ -37,6 +41,7 @@ class APIClient {
 			deviceCode,
 			eid: data.usercode,
 			password: data.password,
+      deviceType: deviceType
 		};
 		AJAXHelper.post('/token', params, callback);
 	}