Browse Source

:art: 标签组改为标签类型

zhanghe 6 years ago
parent
commit
33c5c62528
3 changed files with 8 additions and 6 deletions
  1. 1 1
      src/stage/index/scene/CLScene.js
  2. 1 0
      src/util/API/AJAXHelper.js
  3. 6 5
      src/util/API/APIClient.js

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

@@ -162,7 +162,7 @@ class CLScene extends scene {
             periphery: 'PERIPHERY',
             resource: 'RESOURCE',
             training: 'TRAINING',
-        }[this.sceneType] || 'DEFAULT';
+        }[this.sceneType] || 'RESOURCE';
 
         APIClient.getTagListByGroupCode(type, (isTrue, res) => {
             if (!isTrue) { return; }

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

@@ -61,6 +61,7 @@ class AJAXHelper {
 		xmlHttpReq.setRequestHeader('eid', eid);
 		xmlHttpReq.setRequestHeader('uid', uid);
 		xmlHttpReq.setRequestHeader('sign', sign);
+		xmlHttpReq.setRequestHeader('merchant', 'baby');
 		xmlHttpReq.setRequestHeader('terminal', platform);
 		xmlHttpReq.setRequestHeader('requestId', requestId);
 		xmlHttpReq.setRequestHeader('Authentication', sign); //header中增加Authentication以兼容老版本

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

@@ -66,15 +66,16 @@ class APIClient {
 		AJAXHelper.get('/recommend/courses', params, callback);
 	}
 
-	// 获取标签组下的标签列表
+	// 获取标签组下的标签列表(标签组概念已去除,改用标签类型)
 	static getTagListByGroupCode(type, callback) {
 		const typeToCode = {
-			'RESOURCE': 'BABY_RESOURCE',
-			'TRAINING': 'BABY_TRAINING',
-			'PERIPHERY': 'BABY_SUPPORT',
+			'RESOURCE': 'RESOURCE',
+			'TRAINING': 'TRAINING',
+			'PERIPHERY': 'SUPPORT',
 		};
 		let params = APIClient.addCacheParam({});
-		AJAXHelper.get(`/tagGroup/${typeToCode[type]}`, params, callback);
+		//AJAXHelper.get(`/tagGroup/${typeToCode[type]}`, params, callback);
+		AJAXHelper.get(`/tagType/${typeToCode[type]}`, params, callback);
 	}
 
 	// 获取标签下的课程/配套列表