|
@@ -24,6 +24,7 @@ export class UitlData {
|
|
|
url: string;
|
|
|
modelId?: number;
|
|
|
itemId?: string;
|
|
|
+ id?: string;
|
|
|
}
|
|
|
|
|
|
class common {
|
|
@@ -39,14 +40,16 @@ class common {
|
|
|
|
|
|
isDebug: boolean = false;
|
|
|
project: string = "luojigou_yinliu";
|
|
|
- itemId: string = '';
|
|
|
+ itemId: string = '';// 单级id
|
|
|
+ courseId: string = ''; // 课程id
|
|
|
+ huodongId: string = '';
|
|
|
unitCur: number = 1;// 第几集,从1开始
|
|
|
pageCur: number = 1;// 第几个游戏,从1开始
|
|
|
isCanPlayVideo = false;
|
|
|
attributeMap: any = {};// 内部形式为 { "0" : AttributeUtil }
|
|
|
urlToken: string = 'https://open.api.luojigou.vip/mall/mobile/common/verify/token';// 验证token的地址;
|
|
|
urlOver: string = 'https://open.api.luojigou.vip/app/app/gameCourse/record';// 当前集游戏完结,上报地址;
|
|
|
- urlClass: string = 'https://luojigou.vip/ac/#/courseDetail?id=1568062284888866817&mode=luojigou';// 课程页
|
|
|
+ urlClass: string = 'https://luojigou.vip/ac/#/courseDetail';// 课程页
|
|
|
objRes: any = {};//通用音频
|
|
|
timeStart: number = 0;
|
|
|
|
|
@@ -66,6 +69,17 @@ class common {
|
|
|
this.itemId = id;
|
|
|
};
|
|
|
|
|
|
+ getCourseId() {
|
|
|
+ if (this.courseId == null || this.courseId == '') {
|
|
|
+ this.courseId = '1568062284888866817';
|
|
|
+ }
|
|
|
+ return this.courseId;
|
|
|
+ };
|
|
|
+
|
|
|
+ setCourseId(id) {
|
|
|
+ this.courseId = id;
|
|
|
+ };
|
|
|
+
|
|
|
getUnitNum() {
|
|
|
return this.unitCur > 0 ? this.unitCur : 1;
|
|
|
};
|
|
@@ -181,6 +195,12 @@ class common {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ /** 更换浏览器地址 */
|
|
|
+ httpReplaceUrl(url: string){
|
|
|
+ window.location.href = url + '?id=' + this.getCourseId() + '&mode=luojigou';
|
|
|
+ // window.location.replace(url);
|
|
|
+ }
|
|
|
+
|
|
|
/** cocos日志打印 */
|
|
|
log(...params: any) {
|
|
|
// if (!CC_DEBUG) return;
|