Commit 29791e8e 29791e8e56bc94b8862aa825b992893d87399678 by 金学艇

添加探针

修改福建服务器地址
1 parent a8be5b38
...@@ -207,7 +207,7 @@ ...@@ -207,7 +207,7 @@
207 "array": [ 207 "array": [
208 0, 208 0,
209 0, 209 0,
210 247.68325805664062, 210 186.19546508789062,
211 0, 211 0,
212 0, 212 0,
213 0, 213 0,
...@@ -1167,7 +1167,7 @@ ...@@ -1167,7 +1167,7 @@
1167 "__id__": 2 1167 "__id__": 2
1168 }, 1168 },
1169 "_children": [], 1169 "_children": [],
1170 "_active": true, 1170 "_active": false,
1171 "_components": [ 1171 "_components": [
1172 { 1172 {
1173 "__id__": 27 1173 "__id__": 27
......
1 var Common = require('Common'); 1 var Common = require('Common');
2 var Network = require('Network'); 2 var Network = require('Network');
3 //var ListView = require('ListView'); 3 //var ListView = require('ListView');
4 cc.Class({ 4 cc.Class({
...@@ -6,212 +6,213 @@ cc.Class({ ...@@ -6,212 +6,213 @@ cc.Class({
6 6
7 properties: { 7 properties: {
8 //键值由具体场景决定 8 //键值由具体场景决定
9 _aSceneContext:{default:[]}, 9 _aSceneContext: { default: [] },
10 _aSceneParameter:{default:[]}, 10 _aSceneParameter: { default: [] },
11 _bBackStatus:false, 11 _bBackStatus: false,
12 _iDefaultCollectionId:-1, 12 _iDefaultCollectionId: -1,
13 _oScene : null, 13 _oScene: null,
14 _strSceneName : "", 14 _strSceneName: "",
15 }, 15 },
16 16
17 // use this for initialization 17 // use this for initialization
18 onLoad: function () { 18 onLoad: function () {
19 this._aSceneContext=[]; 19 this._aSceneContext = [];
20 this._aSceneParameter=[]; 20 this._aSceneParameter = [];
21 //探针相关 21 //探针相关
22 this._oProbe = this.initProbe(); 22 this._oProbe = this.initProbe();
23 }, 23 },
24 setScene : function(oScene){ 24 setScene: function (oScene) {
25 this._strSceneName = cc.director.getScene().name; 25 this._strSceneName = cc.director.getScene().name;
26 this._oScene = oScene; 26 this._oScene = oScene;
27 }, 27 },
28 getScene : function(){ 28 getScene: function () {
29 return this._oScene; 29 return this._oScene;
30 }, 30 },
31 getSceneContext:function(){ 31 getSceneContext: function () {
32 return this._aSceneContext; 32 return this._aSceneContext;
33 }, 33 },
34 popSceneContext:function(){ 34 popSceneContext: function () {
35 return this._aSceneContext.pop(); 35 return this._aSceneContext.pop();
36 }, 36 },
37 getTopSceneContext:function(){ 37 getTopSceneContext: function () {
38 return this._aSceneContext[this._aSceneContext.length-1]; 38 return this._aSceneContext[this._aSceneContext.length - 1];
39 }, 39 },
40 setSceneContext:function(aSceneContext){ 40 setSceneContext: function (aSceneContext) {
41 this._aSceneContext=aSceneContext; 41 this._aSceneContext = aSceneContext;
42 }, 42 },
43 getSceneParameter:function(){ 43 getSceneParameter: function () {
44 return this._aSceneParameter; 44 return this._aSceneParameter;
45 }, 45 },
46 popSceneParameter:function(){ 46 popSceneParameter: function () {
47 return this._aSceneParameter.pop(); 47 return this._aSceneParameter.pop();
48 }, 48 },
49 getTopSceneParameter:function(){ 49 getTopSceneParameter: function () {
50 if(this._aSceneParameter.length){ 50 if (this._aSceneParameter.length) {
51 return this._aSceneParameter[this._aSceneParameter.length-1]; 51 return this._aSceneParameter[this._aSceneParameter.length - 1];
52 }else{ 52 } else {
53 return null; 53 return null;
54 } 54 }
55 55
56 }, 56 },
57 setSceneParameter:function(aSceneParameter){ 57 setSceneParameter: function (aSceneParameter) {
58 this._aSceneParameter=aSceneParameter; 58 this._aSceneParameter = aSceneParameter;
59 }, 59 },
60 getBackStatus:function(){ 60 getBackStatus: function () {
61 return this._bBackStatus; 61 return this._bBackStatus;
62 }, 62 },
63 63
64 setBackStatus:function(bBackStatus){ 64 setBackStatus: function (bBackStatus) {
65 this._bBackStatus=bBackStatus; 65 this._bBackStatus = bBackStatus;
66 }, 66 },
67 getDefaultCollectionId:function(){ 67 getDefaultCollectionId: function () {
68 return this._iDefaultCollectionId; 68 return this._iDefaultCollectionId;
69 }, 69 },
70 70
71 setDefaultCollectionId:function(iCollectionId){ 71 setDefaultCollectionId: function (iCollectionId) {
72 this._iDefaultCollectionId=iCollectionId; 72 this._iDefaultCollectionId = iCollectionId;
73 }, 73 },
74 initProbe : function(){ 74 initProbe: function () {
75 try{ 75 try {
76 let _this = this; 76 let _this = this;
77 //对于ajax进行拦截 77 //对于ajax进行拦截
78 let fnTempAjax = Network.ajax; 78 let fnTempAjax = Network.ajax;
79 Network.ajax = function (strMethod, strURL, astrContentType, oDataOrPostBody, onSuccess, onError, oScope, oAdditionalData) { 79 Network.ajax = function (strMethod, strURL, astrContentType, oDataOrPostBody, onSuccess, onError, oScope, oAdditionalData) {
80 if(_this._oScene&&_this._oScene._bIsFocusInit){ 80 if (_this._oScene && _this._oScene._bIsFocusInit) {
81 cc.log("strURL==>"+strURL); 81 cc.log("strURL==>" + strURL);
82 if(-1!=strURL.indexOf("User/AddMedia2Collection")){ 82 if (-1 != strURL.indexOf("User/AddMedia2Collection")) {
83 console.log(strURL); 83 console.log(strURL);
84 console.log(oDataOrPostBody); 84 console.log(oDataOrPostBody);
85 _this._oProbe.requestProbe("MediaCollect",{ 85 _this._oProbe.requestProbe("MediaCollect", {
86 "mediaId" : oDataOrPostBody.mediaId, 86 "mediaId": oDataOrPostBody.mediaId,
87 "mediaCode" : oAdditionalData.code 87 "mediaCode": oAdditionalData.code
88 }); 88 });
89 } 89 }
90 if(-1!=strURL.indexOf("User/RemoveMediaFromCollection")){ 90 if (-1 != strURL.indexOf("User/RemoveMediaFromCollection")) {
91 console.log(strURL); 91 console.log(strURL);
92 console.log(oDataOrPostBody); 92 console.log(oDataOrPostBody);
93 _this._oProbe.requestProbe("MediaUncollect",{ 93 _this._oProbe.requestProbe("MediaUncollect", {
94 "mediaId" : oDataOrPostBody.mediaId, 94 "mediaId": oDataOrPostBody.mediaId,
95 "mediaCode" : oAdditionalData.code 95 "mediaCode": oAdditionalData.code
96 }); 96 });
97 } 97 }
98 } 98 }
99 fnTempAjax.call(Network,strMethod, strURL, astrContentType, oDataOrPostBody, onSuccess, onError, oScope, oAdditionalData); 99 fnTempAjax.call(Network, strMethod, strURL, astrContentType, oDataOrPostBody, onSuccess, onError, oScope, oAdditionalData);
100 } 100 }
101 return { 101 return {
102 oSceneUIMap : { 102 oSceneUIMap: {
103 "sceneMain" : "index" 103 "sceneMain": "index"
104 }, 104 },
105 oCommonParam : { 105 oCommonParam: {
106 product :"Melody", 106 product: "ForFun",
107 sessionId : "", 107 sessionId: "",
108 version : Common.VERSION, 108 version: Common.VERSION,
109 userId : Common.USER_ID, 109 userId: Common.USER_ID,
110 action : "", 110 action: "",
111 }, 111 },
112 loginEntrance : "", 112 loginEntrance: "",
113 lastActiveTime : "", 113 lastActiveTime: "",
114 uuid : "", 114 uuid: "",
115 inited : false, 115 inited: false,
116 jumpCode : "", 116 jumpCode: "",
117 productId : "", 117 productId: "",
118 productPrice : "", 118 productPrice: "",
119 aInterActive : [], 119 aInterActive: [],
120 aCollectActive : [], 120 aCollectActive: [],
121 oActionEvoker : null, 121 oActionEvoker: null,
122 oActionList : null, 122 oActionList: null,
123 aDataShowScene : ["sceneAudioPlayer","sceneCategoryList","sceneCollectionList","sceneFreeList","sceneHistoryList","sceneHotCategoryWithScreen", 123 aDataShowScene: ["sceneAudioPlayer", "sceneCategoryList", "sceneCollectionList", "sceneFreeList", "sceneHistoryList", "sceneHotCategoryWithScreen",
124 "sceneKTVPlayer","sceneRankList","sceneSearch","sceneShop","sceneSongLibraryInPlayer","sceneStarPersonalSection","sceneSubIndex","sceneSubjectList","sceneTagList"], 124 "sceneKTVPlayer", "sceneRankList", "sceneSearch", "sceneShop", "sceneSongLibraryInPlayer", "sceneStarPersonalSection", "sceneSubIndex", "sceneSubjectList", "sceneTagList"],
125 init : function(){ 125 init: function () {
126 try{ 126 try {
127 this.lastActiveTime = this.lastActiveTime || 0; 127 this.lastActiveTime = this.lastActiveTime || 0;
128 this.updateActive(); 128 this.updateActive();
129 this.uuid = this.uuid || Common.uuid(32,16); 129 this.uuid = this.uuid || Common.uuid(32, 16);
130 this.sessionId = this.uuid || Common.uuid(32,16); 130 this.sessionId = this.uuid || Common.uuid(32, 16);
131 this.inited = true; 131 this.inited = true;
132 }catch(err){ 132 } catch (err) {
133 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V","init in Application Error==>"+err); 133 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V", "init in Application Error==>" + err);
134 } 134 }
135 }, 135 },
136 updateActive : function (){//更新active,每次动作更新lastActiveTime 136 updateActive: function () {//更新active,每次动作更新lastActiveTime
137 try{ 137 try {
138 let iCurrentTime=new Date().getTime(); 138 let iCurrentTime = new Date().getTime();
139 if( iCurrentTime - this.lastActiveTime >= 20*60*1000 ){//超过20分钟时 2分钟用来测试来着 todo: 139 if (iCurrentTime - this.lastActiveTime >= 20 * 60 * 1000) {//超过20分钟时 2分钟用来测试来着 todo:
140 this.lastActiveTime = iCurrentTime;//更新lastActiveTime时间 140 this.lastActiveTime = iCurrentTime;//更新lastActiveTime时间
141 this.uuid = Common.uuid(32,16);//更新uuid 141 this.uuid = Common.uuid(32, 16);//更新uuid
142 this.oCommonParam.sessionId = this.uuid; 142 this.oCommonParam.sessionId = this.uuid;
143 } 143 }
144 this.lastActiveTime=iCurrentTime;//更新动作时间 144 this.lastActiveTime = iCurrentTime;//更新动作时间
145 }catch(err){ 145 } catch (err) {
146 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V","updateActive in Application Error==>"+err); 146 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V", "updateActive in Application Error==>" + err);
147 } 147 }
148 148
149 }, 149 },
150 requestProbe : function(strType,oExtra){ 150 requestProbe: function (strType, oExtra) {
151 try{ 151 try {
152 this.updateActive(); 152 this.updateActive();
153 let oParam = Common.assign({},this.oCommonParam); 153 let oParam = Common.assign({}, this.oCommonParam);
154 oParam.action = strType; 154 oParam.action = strType;
155 let obj = {}; 155 let obj = {};
156 switch(strType){ 156 switch (strType) {
157 case "Login"://登录 157 case "Login"://登录
158 obj = { 158 obj = {
159 "productId":Common.AUTH_PRODUCT,//鉴权成功的产品Id 159 "productId": Common.AUTH_PRODUCT,//鉴权成功的产品Id
160 } 160 }
161 break; 161 break;
162 case "UIEnter"://页面进入 162 case "UIEnter"://页面进入
163 if(!this.inited){ 163 cc.log("UIEnter...");
164 if (!this.inited) {
164 this.init(); 165 this.init();
165 //对按键进行拦截 166 //对按键进行拦截
166 let self = this; 167 let self = this;
167 let fnKeyDown = _this._oScene.onKeyDown; 168 let fnKeyDown = _this._oScene.onKeyDown;
168 _this._oScene.onKeyDown = function(event){ 169 _this._oScene.onKeyDown = function (event) {
169 self.updateActive(); 170 self.updateActive();
170 fnKeyDown.call(_this._oScene,event); 171 fnKeyDown.call(_this._oScene, event);
171 } 172 }
172 } 173 }
173 174
174 obj = { 175 obj = {
175 "parameters":_this.getTopSceneParameter(), 176 "parameters": _this.getTopSceneParameter(),
176 "ui" : this.oSceneUIMap[_this._strSceneName] || _this._strSceneName, 177 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
177 "jumpCode":this.jumpCode || "-" 178 "jumpCode": this.jumpCode || "-"
178 } 179 }
179 break; 180 break;
180 case "UILeave"://页面离开 181 case "UILeave"://页面离开
181 this.jumpCode = Common.uuid(32,16); 182 this.jumpCode = Common.uuid(32, 16);
182 obj = { 183 obj = {
183 "context" : _this._oScene._oSceneContext, 184 "context": _this._oScene._oSceneContext,
184 "ui" : this.oSceneUIMap[_this._strSceneName] || _this._strSceneName, 185 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
185 "jumpCode" : this.jumpCode,//页面离开进来jumpcode对应 186 "jumpCode": this.jumpCode,//页面离开进来jumpcode对应
186 } 187 }
187 Common.assign(obj,_this._oScene._fiCurrentFocus&&_this._oScene._fiCurrentFocus.getFocusProbeInfo() || {}); 188 Common.assign(obj, _this._oScene._fiCurrentFocus && _this._oScene._fiCurrentFocus.getFocusProbeInfo() || {});
188 break; 189 break;
189 case "interActive"://页面交互 190 case "interActive"://页面交互
190 obj = { 191 obj = {
191 "ui" : this.oSceneUIMap[_this._strSceneName] || _this._strSceneName, 192 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
192 "context":this.oActionContext||_this._oScene._oSceneContext, 193 "context": this.oActionContext || _this._oScene._oSceneContext,
193 "actionTime":this.lastActiveTime 194 "actionTime": this.lastActiveTime
194 } 195 }
195 break; 196 break;
196 case "MediaPlay": 197 case "MediaPlay":
197 case "MediaPause": 198 case "MediaPause":
198 case "MediaStop": 199 case "MediaStop":
199 case "MediaPlayAvailable": 200 case "MediaPlayAvailable":
200 case "MediaSeek"://播控相关 201 case "MediaSeek"://播控相关
201 obj={ 202 obj = {
202 "mediaId":parseInt(_this._oScene._strRequestMediaId), 203 "mediaId": parseInt(_this._oScene._strRequestMediaId),
203 "mediaCode":_this._oScene._strRequestMediaCode, 204 "mediaCode": _this._oScene._strRequestMediaCode,
204 "appId":_this._oScene._strAppId, 205 "appId": _this._oScene._strAppId,
205 "actionTime":new Date().getTime() 206 "actionTime": new Date().getTime()
206 } 207 }
207 break 208 break
208 case "MediaCollect"://收藏 209 case "MediaCollect"://收藏
209 case "MediaUncollect"://取消收藏 210 case "MediaUncollect"://取消收藏
210 obj = { 211 obj = {
211 "ui" : this.oSceneUIMap[_this._strSceneName] || _this._strSceneName, 212 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
212 "mediaId":parseInt(_this._oScene._strRequestMediaId), 213 "mediaId": parseInt(_this._oScene._strRequestMediaId),
213 "mediaCode":_this._oScene._strRequestMediaCode, 214 "mediaCode": _this._oScene._strRequestMediaCode,
214 "appId":_this._oScene._strAppId 215 "appId": _this._oScene._strAppId
215 } 216 }
216 break; 217 break;
217 case "Subscribing"://订购发起 218 case "Subscribing"://订购发起
...@@ -219,141 +220,155 @@ cc.Class({ ...@@ -219,141 +220,155 @@ cc.Class({
219 case "Unsubscribing"://退订发起 220 case "Unsubscribing"://退订发起
220 case "Unsubscribed"://退订结果 221 case "Unsubscribed"://退订结果
221 obj = { 222 obj = {
222 "productId" : Common.AUTH_PRODUCT, 223 "productId": Common.AUTH_PRODUCT,
223 "transactionId" : "", 224 "transactionId": "",
224 "actionTime":new Date().getTime() 225 "actionTime": new Date().getTime()
225 } 226 }
226 break; 227 break;
227 case "mediaSearch"://搜索行为 228 case "mediaSearch"://搜索行为
228 obj = { 229 obj = {
229 "ui" : this.oSceneUIMap[_this._strSceneName] || _this._strSceneName, 230 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
230 } 231 }
231 break; 232 break;
232 case "mediaSearchAccept"://搜索采纳 233 case "mediaSearchAccept"://搜索采纳
233 let olink = _this._oScene._fiCurrentFocus&&_this._oScene._fiCurrentFocus.getFocusProbeInfo() || {}; 234 let olink = _this._oScene._fiCurrentFocus && _this._oScene._fiCurrentFocus.getFocusProbeInfo() || {};
234 let oLinkPoint = olink.linkPoint; 235 let oLinkPoint = olink.linkPoint;
235 obj = { 236 obj = {
236 "ui" : this.oSceneUIMap[_this._strSceneName] || _this._strSceneName, 237 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
237 "keyword" : _this._oScene._oSceneContext.currentKeyword 238 "keyword": _this._oScene._oSceneContext.currentKeyword
239 }
240 obj[oLinkPoint.type + "Id"] = oLinkPoint.id;
241 obj[oLinkPoint.type + "Code"] = oLinkPoint.code;
242 break;
243 case "playOBiGame"://页面报错了
244 obj = {
245 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
246 "context": _this._oScene._oSceneContext,
247 }
248 break;
249 case "playGame"://页面报错了
250 obj = {
251 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
252 "context": _this._oScene._oSceneContext,
238 } 253 }
239 obj[oLinkPoint.type+"Id"] = oLinkPoint.id;
240 obj[oLinkPoint.type+"Code"] = oLinkPoint.code;
241 break; 254 break;
242 case "error"://页面报错了 255 case "error"://页面报错了
243 obj = { 256 obj = {
244 "ui" : this.oSceneUIMap[_this._strSceneName] || _this._strSceneName, 257 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
245 "context":_this._oScene._oSceneContext, 258 "context": _this._oScene._oSceneContext,
246 } 259 }
247 break; 260 break;
248 } 261 }
249 if(oExtra){ 262 if (oExtra) {
250 Common.assign(obj,oExtra); 263 Common.assign(obj, oExtra);
251 } 264 }
252 Common.assign(oParam,obj); 265 Common.assign(oParam, obj);
253 var aProbeArray = []; 266 var aProbeArray = [];
254 if(strType == "UILeave"&&this.aInterActive.length){ 267 if (strType == "UILeave" && this.aInterActive.length) {
268 aProbeArray.push(oParam);
255 // fnTempAjax('GET',BI_BASE_PATH,null,this.aInterActive,function(responseText){ 269 // fnTempAjax('GET',BI_BASE_PATH,null,this.aInterActive,function(responseText){
256 270
257 // // Log.info("probe Business::"); 271 // // Log.info("probe Business::");
258 // },function(responseText){ 272 // },function(responseText){
259 // // Log.info("probe Communication::"); 273 // // Log.info("probe Communication::");
260 // }); 274 // });
261 // fnTempAjax('GET',BI_BASE_PATH,null,this.aCollectActive,function(responseText){ 275 // fnTempAjax('GET',BI_BASE_PATH,null,this.aCollectActive,function(responseText){
262 276
263 // // Log.info("probe Business::"); 277 // // Log.info("probe Business::");
264 // },function(responseText){ 278 // },function(responseText){
265 // // Log.info("probe Communication::"); 279 // // Log.info("probe Communication::");
266 // }); 280 // });
267 this.aInterActive = []; 281 this.aInterActive = [];
268 this.aCollectActive = []; 282 this.aCollectActive = [];
269 }else if( strType == "interActive"){ 283 } else if (strType == "interActive") {
270 if(_this._oScene&&_this._oScene._bIsFocusInit){ 284 if (_this._oScene && _this._oScene._bIsFocusInit) {
271 this.aInterActive.push([oParam]); 285 this.aInterActive.push([oParam]);
272 if(this.aInterActive.length < 3){ 286 if (this.aInterActive.length < 3) {
273 return; 287 return;
274 } 288 }
275 aProbeArray = this.aInterActive; 289 aProbeArray = this.aInterActive;
276 this.aInterActive = []; 290 this.aInterActive = [];
277 } 291 }
278 }else if( strType == "MediaCollect" || strType == "MediaUncollect"){ 292 } else if (strType == "MediaCollect" || strType == "MediaUncollect") {
279 this.aCollectActive.push([oParam]); 293 this.aCollectActive.push([oParam]);
280 if(this.aCollectActive.length < 4){ 294 if (this.aCollectActive.length < 4) {
281 return; 295 return;
282 } 296 }
283 aProbeArray = this.aCollectActive; 297 aProbeArray = this.aCollectActive;
284 this.aCollectActive = []; 298 this.aCollectActive = [];
285 }else{ 299 } else {
286 aProbeArray.push(oParam); 300 aProbeArray.push(oParam);
287 } 301 }
288 console.log("============================"); 302 console.log("============================");
289 console.log(aProbeArray); 303 console.log(aProbeArray);
290 var oArgs={ 304 var oArgs = {
291 'ray': encodeURIComponent(JSON.stringify([aProbeArray]))//数组作为参数值传到ray参数里边 305 'ray': encodeURIComponent(JSON.stringify(aProbeArray))//数组作为参数值传到ray参数里边
292 } 306 }
293 // fnTempAjax('GET',BI_BASE_PATH,null,oArgs,function(responseText){ 307 fnTempAjax('GET', Common.BI_BASE_PATH, null, oArgs, function (responseText) { //打开发送探针
294 // // Log.info("probe Business::"); 308 // Log.info("probe Business::");
295 // },function(responseText){ 309 cc.log("UIEnter success..." + responseText);
296 // // Log.info("probe Communication::"); 310 }, function (responseText) {
297 // }); 311 // Log.info("probe Communication::");
298 }catch(err){ 312 });
299 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V","requestProbe in Application Error==>"+err); 313 } catch (err) {
314 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V", "requestProbe in Application Error==>" + err);
300 } 315 }
301 316
302 } 317 }
303 } 318 }
304 }catch(err){ 319 } catch (err) {
305 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V","initProbe in Application Error==>"+err); 320 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V", "initProbe in Application Error==>" + err);
306 } 321 }
307 322
308 }, 323 },
309 probeInterceptScrollStart : function(oList){ 324 probeInterceptScrollStart: function (oList) {
310 try{ 325 try {
311 let _this = this; 326 let _this = this;
312 let fnTemp = this._oScene.onListScrollStart; 327 let fnTemp = this._oScene.onListScrollStart;
313 this._oScene.onListScrollStart = function(){ 328 this._oScene.onListScrollStart = function () {
314 if(_this._oScene&&_this._oScene._bIsFocusInit){ 329 if (_this._oScene && _this._oScene._bIsFocusInit) {
315 _this.oActionEvoker = _this._oScene._fiCurrentFocus; 330 _this.oActionEvoker = _this._oScene._fiCurrentFocus;
316 _this.oActionList = oList; 331 _this.oActionList = oList;
317 cc.log("====================================="); 332 cc.log("=====================================");
318 cc.log(oList); 333 cc.log(oList);
319 cc.log(_this.oActionEvoker.node.name); 334 cc.log(_this.oActionEvoker.node.name);
320 } 335 }
321 336
322 fnTemp.call(_this._oScene); 337 fnTemp.call(_this._oScene);
323 } 338 }
324 }catch(err){ 339 } catch (err) {
325 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V","probeInterceptScrollStart in Application Error==>"+err); 340 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V", "probeInterceptScrollStart in Application Error==>" + err);
326 } 341 }
327 342
328 }, 343 },
329 probeInterceptScrollEnd : function(oList){ 344 probeInterceptScrollEnd: function (oList) {
330 try{ 345 try {
331 let _this = this; 346 let _this = this;
332 let fnTemp = this._oScene.onListScrollEnd; 347 let fnTemp = this._oScene.onListScrollEnd;
333 this._oScene.onListScrollEnd = function(){ 348 this._oScene.onListScrollEnd = function () {
334 if(_this._oScene&&_this._oScene._bIsFocusInit){ 349 if (_this._oScene && _this._oScene._bIsFocusInit) {
335 let strModuleName = oList.node.name; 350 let strModuleName = oList.node.name;
336 let strEvoke = "UIButton"; 351 let strEvoke = "UIButton";
337 if(_this.oActionEvoker&&-1!=Common.getNodePath(_this.oActionEvoker.node).indexOf(oList.node.name)){ 352 if (_this.oActionEvoker && -1 != Common.getNodePath(_this.oActionEvoker.node).indexOf(oList.node.name)) {
338 353
339 } 354 }
340 if(_this.oActionEvoker&&_this.oActionEvoker.node&&_this.oActionEvoker.node.name == "ScrollBarBlock"){ 355 if (_this.oActionEvoker && _this.oActionEvoker.node && _this.oActionEvoker.node.name == "ScrollBarBlock") {
341 strEvoke = "ScrollBar"; 356 strEvoke = "ScrollBar";
342 } 357 }
343 this._oProbe.requestProbe("interActive",{ 358 this._oProbe.requestProbe("interActive", {
344 "action" : "DataShow", 359 "action": "DataShow",
345 "module" : strModuleName, 360 "module": strModuleName,
346 "context" : { 361 "context": {
347 "pageIndex" :Math.ceil((oList._iRecordIndexOfFirstCellInPage+oList._iCellCountEachRow*oList._iShowCellRows)/oList._iCellCountEachRow/oList._iShowCellRows), 362 "pageIndex": Math.ceil((oList._iRecordIndexOfFirstCellInPage + oList._iCellCountEachRow * oList._iShowCellRows) / oList._iCellCountEachRow / oList._iShowCellRows),
348 "evoke" : strEvoke 363 "evoke": strEvoke
349 } 364 }
350 }); 365 });
351 } 366 }
352 367
353 fnTemp.call(_this._oScene); 368 fnTemp.call(_this._oScene);
354 } 369 }
355 }catch(err){ 370 } catch (err) {
356 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V","probeInterceptScrollEnd in Application Error==>"+err); 371 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V", "probeInterceptScrollEnd in Application Error==>" + err);
357 } 372 }
358 }, 373 },
359 }); 374 });
......
...@@ -9,7 +9,7 @@ cc.Class({ ...@@ -9,7 +9,7 @@ cc.Class({
9 }, 9 },
10 statics: { 10 statics: {
11 11
12 VERSION: "3.1.06", 12 VERSION: "1.1.0",
13 13
14 SCREEN_WIDTH: 1280.0, 14 SCREEN_WIDTH: 1280.0,
15 SCREEN_HEIGHT: 720.0, 15 SCREEN_HEIGHT: 720.0,
...@@ -52,13 +52,13 @@ cc.Class({ ...@@ -52,13 +52,13 @@ cc.Class({
52 OFFICIAL_PLATFORM_IP: 'http://139.196.192.33/', 52 OFFICIAL_PLATFORM_IP: 'http://139.196.192.33/',
53 TEST_PLATFORM_IP: 'http://139.196.192.242:8081/', 53 TEST_PLATFORM_IP: 'http://139.196.192.242:8081/',
54 54
55 TOPDRAW_API_SERVER: 'http://demo.cloud.api.findfun.topdraw.cn:38081/findfun/', 55 TOPDRAW_API_SERVER: 'http://forfun.fj.a183.ottcn.com:8082/clutch/apps/forfun/',
56 TOPDRAW_IMAGE_SERVER: 'http://demo.cloud.api.findfun.topdraw.cn:38081/findfun/', 56 TOPDRAW_IMAGE_SERVER: 'http://forfun.fj.a183.ottcn.com:8082/clutch/apps/forfun/',
57 57
58 TOPDRAW_LOG_SERVER: 'http://139.196.37.202/sparrow.resource/', 58 TOPDRAW_LOG_SERVER: 'http://139.196.37.202/sparrow.resource/',
59 // BI_BASE_PATH : 'http://139.196.192.242:81/1.gif', 59 // BI_BASE_PATH : 'http://139.196.192.242:81/1.gif',
60 BI_BASE_PATH: 'http://melody.hi.a170.ottcn.com:80/1.gif', 60 BI_BASE_PATH: 'http://112.47.3.214:9092/taohaowan.gif',
61 BI_BASE_PATH_NEW: 'http://melody.hi.a170.ottcn.com:80/2.gif', 61 BI_BASE_PATH_NEW: 'http://112.47.3.214:9092/taohaowan.gif',
62 62
63 TV_LINK_ACTION_CLICK: 100, 63 TV_LINK_ACTION_CLICK: 100,
64 TV_LINK_ACTION_HOVER: 101, 64 TV_LINK_ACTION_HOVER: 101,
......
...@@ -498,12 +498,14 @@ cc.Class({ ...@@ -498,12 +498,14 @@ cc.Class({
498 } 498 }
499 if (this._bIsExistApk == "true") { 499 if (this._bIsExistApk == "true") {
500 if (this._oSceneContext._downloadUrl && this._oSceneContext._downloadUrl != "undefined") { //如果有下载地址就启动奥比游戏 500 if (this._oSceneContext._downloadUrl && this._oSceneContext._downloadUrl != "undefined") { //如果有下载地址就启动奥比游戏
501 this._oProbe.requestProbe("playOBiGame");
501 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/common/TopdrawSDKWrapper", "startOBiGame", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", Common.TOPDRAW_API_SERVER + this._oSceneContext._downloadUrl, this._oSceneContext._packageName, this._oSceneContext._className, ""); 502 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/common/TopdrawSDKWrapper", "startOBiGame", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", Common.TOPDRAW_API_SERVER + this._oSceneContext._downloadUrl, this._oSceneContext._packageName, this._oSceneContext._className, "");
502 } else { 503 } else {
503 //这里应该转圈圈等待加载游戏 504 //这里应该转圈圈等待加载游戏
504 // cc.find("LoadingLabel", this.node).opacity = 255; 505 // cc.find("LoadingLabel", this.node).opacity = 255;
505 // cc.find("Loading/LoadingIcon", this.node).opacity = 255; 506 // cc.find("Loading/LoadingIcon", this.node).opacity = 255;
506 // cc.find("Loading/LoadingIcon", this.node).getComponent(cc.Animation).play(); 507 // cc.find("Loading/LoadingIcon", this.node).getComponent(cc.Animation).play();
508 this._oProbe.requestProbe("playGame");
507 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/common/TopdrawSDKWrapper", "startGame", "(Ljava/lang/String;Ljava/lang/String;)V", this._oSceneContext._packageName, ""); 509 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/common/TopdrawSDKWrapper", "startGame", "(Ljava/lang/String;Ljava/lang/String;)V", this._oSceneContext._packageName, "");
508 } 510 }
509 } else { 511 } else {
......