Pārlūkot izejas kodu

贝尔安亲分支切到此分支基于online_talenkid

zhanghe 6 gadi atpakaļ
vecāks
revīzija
939a914b1e

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

@@ -1,5 +1,4 @@
 {
-    "api_url": "https://talenkid.lingjiao.cn",
+    "api_url": "https://web-api.lingjiao.cn",
     "api_url_": "http://tt-web.api.ai160.com"
 }
-

+ 1 - 1
src/stage/index/scene/CLScene.js

@@ -306,7 +306,7 @@ class CLScene extends scene {
             return;
         }
         // 进入课程详情场景
-        this.showScene(require(`./CourseScene.js`), { id });
+        this.showScene(require(`./CourseScene.js`), { id, sceneName: this.sceneType });
     }
 
     onBack() {

+ 7 - 4
src/stage/index/scene/CourseScene.js

@@ -19,9 +19,11 @@ class CourseScene extends scene {
 		this.id = 1;
 		this.isFirst = true;
 		this.marquee = null;
-	    //course name
-	    this.title = '';
-	    this.isBought = false;
+    //course name
+    this.title = '';
+    this.isBought = false;
+		//scene name
+		this.sceneName = '';
 	}
 
 	generateCourseDetailTitle(itemTitle, secondTitle){
@@ -291,6 +293,7 @@ class CourseScene extends scene {
 	onCreate(data) {
 		this.setContentView(require('../../../res/tpl/CourseScene.tpl'), {}, 'CourseScene', {}, () => {
 			this.id = data.id;
+			this.sceneName = data.sceneName;
 			NotificationCenter.add('course_detail', this.detailObserver.bind(this));
 			NotificationCenter.add('course_status', this.courseStatusObserver.bind(this));
 			// check course is blank
@@ -336,7 +339,7 @@ class CourseScene extends scene {
 
 	//检查对课权限
 	isAuthorized(lessonSeq) {
-		if (this.isBought) {
+		if (this.sceneName === 'guidance' || this.isBought) {
 		  //is bought
 		  return true;
 	  } else if (0 === lessonSeq) {

+ 1 - 1
src/util/API/AJAXHelper.js

@@ -62,7 +62,7 @@ class AJAXHelper {
 		xmlHttpReq.setRequestHeader('uid', uid);
 		xmlHttpReq.setRequestHeader('sign', sign);
 		xmlHttpReq.setRequestHeader('terminal', platform);
-		xmlHttpReq.setRequestHeader('merchant', 'talenkid');
+		xmlHttpReq.setRequestHeader('merchant', 'angelbell');
 		xmlHttpReq.setRequestHeader('requestId', requestId);
 		xmlHttpReq.setRequestHeader('Authentication', sign); //header中增加Authentication以兼容老版本
 		xmlHttpReq.setRequestHeader('Content-Type', 'application/' + (method == 'POST' || method == 'PUT' ? 'json' : 'text'));