Commit 2b6708fb 2b6708fbd893283a0daa5ed874aa3e7ea7f0dda8 by 金学艇

1.解决张奇提出的打开斗宠游戏时回退详情页问题

1 parent fc6cb31e
Showing 37 changed files with 1346 additions and 66 deletions
......@@ -189,7 +189,7 @@
"array": [
0,
0,
271.0609130859375,
271.0659484863281,
0,
0,
0,
......@@ -2403,30 +2403,10 @@
"_aTouchContext": [],
"_defaultBackScene": null,
"_oFocusScaleFactorInfo": null,
"_bShowExitBox": false,
"PFB_COMMON": {
"__uuid__": "9e0214ed-5de0-4667-a660-d4fa85a5de1d"
},
"navi_json": {
"__uuid__": "b52b5c45-3b2c-48bf-82bf-fbf7a7b5278c"
},
"category_jtdr_list": {
"__uuid__": "3c2e60a0-50df-4278-b43f-3ffbac8482e2"
},
"category_all_list": {
"__uuid__": "d991c8db-2c35-4c35-9e8c-30b1ff8c6f37"
},
"category_nlbz_list": {
"__uuid__": "6cdbd5e2-9108-46a1-9a4b-a2a59db24726"
},
"category_3dyx_list": {
"__uuid__": "c3913569-3224-4557-aedd-a877a7c75939"
},
"category_xyx_list": {
"__uuid__": "cc6f6ba7-f4bb-4e55-91bc-07f20d4ae472"
},
"category_tjyz_list": {
"__uuid__": "b9e7fec5-a2b9-4f7f-b77a-0dcf9287a515"
},
"_id": "29JcsZqT9BNbjOtZhz1bBO"
}
]
\ No newline at end of file
......
......@@ -88,18 +88,21 @@
},
{
"__id__": 81
},
{
"__id__": 123
}
],
"_active": true,
"_components": [
{
"__id__": 123
"__id__": 126
},
{
"__id__": 124
"__id__": 127
},
{
"__id__": 127
"__id__": 130
}
],
"_prefab": null,
......@@ -189,7 +192,7 @@
"array": [
0,
0,
271.06060791015625,
271.0659484863281,
0,
0,
0,
......@@ -5627,6 +5630,128 @@
"_id": "8aIWz8zZxCP4axcGUrklyB"
},
{
"__type__": "cc.Node",
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 124
},
{
"__id__": 125
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 201.96,
"height": 30.24
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
529.02001953125,
-334.8800048828125,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "4dXUuunqJJT6XvENo3C40c"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 123
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "v1.0.2.2020031115",
"_N$string": "v1.0.2.2020031115",
"_fontSize": 24,
"_lineHeight": 24,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "7b9C6hrXdDmJgWuJmvuz4r"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 123
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 36,
"_left": 0,
"_right": 10,
"_top": 0,
"_bottom": 10,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "a7ErQkXEZAOoDGe+yWG8DZ"
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
......@@ -5665,6 +5790,7 @@
"_aTouchContext": [],
"_defaultBackScene": null,
"_oFocusScaleFactorInfo": null,
"_bShowExitBox": false,
"test_json": {
"__uuid__": "d797e6d8-b99b-4992-be3f-35357c9dcd65"
},
......@@ -5682,10 +5808,10 @@
},
"targetAry": [
{
"__id__": 125
"__id__": 128
},
{
"__id__": 126
"__id__": 129
}
],
"panel": {
......
......@@ -488,7 +488,7 @@ cc.Class({
this._ComOperation.initPlayer(0, 0, Common.SCREEN_WIDTH, Common.SCREEN_HEIGHT, true, true); //测试
let options = {};
options.playurl = "http://vjs.zencdn.net/v/oceans.mp4";
options.playurl = "https://135zyv5.xw0371.com/2018/10/29/X05c7CG3VB91gi1M/playlist.m3u8";
this._ComOperation.setURL(options); //测试播放地址
} catch (error) {
if (cc.sys.isNative) {
......
var Common = require('Common');
var Network = require('Network');
var CCNetwork = require('CCNetwork');
var TVFocus = require('TVFocus');
var CCTVFocus = require('CCTVFocus');
var FocusInfo = require('FocusInfo');
......@@ -48,14 +49,14 @@ cc.Class({
if (this.aCategoryListJson && this.aCategoryListJson.length > 0) {
return;
}
for (let i = 0; i < aJsonList.length; i++) { //这里可能会导致对应导航错乱
Network.ajax("GET", Common.TOPDRAW_API_SERVER + "main/" + aJsonList[i], null, null,
for (let i = 0; i < aJsonList.length; i++) { //这里可能会导致对应导航错乱,改为同步请求
CCNetwork.ajax("GET", Common.TOPDRAW_API_SERVER + "main/" + aJsonList[i], null, null,
function (strResponse) {
try {
// cc.log("远程数据:"+strResponse);
var oJSONResult = JSON.parse(strResponse);
this.aCategoryListJson.push(strResponse);
cc.log("请求数据返回:"+oJSONResult.count);
// cc.log("请求数据返回:" + oJSONResult.count);
} catch (error) {
cc.log("Business Exception:Get getCategoryListJsonRequest..." + error);
}
......
......@@ -1027,6 +1027,12 @@ cc.Class({
case cc.macro.KEY.enter:
case cc.macro.KEY.space:
case Common.ANDROID_KEY.enter:
//强制更新,点击取消就会退出应用
// if (this._bAbleHotUpdate && (0 == this._fiCurrentFocus.node.name.indexOf('close') || 0 == this._fiCurrentFocus.node.name.indexOf('close_btn'))) {
// cc.game.end();
// return;
// }
if (0 == this._fiCurrentFocus.node.name.indexOf('close') || 0 == this._fiCurrentFocus.node.name.indexOf('close_btn')) {
this._iSceneStatus = 0;
this._cFocus.hide();
......
var Common = require('Common');
var Network = require('Network');
/**
* xlr.open(strMethod, strURL, false);
* 将这里的异步请求改为同步请求
* 谨慎使用同步方法,已经被官方废弃,影响用户体验
*/
cc.Class({
extends: cc.Component,
statics: {
//ajax请求函数
ajax: function (strMethod, strURL, astrContentType, oDataOrPostBody, onSuccess, onError, oScope, oAdditionalData) {
try {
var xlr = null;
var oResult = {};
if (window.XMLHttpRequest) {// code for IE7, Firefox, Opera, etc.
xlr = new XMLHttpRequest(); //Log.info('XMLHttpRequest');
} else if (window.ActiveXObject) {// code for IE6, IE5
xlr = new ActiveXObject("Microsoft.XMLHTTP"); //Log.info('ActiveXObject');
}
if (!xlr) {
cc.log("Your browser does not support XMLHTTP, using iframe instead..");
//退化到使用iframe 在cocos中无用 //这里两个函数名需要字符串输入
//iframeRequest(strMethod, strURL, astrContentType, oDataOrPostBody, onSuccess, onError, oAdditionalData)
return;
}
function onStateChange() {
// oScope._cLog.screenI("Network.ajax==>"+xlr.readyState+"\r\n");
// oScope._cLog.screenI("Network.ajax==>"+xlr.status+"\r\n");
if (xlr.readyState == 4) {// 4 = "loaded"
if (xlr.status == 200) {// 200 = OK
if (null != oScope) {
onSuccess && onSuccess.call(oScope, xlr.responseText, oAdditionalData);
} else {
onSuccess && onSuccess(xlr.responseText, oAdditionalData);
}
} else {
if (null != oScope) {
onError && onError.call(oScope, xlr.responseText, oAdditionalData);
} else {
onError && onError(xlr.responseText, oAdditionalData);
}
}
xlr = null;
}
}
strMethod = strMethod.toUpperCase();
var strDataOrPostBody = '';
if (strMethod == "GET") {
//以下这段可使用正则表达式改造
if (oDataOrPostBody) {
if (strURL.indexOf('?') > 0) { //有问号
if (strURL.indexOf('=') > strURL.indexOf('?') //并且有等号在问号右边
&& strURL.lastIndexOf('&') != strURL.length - 1) //最后一个不是&
{
strURL = strURL.concat('&');
} else { //光有问号没等号
cc.log('Unavailable Request URL!');
return;
}
} else {//没问号
strURL = strURL.concat('?');
}
if (typeof oDataOrPostBody == "string") {
strDataOrPostBody = oDataOrPostBody;
} else if (oDataOrPostBody instanceof Object) {
for (var key in oDataOrPostBody) {
strDataOrPostBody = strDataOrPostBody.concat(key).concat('=').concat(oDataOrPostBody[key]).concat('&');
}
strDataOrPostBody = strDataOrPostBody.substring(0, strDataOrPostBody.length - 1);
//strDataOrPostBody.TrimEnd('&');
} else {
cc.log('Unavailable Parameters!');
return;
}
}
strURL = strURL.concat(strDataOrPostBody);
}
xlr.onreadystatechange = onStateChange;
// oScope._cLog.screenI("Network.ajax==>"+strMethod+"\r\n");
// oScope._cLog.screenI("Network.ajax==>"+strURL+"\r\n");
xlr.open(strMethod, strURL, false);
var isWWWFormURLEncoded = false;
if (astrContentType) {
for (var i = 0; i < astrContentType.length; i++) {
xlr.setRequestHeader('Content-type', astrContentType[i]);
if (astrContentType[i] == 'application/x-www-form-urlencoded') {
isWWWFormURLEncoded = true;
break;
}
}
}
//xlr.setRequestHeader('Connection', 'close');
switch (strMethod) {
case 'GET':
xlr.send(null);
break;
case 'POST':
if (isWWWFormURLEncoded) {
}
if (oDataOrPostBody) {
/*
if (isWWWFormURLEncoded) {
var fd=new FormData();
if (typeof oDataOrPostBody == "string") {
strDataOrPostBody = oDataOrPostBody;
var aParameters1=oDataOrPostBody.split('&');
for (var i=0;i<aParameters1.length;i++){
var aPairs1=aParameters1.split('=');
if (aPairs1[0] && aPairs1[1]){
fd.append(aPairs1[0],aPairs1[1]);
}
}
} else if (oDataOrPostBody instanceof Object) {
for (var key in oDataOrPostBody) {
fd.append(key,oDataOrPostBody[key]);
}
//strDataOrPostBody.TrimEnd('&');
//strDataOrPostBody = strDataOrPostBody.substring(0, strDataOrPostBody.length - 1);
} else {
console.log("Unavailable Parameters!");
return
}
xlr.send(fd);
}else{*/
if (typeof oDataOrPostBody == "string") {
strDataOrPostBody = oDataOrPostBody;
} else if (oDataOrPostBody instanceof Object) {
for (var key in oDataOrPostBody) {
strDataOrPostBody = strDataOrPostBody.concat(key).concat('=').concat(oDataOrPostBody[key]).concat('&');
}
//strDataOrPostBody.TrimEnd('&');
strDataOrPostBody = strDataOrPostBody.substring(0, strDataOrPostBody.length - 1);
} else {
oResult.businessCode = 'success';
oResult.description = 'Unavailable Parameters!';
return oResult;
}
xlr.send(strDataOrPostBody);
//}
} else {
xlr.send(null);
}
break;
}
} catch (err) {
oScope._cLog.screenI("Network.ajax error==>" + err + "\r\n");
}
},
},
// called every frame, uncomment this function to activate update callback
// update: function (dt) {
// },
});
This diff could not be displayed because it is too large.
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "勇敢的啫喱",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/勇敢的啫喱/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/勇敢的啫喱/截图2.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/勇敢的啫喱/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "魔法沙拉2",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/魔法沙拉2/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/魔法沙拉2/截图2.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/魔法沙拉2/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "AR真人快打",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/AR真人快打/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/AR真人快打/截图2.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/AR真人快打/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "拯救小羊",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/拯救小羊/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/拯救小羊/截图2.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/拯救小羊/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "奇幻海底",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《奇幻海底》的全新续作,《奇幻海底》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/奇幻海底/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/奇幻海底/截图2.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/奇幻海底/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "O宝互动书屋",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝互动书屋》的全新续作,《O宝互动书屋》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝互动书屋/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝互动书屋/截图2.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝互动书屋/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "红杏佛跳墙",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/红杏佛跳墙/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/红杏佛跳墙/截图2.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/红杏佛跳墙/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "热血篮球",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/热血篮球/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/热血篮球/截图2.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/热血篮球/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "O宝脑力训练",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝脑力训练/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝脑力训练/截图2.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝脑力训练/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "AR环保课堂",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/AR环保课堂/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/AR环保课堂/截图2.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/AR环保课堂/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "欢乐跳一跳",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/欢乐跳一跳/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/欢乐跳一跳/截图2.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/欢乐跳一跳/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "O宝单词连连看",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝单词连连看》的全新续作,《O宝单词连连看》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝单词连连看/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝单词连连看/截图2.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝单词连连看/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "疯狂赛车手",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/疯狂赛车手/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/疯狂赛车手/截图2.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/疯狂赛车手/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "O宝体能课堂",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝体能课堂》的全新续作,《O宝体能课堂》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝体能课堂/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝体能课堂/截图2.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝体能课堂/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "O宝欢乐剧场",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝欢乐剧场/截图1.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝欢乐剧场/截图2.jpg",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/O宝欢乐剧场/截图3.jpg",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "火箭小象",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/火箭小象/截图1.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/火箭小象/截图2.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/火箭小象/截图3.png",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "欢乐叠蛋糕",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/欢乐叠蛋糕/截图1.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/欢乐叠蛋糕/截图2.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/欢乐叠蛋糕/截图3.png",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "接糖果",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/接糖果/截图1.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/接糖果/截图2.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/接糖果/截图3.png",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "记忆翻牌",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/记忆翻牌/截图1.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/记忆翻牌/截图2.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/记忆翻牌/截图3.png",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "飞檐走壁",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/飞檐走壁/截图1.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/飞檐走壁/截图2.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/飞檐走壁/截图3.png",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "猜猜我是谁",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《猜猜我是谁》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/猜猜我是谁/截图1.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/猜猜我是谁/截图2.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/猜猜我是谁/截图3.png",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "它的颜色",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/它的颜色/截图1.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/它的颜色/截图2.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/它的颜色/截图3.png",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "旋转海盗",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/旋转海盗/截图1.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/旋转海盗/截图2.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/旋转海盗/截图3.png",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "奔跑吧小兔子",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/奔跑吧小兔子/截图1.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/奔跑吧小兔子/截图2.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/奔跑吧小兔子/截图3.png",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
{
"businessCode": "success",
"count": 1,
"resultSet": [
{
"name": "数一数",
"versions": "1.0.1",
"size": "99.73M",
"updateTime": "2019-12-25",
"tag": "",
"description": "简介:作为人气作品《O宝脑力训练》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......",
"images": {
"list": [
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/数一数/截图1.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/数一数/截图2.png",
"width": 274,
"height": 168
},
{
"extension": ".png",
"enable": true,
"fileUrl": "upload/image/gameDetail/数一数/截图3.png",
"width": 274,
"height": 168
}
]
}
}
]
}
\ No newline at end of file
......@@ -379,7 +379,7 @@
{
"name": "Subject1",
"imageURL": "upload/image/main/block7_1.png",
"tvlink": "",
"tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneVideoPlayer\"}}]}",
"code": "promotionItem_e432ac2d-c1f3-4d44-a42b-7000971affa1"
},
{
......
......@@ -3,15 +3,28 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyle"
<RelativeLayout
android:id="@+id/rl_img"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center" />
android:layout_height="match_parent"
android:visibility="gone"
android:background="@mipmap/icon_bg">
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:layout_below="@id/progressBar"
android:layout_centerHorizontal="true"
android:text="游戏加载中,请稍后。。。"/>
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/icon_bg"/>
</RelativeLayout>
\ No newline at end of file
......
......@@ -12,6 +12,7 @@ import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.Toast;
//import com.migu.sdk.api.PayCallBack;
......@@ -150,6 +151,8 @@ public class TopdrawSDKWrapper {
public static void startGame(String apkName, final String strJSCallBack) {
Log.d(TAG, "TopdrawSDKWrapper starGame start..." + apkName);
View view = _activity.getProgressBarView();
final RelativeLayout relativeLayout = view.findViewById(R.id.rl_img);
if (pluginLoaded) {
return;
}
......@@ -170,19 +173,12 @@ public class TopdrawSDKWrapper {
pluginLoaded = false;
// _activity.runOnUiThread(new Runnable() { //直接加载游戏,传回去进度是100
// @Override
// public void run() {
// _activity.runOnGLThread(new Runnable() {
// @Override
// public void run() {
// Cocos2dxJavascriptJavaBridge.evalString(
// "cc.find('Canvas',cc.director.getScene()).getComponent(cc.Topdraw.TVCanvas)." + strJSCallBack + "('" + 100 + "');" //modify jerry
// );
// }
// });
// }
// });
_activity.runOnUiThread(new Runnable() { //直接加载游戏,传回去进度是100
@Override
public void run() {
relativeLayout.setVisibility(View.VISIBLE); //展示加载过程中等待条
}
});
} catch (Exception e) {
e.printStackTrace();
}
......@@ -246,7 +242,7 @@ public class TopdrawSDKWrapper {
public static void startOBiGame(String downloadUrl, final String apkName, String claName, final String strJSCallBack) {
Log.d(TAG, "TopdrawSDKWrapper starObiGame start..." + apkName + " downloadUrl: " + downloadUrl + " className " + claName);
Log.d(TAG, "pluginLoaded..." + pluginLoaded);
if (pluginLoaded) {
return;
}
......@@ -258,6 +254,7 @@ public class TopdrawSDKWrapper {
public void onResult(int i, final String msg) {
if (0 == i) {
Log.d(TAG, "准备成功,准备启动。。。");
pluginLoaded = false;
if (!isApkInstalled(_activity, apkName)) {
startInstall(_activity, msg);
} else {
......@@ -265,7 +262,6 @@ public class TopdrawSDKWrapper {
Intent intent = new Intent();
intent.setComponent(new ComponentName(packageName, className));
_activity.startActivity(intent);
pluginLoaded = false;
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -42,6 +42,7 @@ import android.view.View;
import android.view.WindowManager;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import com.topdraw.component.CocosMediaPlayer;
import com.topdraw.forfun.R;
......@@ -57,6 +58,10 @@ public class AppActivity extends Cocos2dxActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//添加加载小游戏进度条(暂时将Cocos2dxActivity中的this.mGLSurfaceView.setZOrderOnTop(true);注释,否则显示不出来)
view = LayoutInflater.from(this).inflate(R.layout.activity_main, null);
final RelativeLayout relativeLayout = view.findViewById(R.id.rl_img);
mFrameLayout.addView(view);
receiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
......@@ -64,14 +69,12 @@ public class AppActivity extends Cocos2dxActivity {
runOnUiThread(new Runnable() { //直接加载游戏,传回去进度是100
@Override
public void run() {
runOnGLThread(new Runnable() {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Cocos2dxJavascriptJavaBridge.evalString(
"cc.find('Canvas',cc.director.getScene()).getComponent(cc.Topdraw.TVCanvas)." + "hideLoadingIcon" + "();" //modify jerry
);
relativeLayout.setVisibility(View.GONE);
}
});
}, 3 * 1000); //延迟3秒执行
}
});
}
......@@ -80,10 +83,6 @@ public class AppActivity extends Cocos2dxActivity {
filter.addAction("com.topdraw.plugin.createActivity");
registerReceiver(receiver, filter);
//添加加载小游戏进度条(暂时将Cocos2dxActivity中的this.mGLSurfaceView.setZOrderOnTop(true);注释,否则显示不出来)
// view = LayoutInflater.from(this).inflate(R.layout.activity_main, null);
// mFrameLayout.addView(view);
// Workaround in https://stackoverflow.com/questions/16283079/re-launch-of-activity-on-home-button-but-only-the-first-time/16447508
if (!isTaskRoot()) {
// Android launched another instance of the root activity into an existing task
......@@ -136,6 +135,7 @@ public class AppActivity extends Cocos2dxActivity {
@Override
protected void onPause() {
Log.d("AppActivity", "onPause()....");
super.onPause();
SDKWrapper.getInstance().onPause();
}
......@@ -167,6 +167,7 @@ public class AppActivity extends Cocos2dxActivity {
@Override
protected void onStop() {
Log.d("AppActivity", "onStop()....");
super.onStop();
SDKWrapper.getInstance().onStop();
}
......@@ -223,6 +224,10 @@ public class AppActivity extends Cocos2dxActivity {
});
}
public View getProgressBarView() {
return view;
}
//打出场景日志 Info
public static void logInSceneI(String strLog) {
Log.i("logInSceneI", strLog);
......