Commit a41fc0f8 a41fc0f89f53bcc6d1fc527ddf5b801926224ab0 by 金学艇

添加探针

修改四川服务器地址
1 parent f7e43cae
...@@ -6,191 +6,191 @@ cc.Class({ ...@@ -6,191 +6,191 @@ 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 if (!this.inited) {
164 this.init(); 164 this.init();
165 //对按键进行拦截 165 //对按键进行拦截
166 let self = this; 166 let self = this;
167 let fnKeyDown = _this._oScene.onKeyDown; 167 let fnKeyDown = _this._oScene.onKeyDown;
168 _this._oScene.onKeyDown = function(event){ 168 _this._oScene.onKeyDown = function (event) {
169 self.updateActive(); 169 self.updateActive();
170 fnKeyDown.call(_this._oScene,event); 170 fnKeyDown.call(_this._oScene, event);
171 } 171 }
172 } 172 }
173 173
174 obj = { 174 obj = {
175 "parameters":_this.getTopSceneParameter(), 175 "parameters": _this.getTopSceneParameter(),
176 "ui" : this.oSceneUIMap[_this._strSceneName] || _this._strSceneName, 176 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
177 "jumpCode":this.jumpCode || "-" 177 "jumpCode": this.jumpCode || "-"
178 } 178 }
179 break; 179 break;
180 case "UILeave"://页面离开 180 case "UILeave"://页面离开
181 this.jumpCode = Common.uuid(32,16); 181 this.jumpCode = Common.uuid(32, 16);
182 obj = { 182 obj = {
183 "context" : _this._oScene._oSceneContext, 183 "context": _this._oScene._oSceneContext,
184 "ui" : this.oSceneUIMap[_this._strSceneName] || _this._strSceneName, 184 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
185 "jumpCode" : this.jumpCode,//页面离开进来jumpcode对应 185 "jumpCode": this.jumpCode,//页面离开进来jumpcode对应
186 } 186 }
187 Common.assign(obj,_this._oScene._fiCurrentFocus&&_this._oScene._fiCurrentFocus.getFocusProbeInfo() || {}); 187 Common.assign(obj, _this._oScene._fiCurrentFocus && _this._oScene._fiCurrentFocus.getFocusProbeInfo() || {});
188 break; 188 break;
189 case "interActive"://页面交互 189 case "interActive"://页面交互
190 obj = { 190 obj = {
191 "ui" : this.oSceneUIMap[_this._strSceneName] || _this._strSceneName, 191 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
192 "context":this.oActionContext||_this._oScene._oSceneContext, 192 "context": this.oActionContext || _this._oScene._oSceneContext,
193 "actionTime":this.lastActiveTime 193 "actionTime": this.lastActiveTime
194 } 194 }
195 break; 195 break;
196 case "MediaPlay": 196 case "MediaPlay":
...@@ -198,20 +198,20 @@ cc.Class({ ...@@ -198,20 +198,20 @@ cc.Class({
198 case "MediaStop": 198 case "MediaStop":
199 case "MediaPlayAvailable": 199 case "MediaPlayAvailable":
200 case "MediaSeek"://播控相关 200 case "MediaSeek"://播控相关
201 obj={ 201 obj = {
202 "mediaId":parseInt(_this._oScene._strRequestMediaId), 202 "mediaId": parseInt(_this._oScene._strRequestMediaId),
203 "mediaCode":_this._oScene._strRequestMediaCode, 203 "mediaCode": _this._oScene._strRequestMediaCode,
204 "appId":_this._oScene._strAppId, 204 "appId": _this._oScene._strAppId,
205 "actionTime":new Date().getTime() 205 "actionTime": new Date().getTime()
206 } 206 }
207 break 207 break
208 case "MediaCollect"://收藏 208 case "MediaCollect"://收藏
209 case "MediaUncollect"://取消收藏 209 case "MediaUncollect"://取消收藏
210 obj = { 210 obj = {
211 "ui" : this.oSceneUIMap[_this._strSceneName] || _this._strSceneName, 211 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
212 "mediaId":parseInt(_this._oScene._strRequestMediaId), 212 "mediaId": parseInt(_this._oScene._strRequestMediaId),
213 "mediaCode":_this._oScene._strRequestMediaCode, 213 "mediaCode": _this._oScene._strRequestMediaCode,
214 "appId":_this._oScene._strAppId 214 "appId": _this._oScene._strAppId
215 } 215 }
216 break; 216 break;
217 case "Subscribing"://订购发起 217 case "Subscribing"://订购发起
...@@ -219,39 +219,39 @@ cc.Class({ ...@@ -219,39 +219,39 @@ cc.Class({
219 case "Unsubscribing"://退订发起 219 case "Unsubscribing"://退订发起
220 case "Unsubscribed"://退订结果 220 case "Unsubscribed"://退订结果
221 obj = { 221 obj = {
222 "productId" : Common.AUTH_PRODUCT, 222 "productId": Common.AUTH_PRODUCT,
223 "transactionId" : "", 223 "transactionId": "",
224 "actionTime":new Date().getTime() 224 "actionTime": new Date().getTime()
225 } 225 }
226 break; 226 break;
227 case "mediaSearch"://搜索行为 227 case "mediaSearch"://搜索行为
228 obj = { 228 obj = {
229 "ui" : this.oSceneUIMap[_this._strSceneName] || _this._strSceneName, 229 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
230 } 230 }
231 break; 231 break;
232 case "mediaSearchAccept"://搜索采纳 232 case "mediaSearchAccept"://搜索采纳
233 let olink = _this._oScene._fiCurrentFocus&&_this._oScene._fiCurrentFocus.getFocusProbeInfo() || {}; 233 let olink = _this._oScene._fiCurrentFocus && _this._oScene._fiCurrentFocus.getFocusProbeInfo() || {};
234 let oLinkPoint = olink.linkPoint; 234 let oLinkPoint = olink.linkPoint;
235 obj = { 235 obj = {
236 "ui" : this.oSceneUIMap[_this._strSceneName] || _this._strSceneName, 236 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
237 "keyword" : _this._oScene._oSceneContext.currentKeyword 237 "keyword": _this._oScene._oSceneContext.currentKeyword
238 } 238 }
239 obj[oLinkPoint.type+"Id"] = oLinkPoint.id; 239 obj[oLinkPoint.type + "Id"] = oLinkPoint.id;
240 obj[oLinkPoint.type+"Code"] = oLinkPoint.code; 240 obj[oLinkPoint.type + "Code"] = oLinkPoint.code;
241 break; 241 break;
242 case "error"://页面报错了 242 case "error"://页面报错了
243 obj = { 243 obj = {
244 "ui" : this.oSceneUIMap[_this._strSceneName] || _this._strSceneName, 244 "ui": this.oSceneUIMap[_this._strSceneName] || _this._strSceneName,
245 "context":_this._oScene._oSceneContext, 245 "context": _this._oScene._oSceneContext,
246 } 246 }
247 break; 247 break;
248 } 248 }
249 if(oExtra){ 249 if (oExtra) {
250 Common.assign(obj,oExtra); 250 Common.assign(obj, oExtra);
251 } 251 }
252 Common.assign(oParam,obj); 252 Common.assign(oParam, obj);
253 var aProbeArray = []; 253 var aProbeArray = [];
254 if(strType == "UILeave"&&this.aInterActive.length){ 254 if (strType == "UILeave" && this.aInterActive.length) {
255 // fnTempAjax('GET',BI_BASE_PATH,null,this.aInterActive,function(responseText){ 255 // fnTempAjax('GET',BI_BASE_PATH,null,this.aInterActive,function(responseText){
256 256
257 // // Log.info("probe Business::"); 257 // // Log.info("probe Business::");
...@@ -264,54 +264,55 @@ cc.Class({ ...@@ -264,54 +264,55 @@ cc.Class({
264 // },function(responseText){ 264 // },function(responseText){
265 // // Log.info("probe Communication::"); 265 // // Log.info("probe Communication::");
266 // }); 266 // });
267 aProbeArray.push(oParam);
267 this.aInterActive = []; 268 this.aInterActive = [];
268 this.aCollectActive = []; 269 this.aCollectActive = [];
269 }else if( strType == "interActive"){ 270 } else if (strType == "interActive") {
270 if(_this._oScene&&_this._oScene._bIsFocusInit){ 271 if (_this._oScene && _this._oScene._bIsFocusInit) {
271 this.aInterActive.push([oParam]); 272 this.aInterActive.push([oParam]);
272 if(this.aInterActive.length < 3){ 273 if (this.aInterActive.length < 3) {
273 return; 274 return;
274 } 275 }
275 aProbeArray = this.aInterActive; 276 aProbeArray = this.aInterActive;
276 this.aInterActive = []; 277 this.aInterActive = [];
277 } 278 }
278 }else if( strType == "MediaCollect" || strType == "MediaUncollect"){ 279 } else if (strType == "MediaCollect" || strType == "MediaUncollect") {
279 this.aCollectActive.push([oParam]); 280 this.aCollectActive.push([oParam]);
280 if(this.aCollectActive.length < 4){ 281 if (this.aCollectActive.length < 4) {
281 return; 282 return;
282 } 283 }
283 aProbeArray = this.aCollectActive; 284 aProbeArray = this.aCollectActive;
284 this.aCollectActive = []; 285 this.aCollectActive = [];
285 }else{ 286 } else {
286 aProbeArray.push(oParam); 287 aProbeArray.push(oParam);
287 } 288 }
288 console.log("============================"); 289 console.log("============================");
289 console.log(aProbeArray); 290 console.log(aProbeArray);
290 var oArgs={ 291 var oArgs = {
291 'ray': encodeURIComponent(JSON.stringify([aProbeArray]))//数组作为参数值传到ray参数里边 292 'ray': encodeURIComponent(JSON.stringify([aProbeArray]))//数组作为参数值传到ray参数里边
292 } 293 }
293 // fnTempAjax('GET',BI_BASE_PATH,null,oArgs,function(responseText){ 294 fnTempAjax('GET', Common.BI_BASE_PATH, null, oArgs, function (responseText) {
294 // // Log.info("probe Business::"); 295 // Log.info("probe Business::");
295 // },function(responseText){ 296 }, function (responseText) {
296 // // Log.info("probe Communication::"); 297 // Log.info("probe Communication::");
297 // }); 298 });
298 }catch(err){ 299 } catch (err) {
299 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V","requestProbe in Application Error==>"+err); 300 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V", "requestProbe in Application Error==>" + err);
300 } 301 }
301 302
302 } 303 }
303 } 304 }
304 }catch(err){ 305 } catch (err) {
305 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V","initProbe in Application Error==>"+err); 306 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V", "initProbe in Application Error==>" + err);
306 } 307 }
307 308
308 }, 309 },
309 probeInterceptScrollStart : function(oList){ 310 probeInterceptScrollStart: function (oList) {
310 try{ 311 try {
311 let _this = this; 312 let _this = this;
312 let fnTemp = this._oScene.onListScrollStart; 313 let fnTemp = this._oScene.onListScrollStart;
313 this._oScene.onListScrollStart = function(){ 314 this._oScene.onListScrollStart = function () {
314 if(_this._oScene&&_this._oScene._bIsFocusInit){ 315 if (_this._oScene && _this._oScene._bIsFocusInit) {
315 _this.oActionEvoker = _this._oScene._fiCurrentFocus; 316 _this.oActionEvoker = _this._oScene._fiCurrentFocus;
316 _this.oActionList = oList; 317 _this.oActionList = oList;
317 cc.log("====================================="); 318 cc.log("=====================================");
...@@ -321,39 +322,39 @@ cc.Class({ ...@@ -321,39 +322,39 @@ cc.Class({
321 322
322 fnTemp.call(_this._oScene); 323 fnTemp.call(_this._oScene);
323 } 324 }
324 }catch(err){ 325 } catch (err) {
325 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V","probeInterceptScrollStart in Application Error==>"+err); 326 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V", "probeInterceptScrollStart in Application Error==>" + err);
326 } 327 }
327 328
328 }, 329 },
329 probeInterceptScrollEnd : function(oList){ 330 probeInterceptScrollEnd: function (oList) {
330 try{ 331 try {
331 let _this = this; 332 let _this = this;
332 let fnTemp = this._oScene.onListScrollEnd; 333 let fnTemp = this._oScene.onListScrollEnd;
333 this._oScene.onListScrollEnd = function(){ 334 this._oScene.onListScrollEnd = function () {
334 if(_this._oScene&&_this._oScene._bIsFocusInit){ 335 if (_this._oScene && _this._oScene._bIsFocusInit) {
335 let strModuleName = oList.node.name; 336 let strModuleName = oList.node.name;
336 let strEvoke = "UIButton"; 337 let strEvoke = "UIButton";
337 if(_this.oActionEvoker&&-1!=Common.getNodePath(_this.oActionEvoker.node).indexOf(oList.node.name)){ 338 if (_this.oActionEvoker && -1 != Common.getNodePath(_this.oActionEvoker.node).indexOf(oList.node.name)) {
338 339
339 } 340 }
340 if(_this.oActionEvoker&&_this.oActionEvoker.node&&_this.oActionEvoker.node.name == "ScrollBarBlock"){ 341 if (_this.oActionEvoker && _this.oActionEvoker.node && _this.oActionEvoker.node.name == "ScrollBarBlock") {
341 strEvoke = "ScrollBar"; 342 strEvoke = "ScrollBar";
342 } 343 }
343 this._oProbe.requestProbe("interActive",{ 344 this._oProbe.requestProbe("interActive", {
344 "action" : "DataShow", 345 "action": "DataShow",
345 "module" : strModuleName, 346 "module": strModuleName,
346 "context" : { 347 "context": {
347 "pageIndex" :Math.ceil((oList._iRecordIndexOfFirstCellInPage+oList._iCellCountEachRow*oList._iShowCellRows)/oList._iCellCountEachRow/oList._iShowCellRows), 348 "pageIndex": Math.ceil((oList._iRecordIndexOfFirstCellInPage + oList._iCellCountEachRow * oList._iShowCellRows) / oList._iCellCountEachRow / oList._iShowCellRows),
348 "evoke" : strEvoke 349 "evoke": strEvoke
349 } 350 }
350 }); 351 });
351 } 352 }
352 353
353 fnTemp.call(_this._oScene); 354 fnTemp.call(_this._oScene);
354 } 355 }
355 }catch(err){ 356 } catch (err) {
356 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V","probeInterceptScrollEnd in Application Error==>"+err); 357 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V", "probeInterceptScrollEnd in Application Error==>" + err);
357 } 358 }
358 }, 359 },
359 }); 360 });
......
...@@ -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: 'sichuan-cmcc.api.forfun.topdraw.cn:8080/clutch/forfun/',
56 TOPDRAW_IMAGE_SERVER: 'http://demo.cloud.api.findfun.topdraw.cn:38081/findfun/', 56 TOPDRAW_IMAGE_SERVER: 'sichuan-cmcc.api.forfun.topdraw.cn:8080/clutch/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.18.251.224/taohaowan.gif',
61 BI_BASE_PATH_NEW: 'http://melody.hi.a170.ottcn.com:80/2.gif', 61 BI_BASE_PATH_NEW: 'http://112.18.251.224/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,
......