Commit c8fa8152 authored by sunboylu's avatar sunboylu

feat: test null05

parent 3ac94078
...@@ -106,7 +106,17 @@ export function initAir(_this) { ...@@ -106,7 +106,17 @@ export function initAir(_this) {
window.courseware = { window.courseware = {
getData(callback) { getData(callback) {
_this.log("===成功调用getData==="); _this.log("===成功调用getData===");
callback && callback(null); const result = (_this && _this.COURSE_DATA) ? _this.COURSE_DATA : {};
try {
callback && callback(result);
} catch (err) {
try {
_this.log(`getData callback error: ${err && err.message || err}`);
} catch (_) {
// 尝试输出
try { console.warn(err); } catch (__){ }
}
}
}, },
uploadUrl() { uploadUrl() {
_this.log("===成功调用uploadUrl==="); _this.log("===成功调用uploadUrl===");
...@@ -514,3 +524,10 @@ export function initAir(_this) { ...@@ -514,3 +524,10 @@ export function initAir(_this) {
} }
}; };
} }
// 兼容模板:提供全局 e 指向 courseware,避免 e 为 null
try {
if (!window.e) {
window.e = window.courseware;
}
} catch (_) {}
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