admin
2020-07-27 65d1b762a73eeafb2ea814818c62b78c2ce9f7b1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
// v1.8.3 2019/03/29 16:30
// yesApp原生手机 调用函数
 
var yesApp = {
    
    // ================================================================================= 一切的初始, yestv对象检测
    yestv: function ()
    {
        var back = false;
        try{ if (yestv) { back = true; } else { console.log("yesApp.yestv():yestv未知"); back = false; } }
        catch (e) { console.log("yesApp.yestv():yestv未知"); back = false; }
        return back;
    },
    
    // ================================================================================= 获取平台(设备类型):Android  /  ios
    platformGet: function() 
    {
        var u = navigator.userAgent;
        var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;
        if (isAndroid) { return "android"; }
        else { return "ios"; }
    },
    
    // ================================================================================= 用户登录
    login: function ()
    {
        if (yesApp.yestv())
        {
            try { yestv.login(); }
            catch(e){ yesApp.showToast("跳转登录失败(请升级到最新版)"); }
        }
    },
    
    // ================================================================================= 用户信息
    userInfo: function (objC)
    {
        // 传递参数处理
        var objThis = {
            success: function () {},
            fail: function () {},
        };
        if (typeof(objC)=="object" && typeof(objC.success)=="function") { objThis.success = objC.success; }
        if (typeof(objC)=="object" && typeof(objC.fail)=="function") { objThis.fail = objC.fail; }
        
        if (yesApp.yestv())
        {
            var back = { id: '' };
            var uid = '';
            try{ uid = yestv.getUid(); } catch(e){ yesApp.showToast({ content: "获取用户ID失败(请升级到最新版)" }); }
            // 获取到id
            if (uid != '' && uid > 0) { back.id = uid; objThis.success(back); }
            // 未获取到
            else { objThis.fail(); }
        }
    },
    
    // ================================================================================= 弹框
    showToast: function (objC)
    {
        // 传递参数处理
        var objThis = {
            content: "亲,我很迷茫……", // 要提示的文字内容
            success: function () {},
        };
        if (typeof(objC)=="string") { objThis.content = objC; }
        else if (typeof(objC)=="object")
        {
            if (typeof(objC.content)!="undefined") { objThis.content = objC.content; }
            if (typeof(objC.success)=="function") { objThis.success = objC.success; }
        }
        
        if (yesApp.yestv())
        {
            try { yestv.toast(objThis.content); objThis.success(); } 
            catch(e){ console.log("yesApp.showToast():弹出提示框失败"); alert(objThis.content); }
        }
    },
    
    showLoading: function (objC)
    {
        // 传递参数处理
        var objThis = {
            content: "", // 要提示的文字内容
            success: function () {},
        };
        if (typeof(objC)=="string") { objThis.content = objC; }
        else if (typeof(objC)=="object")
        {
            if (typeof(objC.content)!="undefined") { objThis.content = objC.content; }
            if (typeof(objC.success)=="function") { objThis.success = objC.success; }
        }
        
        if (yesApp.yestv()) 
        { 
            try { yestv.showLoading(objThis.content); objThis.success(); } 
            catch(e){ yesApp.showToast("弹出加载框失败(请升级到最新版)"); }
        }
    },
    hideLoading: function (objC)
    {
        // 传递参数处理
        var objThis = {
            success: function () {},
        };
        if (typeof(objC)=="object" && typeof(objC.success)=="function") { objThis.success = objC.success; }
        
        if (yesApp.yestv())
        {
            try { yestv.hideLoading(); objThis.success(); } 
            catch(e){ yesApp.showToast("关闭加载框失败(请升级到最新版)"); } 
        }
    },
    
    // ================================================================================= 左上角功能:取消关闭按钮
    hideClose: function (objC)
    {
        // 传递参数处理
        var objThis = {
            success: function () {},
        };
        if (typeof(objC)=="object" && typeof(objC.success)=="function") { objThis.success = objC.success; }
        
        if (yesApp.yestv())
        { 
            try { yestv.hiddenTopMenuCloseBtn(); objThis.success(); } 
            catch(e){ console.log("取消关闭按钮失败(请升级到最新版)"); }
        }
    },
    
    // ================================================================================= 右上角菜单:自定义
    menuCustom: function (objC)
    {
        // 传递参数处理
        var objThis = {
            text: "",                          // (string)文字
            icon: "",                          // (string)图片地址
            "do": "",                            // (string)要做的事情,如:  "doui.showToast();"
            success: function () {},
        };
        if (typeof(objC)=="object" && typeof(objC.text)=="string") { objThis.text = objC.text; }
        if (typeof(objC)=="object" && typeof(objC.icon)=="string") { objThis.icon = objC.icon; }
        if (typeof(objC)=="object" && typeof(objC["do"])=="string") { objThis["do"] = objC["do"]; }
        if (typeof(objC)=="object" && typeof(objC.success)=="function") { objThis.success = objC.success; }
        
        if (yesApp.yestv())
        {
            try{ 
                if (objThis.icon.length > 0) { yestv.setTopMenuRightIcon(objThis.icon, objThis["do"]); }
                else if (objThis.text.length > 0) { yestv.setTopMenuRightText(objThis.text, objThis["do"]); }
                objThis.success();
            }
            catch(e){ console.log("menu:设置失败(请升级到最新版)"); }
        }
    },
    
    // ================================================================================= 右上角菜单:分享
    menuShare: function (objC)
    {
        // 传递参数处理
        var objThis = {
            state: 1,                         // 0-关闭     1-开启
            success: function () {},
        };
        if (typeof(objC)=="object" && typeof(objC.state)!="undefined") { objThis.state = objC.state; }
        if (typeof(objC)=="object" && typeof(objC.success)=="function") { objThis.success = objC.success; }
        
        if (yesApp.yestv())
        {
            // 获取设备信息
            var sys = yesApp.platformGet();
            // 1. 安卓设备
            if (sys == "android") 
            {
                try { yestv.setShareBtn(objThis.state); objThis.success(); } 
                catch(e){ console.log("开启分享失败(请升级到最新版)"); }
            }
            // 2. IOS设备
            else if (sys == "ios") 
            { 
                if (objThis.state == 1) { objThis.state = '1'; }
                else if (objThis.state == 0) { objThis.state = '0'; }
                // 获取版本号
                var version = 0;
                try{ var strNum = yestv.getVersion(); version = parseInt(strNum); }
                catch(e){ console.log("获取版本号失败(请升级到最新版)"); }
                // 老版本
                if (version <= 37) { window.location.href = "yestv://setShareBtn#" + window.btoa(objThis.state); }
                // 新版本
                else { 
                    try { yestv.setShareBtn(objThis.state); objThis.success(); }
                    catch(e){ console.log("开启分享失败(请升级到最新版)"); } 
                }
            }
        }
        
    },
    
    // ================================================================================= 设置页面标题
    menuTitle: function (objC)
    {
        // 传递参数处理
        var objThis = {
            title: "",                          // (string)页面标题
            success: function () {},
        };
        if (typeof(objC)=="object" && typeof(objC.title)=="string") { objThis.title = objC.title; }
        if (typeof(objC)=="object" && typeof(objC.success)=="function") { objThis.success = objC.success; }
        
        if (yesApp.yestv())
        {
            try { yestv.setTitle(objThis.title); objThis.success(); } 
            catch(e){ yesApp.showToast("设置页面标题失败(请升级到最新版)"); }
        }
        else { window.location.href = "yestv://setTitle#" + window.btoa(objThis.title); objThis.success(); }
    },
    
    // ================================================================================= 友盟数据统计
    umeng: function (objC)
    {
        // 传递参数处理
        var objThis = {
            event: "",                          // 事件标识
            data: {},                          // (JSON)要传递的数据
            success: function () {},
            fail: function () {},
        };
        if (typeof(objC)=="object" && typeof(objC.event)!="undefined") { objThis.event = objC.event; }
        if (typeof(objC)=="object" && typeof(objC.data)=="object") { objThis.data = objC.data; }
        if (typeof(objC)=="object" && typeof(objC.success)=="function") { objThis.success = objC.success; }
        if (typeof(objC)=="object" && typeof(objC.fail)=="function") { objThis.fail = objC.fail; }
        
        if (yesApp.yestv())
        {
            try { 
                var paramsJSON = JSON.stringify(objThis.data);
                yestv.umEventCount(objThis.event, paramsJSON); 
                objThis.success(); 
            } 
            catch(e){ objThis.fail(); }
        }
    },
    
    // ================================================================================= 生成签名后数据
    signData: function (objC)
    {
        // 传递参数处理
        var objThis = {
            type: 1,                           // 签名方法类型:1-新版             2-旧版方法
            data: {},                          // (JSON)要签名的数据
            success: function () {},
        };
        if (typeof(objC)=="object" && typeof(objC.type)!="undefined") { objThis.type = objC.type; }
        if (typeof(objC)=="object" && typeof(objC.data)=="object") { objThis.data = objC.data; }
        if (typeof(objC)=="object" && typeof(objC.success)=="function") { objThis.success = objC.success; }
        
        if (yesApp.yestv())
        {
            // 新版方法
            if (objThis.type == 1)
            {
                try{
                    var strJson = yestv.getRequestBaseParams(JSON.stringify(objThis.data));
                    var back = JSON.parse(strJson);
                    objThis.success(back);
                }
                catch (e) { yesApp.showToast("获取签名数据集失败(请升级到最新版)"); }
            }
            // 旧版方法
            else if (objThis.type == 2)
            {
                var back = objThis.data;
                // 提前封装
                back.time = new Date().getTime();
                back.version = yestv.getVersion();
                back.platform = yesApp.platformGet();
                // 生成组
                var zu_mo = new Array();
                for (var k in back) { var jiedian = k + "=" + back[k]; zu_mo.push(jiedian); }
                zu_mo.sort();
                // 生成元素字符串
                var str_mo = "";
                for (var i = 0; i < zu_mo.length; i++) { str_mo += zu_mo[i] + "&"; }
                try {
                    // 获取签名
                    var sign = yestv.getSign(str_mo);
                    back.sign = sign;
                    objThis.success(back);
                }
                catch (e) { yesApp.showToast("获取sign参数失败(请升级到最新版)"); }
            }
        }
        
    },
    
    // ================================================================================= 请求淘客推广参数
    tbPidHttp: "http://flq.yeshitv.com/fanli/api/v1/s11/getTBPidInfo", // 淘客参数请求地址
    tbPidInfo: null, // 淘客推广参数信息
    tbPid: function (objC)
    {
        // 传递参数处理
        var objThis = {
            success: function () {},
            fail: function () {},
        };
        if (typeof(objC)=="object" && typeof(objC.success)=="function") { objThis.success = objC.success; }
        if (typeof(objC)=="object" && typeof(objC.fail)=="function") { objThis.fail = objC.fail; }
        
        if (yesApp.yestv())
        {
            // 获取用户信息
            yesApp.userInfo({
                fail: function () { yesApp.login(); },
                success: function (user) 
                {
                    // 数据准备
                    yesApp.signData({
                        data: { uid: user.id },
                        success: function (res) 
                        {
                            var myurl = yesApp.tbPidHttp;
                            var mydata = res;
                            doui.request({
                                type: 'jsonp',
                                "url": myurl,
                                data: mydata,
                                fail: function () { yesApp.showToast("淘客推广参数request fail"); },
                                success: function (mDa) 
                                {
                                    if (mDa.code != 0) { yesApp.showToast(mDa.msg); objThis.fail(mDa); }
                                    else
                                    {
                                        // 得到淘客推广参数
                                        yesApp.tbPidInfo = JSON.stringify(mDa.data);
                                        // 通关回调函数
                                        objThis.success();
                                    }
                                },
                            });
                        },
                    });    
                },
            });
        }
        
    },
    
    // ================================================================================= 页面关闭
    pageClose: function () 
    {
        if (yesApp.yestv()) 
        {
            try { yestv.finishPage(); } 
            catch(e){ yesApp.showToast("关闭页面失败(请升级到最新版)"); }
        }
        else { window.location.href = "yestv://finishPage"; }
    },
    
    // ================================================================================= 页面跳转
    pageTo: function (objC)
    {
        // 传递参数处理
        var objThis = {
            type: "navigate",           // 跳转方式:navigate-保留当前页面,跳转到应用内的某个页面            redirect-关闭当前页面,跳转到应用内的某个页面
            placeName: "",              // 目的地名字:web-网页 、goods-商品详情、search-搜索页  、invite-邀请、share-商品分享、strategy-新手攻略
                                        // 目的地名字:collect-收藏页、history-浏览记录、userUpdate-用户信息修改页面、welfare-福利中心、service-人工客服
            "url": "",
            data: {},
            jumpDetail: {},
            params: {},
            greenChannel: false,        // 绿色通道,true-一定执行(覆盖)  false-等上个关闭才能执行 ,默认:false
        };
        if (typeof(objC)=="object" && typeof(objC.type)=="string") { objThis.type = objC.type.toLowerCase(); }
        if (typeof(objC)=="object" && typeof(objC.placeName)=="string") { objThis.placeName = objC.placeName.toLowerCase(); }
        if (typeof(objC)=="object" && typeof(objC["url"])=="string") { objThis["url"] = objC["url"]; }
        if (typeof(objC)=="object" && typeof(objC.data)=="object") { objThis.data = objC.data; }
        if (typeof(objC)=="object" && typeof(objC.jumpDetail)=="object") { objThis.jumpDetail = objC.jumpDetail; }
        if (typeof(objC)=="object" && typeof(objC.params)=="object") { objThis.params = objC.params; }
        if (typeof(objC)=="object" && typeof(objC.greenChannel)=="boolean") { objThis.greenChannel = objC.greenChannel; }
        
        if (yesApp.yestv())
        {
            // 设备平台 ios 还是  安卓
            var platform = yesApp.platformGet();
            
            // 构造jumpPage函数的2个参数:pageClassName      paramsJSON
            var pageClassName = "";
            var paramsJSON = "";
            
            // 1. 传递了目的地名字的时候
            // 商品详情
            if (objThis.placeName == "goods")
            {
                if (objThis.data.id == null || objThis.data.id == '') { yesApp.showToast("商品ID格式遵守:{id:1241343243}"); }
                else
                {
                    if (platform == 'android') { pageClassName = "com.yeshi.ec.rebate.myapplication.ui.recommend.GoodsBrowserActivity"; }
                    else { pageClassName = "GoodDeTrViewController"; }
                    paramsJSON = JSON.stringify(objThis.data);
                    // 调用跳转方法
                    try{
                        if (objThis.type == "navigate") { yestv.jumpPage(pageClassName, paramsJSON); }
                        else if (objThis.type == "redirect") { yestv.jumpPageWithFinishCurrentPage(pageClassName, paramsJSON); }
                    }
                    catch (e) { yesApp.showToast("进入商品详情失败(请升级到最新版)"); }
                }
            }
            // 人工客服
            if (objThis.placeName == "service")
            {
                if (typeof(objThis.data["from"])=="undefined") { yesApp.showToast("客服数据格式遵守:{from:'如何搜索券'}"); }
                else
                {
                    try { yestv.jumpKeFu(objThis.data["from"]); }
                    catch(e){ yesApp.showToast("进入人工客服失败(请升级到最新版)"); }
                }
            }
            // 搜索页
            else if (objThis.placeName == "search")
            {
                if (typeof(objThis.data["content"])=="undefined") { yesApp.showToast("搜索数据格式遵守:{content:'秋冬新款'}"); }
                else {
                    try { yestv.jumpSearch(objThis.data.content); }
                    catch(e){ yesApp.showToast("进入搜索失败(请升级到最新版)"); }
                }
            }
            // 邀请页
            else if (objThis.placeName == "invite")
            {
                try { yestv.jumpInvite(); } 
                catch(e){ yesApp.showToast("进入邀请失败(请升级到最新版)"); }
            }
            // 网页跳转
            else if (objThis.placeName == "web")
            {
                if (platform == 'android') { pageClassName = "com.yeshi.ec.rebate.myapplication.ui.invite.ShareBrowserActivity"; }
                else { pageClassName = "ShonpingShareViewController"; }
                // 待传递参数构建
                var XXXData = "";
                if (objThis.data) 
                {
                    XXXData = "?";
                    for (var k in objThis.data) 
                    {
                        if (typeof(objThis.data[k])=="object") { objThis.data[k] = JSON.stringify(objThis.data[k]); }
                        XXXData += k + "=" + encodeURIComponent(objThis.data[k]) + "&"; 
                    }
                    XXXData = XXXData.substring(0, XXXData.length - 1);
                }
                var data = { url: objThis["url"] + XXXData };
                paramsJSON = JSON.stringify(data);
                // 调用跳转方法
                try{
                    if (objThis.type == "navigate") { yestv.jumpPage(pageClassName, paramsJSON); }
                    else if (objThis.type == "redirect") { yestv.jumpPageWithFinishCurrentPage(pageClassName, paramsJSON); }
                }
                catch (e) { yesApp.showToast("跳转Web失败(请升级到最新版)"); }
            }
            // 商品分享页
            else if (objThis.placeName == "share")
            {
                if (objThis.data.id == null || objThis.data.id == '') { yesApp.showToast("商品ID格式遵守:{id:1241343243}"); }
                else
                {
                    if (platform == 'android') { pageClassName = "com.yeshi.ec.rebate.myapplication.ui.invite.ShareBrowserActivity"; }
                    else { pageClassName = "ShonpingShareViewController"; }
                    var data = { url: "http://flq.yeshitv.com/fanli/client/html/sharegoods/index.html?id=" + objThis.data.id };
                    paramsJSON = JSON.stringify(data);
                    // 调用跳转方法
                    try{
                        if (objThis.type == "navigate") { yestv.jumpPage(pageClassName, paramsJSON); }
                        else if (objThis.type == "redirect") { yestv.jumpPageWithFinishCurrentPage(pageClassName, paramsJSON); }
                    }
                    catch (e) { yesApp.showToast("进入分享失败(请升级到最新版)"); }
                }
            }
            // 收藏页
            else if (objThis.placeName == "collect")
            {
                if (platform == 'android') { pageClassName = "com.yeshi.ec.rebate.myapplication.ui.invite.ShareBrowserActivity"; }
                else { pageClassName = "ShonpingShareViewController"; }
                paramsJSON = null;
                // 调用跳转方法
                try{
                    if (objThis.type == "navigate") { yestv.jumpPage(pageClassName, paramsJSON); }
                    else if (objThis.type == "redirect") { yestv.jumpPageWithFinishCurrentPage(pageClassName, paramsJSON); }
                }
                catch (e) { yesApp.showToast("进入收藏失败(请升级到最新版)"); }            
            }
            // 福利中心页面
            else if (objThis.placeName == "welfare")
            {
                if (platform == 'android') { pageClassName = "com.yeshi.ec.rebate.myapplication.ui.mine.WelfareCenterActivity"; }
                else { pageClassName = "WelfareCenterController"; }
                paramsJSON = null;
                // 调用跳转方法
                try{
                    if (objThis.type == "navigate") { yestv.jumpPage(pageClassName, paramsJSON); }
                    else if (objThis.type == "redirect") { yestv.jumpPageWithFinishCurrentPage(pageClassName, paramsJSON); }
                }
                catch (e) { yesApp.showToast("进入福利中心失败(请升级到最新版)"); }            
            }
            // 浏览记录页
            else if (objThis.placeName == "history")
            {
                if (platform == 'android') { pageClassName = "com.yeshi.ec.rebate.myapplication.ui.mine.MyFootmarkActivity"; }
                else { pageClassName = "FootprintsViewController"; }
                paramsJSON = null;
                // 调用跳转方法
                try{
                    if (objThis.type == "navigate") { yestv.jumpPage(pageClassName, paramsJSON); }
                    else if (objThis.type == "redirect") { yestv.jumpPageWithFinishCurrentPage(pageClassName, paramsJSON); }
                }
                catch (e) { yesApp.showToast("进入浏览记录失败(请升级到最新版)"); }            
            }
            // 用户信息修改页
            else if (objThis.placeName == "userupdate")
            {
                if (platform == 'android') { pageClassName = "com.yeshi.ec.rebate.myapplication.ui.mine.MyInfoActivity"; }
                else { pageClassName = "userInfoViewController"; }
                paramsJSON = null;
                // 调用跳转方法
                try{
                    if (objThis.type == "navigate") { yestv.jumpPage(pageClassName, paramsJSON); }
                    else if (objThis.type == "redirect") { yestv.jumpPageWithFinishCurrentPage(pageClassName, paramsJSON); }
                }
                catch (e) { yesApp.showToast("进入用户信息失败(请升级到最新版)"); }            
            }
            // 新手攻略页
            else if (objThis.placeName == "strategy")
            {
                if (platform == 'android') { pageClassName = "com.yeshi.ec.rebate.myapplication.ui.mine.weex.WeexApplicationActivity"; }
                else { pageClassName = "WeexNativeController"; }
                paramsJSON = JSON.stringify({ url: "http://ec-1255749512.file.myqcloud.com/resource/weex/gonglue.js" });
                // 调用跳转方法
                try{
                    if (objThis.type == "navigate") { yestv.jumpPage(pageClassName, paramsJSON); }
                    else if (objThis.type == "redirect") { yestv.jumpPageWithFinishCurrentPage(pageClassName, paramsJSON); }
                }
                catch (e) { yesApp.showToast("进入新手攻略失败(请升级到最新版)"); }            
            }
            
            // 2. 没有任何目的地
            else if (objThis.placeName.length <= 0)
            {
                // 跳到百川
                if (objThis.jumpDetail.type && objThis.jumpDetail.type == "baichuan")
                {
                    // 还没有淘客参数,那么去请求
                    if (yesApp.tbPidInfo == null && objThis.greenChannel == false)
                    {
                        yesApp.tbPid({
                            fail: function () {},
                            success: function () 
                            {
                                try { yestv.jumpBaiChuan(yesApp.tbPidInfo, objThis.params.url, objThis.jumpDetail.spId); } 
                                catch(e){ yesApp.showToast("跳转百川失败(请升级到最新版)"); }
                            },
                        });
                    }
                    // 已经有淘客参数了
                    else {
                        try { yestv.jumpBaiChuan(yesApp.tbPidInfo, objThis.params.url, objThis.jumpDetail.spId); } 
                        catch(e){ yesApp.showToast("跳转百川失败(请升级到最新版)"); }
                    }
                }
                // 2. 普通跳转
                else if (objThis.jumpDetail.activity && objThis.jumpDetail.controller)
                {
                    // 1. 安卓设备
                    if (platform == "android") 
                    {
                        try { yestv.jumpPage(objThis.jumpDetail.activity, JSON.stringify(objThis.params)); } 
                        catch(e){ yesApp.showToast("页面跳转失败(请升级到最新版)"); }
                    }
                    // 2. IOS设备
                    else if (platform == "ios") 
                    {
                        try { yestv.jumpPage(objThis.jumpDetail.controller, JSON.stringify(objThis.params)); } 
                        catch(e){ yesApp.showToast("页面跳转失败(请升级到最新版)"); }
                    }
                }
            }
            
        }        
        
    },
    
};