|
@@ -1,6 +1,7 @@
|
|
|
import Consts from '../Consts';
|
|
|
import AJAXHelper from './AJAXHelper';
|
|
|
import userDataStorage from '../userDataStorage';
|
|
|
+import WinBoxAPI from '../WinBoxAPI';
|
|
|
import Utils from '../Utils';
|
|
|
|
|
|
class APIClient {
|
|
@@ -96,8 +97,12 @@ class APIClient {
|
|
|
|
|
|
// 根据课程获取课列表
|
|
|
static getLessonList(courseId, callback) {
|
|
|
+ let macUrl = '';
|
|
|
+ WinBoxAPI.getMacUrl( (res) => {
|
|
|
+ macUrl = res;
|
|
|
+ } )
|
|
|
let params = APIClient.addCacheParam({});
|
|
|
- AJAXHelper.get(`/course/${courseId}/lessons`, params, callback);
|
|
|
+ AJAXHelper.get(`/course/${courseId}/lessons`, { params, mac: macUrl}, callback);
|
|
|
}
|
|
|
|
|
|
// 获取课程详情
|
|
@@ -178,8 +183,10 @@ class APIClient {
|
|
|
|
|
|
// 获取用户的下载记录
|
|
|
static getUserDownloadList(callback) {
|
|
|
- AJAXHelper.get('/callback/download/list', {}, callback);
|
|
|
+ let params = { mac: WinBoxAPI.getMacUrl()}
|
|
|
+ AJAXHelper.get('/callback/download/list', { params }, callback);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
module.exports = APIClient;
|