Commit ea4601d6 authored by limingzhe's avatar limingzhe

fix: debug

parent 1fbc2b3f
...@@ -74,6 +74,8 @@ cc.Class({ ...@@ -74,6 +74,8 @@ cc.Class({
start() { start() {
this.data = this.getDefaultData();
this.preloadItem();
// let getData = this.getData.bind(this); // let getData = this.getData.bind(this);
// if (window && window.courseware) { // if (window && window.courseware) {
...@@ -262,6 +264,9 @@ cc.Class({ ...@@ -262,6 +264,9 @@ cc.Class({
getTeachingMaterial(withHistory) { getTeachingMaterial(withHistory) {
this.getDataByPid(null, (resData) => { this.getDataByPid(null, (resData) => {
console.log('resData: ', resData);
this.showTeachingMaterial(resData.rows); this.showTeachingMaterial(resData.rows);
this.initView(); this.initView();
...@@ -308,6 +313,9 @@ cc.Class({ ...@@ -308,6 +313,9 @@ cc.Class({
return new Promise((resovle, reject) => { return new Promise((resovle, reject) => {
callNetworkApi(this.baseUrl, data, (res) => { callNetworkApi(this.baseUrl, data, (res) => {
console.log('callNetworkApi: ', res);
const resData = JSON.parse(res); const resData = JSON.parse(res);
callback && callback(resData); callback && callback(resData);
resovle(resData) resovle(resData)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment