Parcourir la Source

@laijj@恢复原功能

赖骏劼 4 ans auparavant
Parent
commit
d03d5c48e6
1 fichiers modifiés avec 47 ajouts et 48 suppressions
  1. 47 48
      show-server/src/main/webapp/biz/js/index.js

+ 47 - 48
show-server/src/main/webapp/biz/js/index.js

@ -1,72 +1,71 @@
1
require(["ipuUI", "jquery", "iScroll", "mobile", "ipuMobile"], function (ipuUI, $, iScroll, Mobile, IpuMobile) {
2
  // 首页被其他iframe嵌入时,需要加入这一行代码,不是被其它页面嵌入,可注释
3
  // ipu.page.options.target = window;
1
require(["ipuUI", "jquery", "iScroll","mobile","ipuMobile"], function (ipuUI, $, iScroll,Mobile,IpuMobile) {
2
	// 首页被其他iframe嵌入时,需要加入这一行代码,不是被其它页面嵌入,可注释
3
	// ipu.page.options.target = window;
4 4
5
  // ipuUI.js扩展的jquery方法,用来防止部分手机webview中ready事件触发,不能获取元素尺寸,导致组件初始异常或失败的情况
6
  // 需要引入ipuUI才能使用sizeReady方法
7
  $.sizeReady(function () {
8
    var navBar = ipuUI.navBar(".ipu-navbar", {
9
      animate: true
10
    });
5
	// ipuUI.js扩展的jquery方法,用来防止部分手机webview中ready事件触发,不能获取元素尺寸,导致组件初始异常或失败的情况
6
	// 需要引入ipuUI才能使用sizeReady方法
7
	$.sizeReady(function(){
8
		var navBar = ipuUI.navBar(".ipu-navbar", {
9
	        animate: true
10
	    });
11 11
12
    $("#plugin-index,#js-Plugin,#static-Plugin,#more-Plugin, .ipu-grid-nine").children().click(function () {
13
      var action = $(this).data("action");
14
      var noIos = $(this).data("noIos");  // ios是否不支持此插件
12
	    $("#plugin-index,#js-Plugin,#static-Plugin,#more-Plugin, .ipu-grid-nine").children().click(function(){
13
	    	var action = $(this).data("action");
14
	    	var noIos = $(this).data("noIos");  // ios是否不支持此插件
15 15
16
      if (action == "reactNative") {
16
	    	if(action == "reactNative"){
17 17
//                if(IpuMobile.isIOS()){
18 18
//                    ipuUI.toast("该功能ios版本暂未实现");
19 19
//                    return;
20 20
//                }
21
      }
21
			}
22 22
23 23
//	    	if(IpuMobile.isIOS() && noIos){
24 24
//	    		ipuUI.toast("该功能ios版本暂未实现");
25 25
//	    		return;
26 26
//	    	}
27 27
28
      if (action && action != "") {
29
        if (action == "rnDisplay") {
30
          if (IpuMobile.isIOS()) {
31
            //ipuUI.toast("该功能ios版本暂未实现");
32
            window.alert("该功能ios版本暂未实现");
33
            return;
34
          }
35
          //IpuMobile.openRN("RNDisplay", "index");
36
        } else {
37
          Mobile.openPage(action);
38
        }
39
      } else {
40
        Mobile.alert("This element doesn't bind the attribute of 'data-action'");
41
      }
42
    });
28
	    	if(action && action != ""){
29
	    		if(action == "rnDisplay"){
30
//                    if(IpuMobile.isIOS()){
31
//                        ipuUI.toast("该功能ios版本暂未实现");
32
//                        return;
33
//                    }
34
                    IpuMobile.openRN("RNDisplay", "index");
35
				}else {
36
                    Mobile.openPage(action);
37
				}
38
	    	}else{
39
	    		Mobile.alert("This element doesn't bind the attribute of 'data-action'");
40
	    	}
41
	    });
43 42
44
    Mobile.setBackCallListener(function (e) {
45
      alert(e);
46
    });
43
	    Mobile.setBackCallListener(function(e){
44
			alert(e);
45
		});
47 46
48 47
//		IpuMobile.getJpushInfo(function(res){
49 48
//			if (res) Mobile.tip('有通知消息:'+res);
50 49
//		});
51 50
52
    // $("#rnUI").click(function(){
53
    // 	IpuMobile.openRN("UI_GRIDVIEW", "main");
54
    // });
51
	    // $("#rnUI").click(function(){
52
	    // 	IpuMobile.openRN("UI_GRIDVIEW", "main");
53
	    // });
55 54
56
    new iScroll("scrollDemo"); // 第二页设置可以拖动
55
	    new iScroll("scrollDemo"); // 第二页设置可以拖动
57 56
58
    $("#invokeException").click(function () {
59
      ipu.showPreloader();
60
      var param = new Wade.DataMap();
57
	    $("#invokeException").click(function () {
58
	        ipu.showPreloader();
59
	        var param = new Wade.DataMap();
61 60
62
      Common.callSvc("SceneBean.dataRequestScene", param, function (resultData) {
63
        ipu.hidePreloader();
64
        alert("成功返回\n参数是:" + JSON.stringify(resultData));
65
      }, null, function (x_info) {
66
        ipu.hidePreloader();
67
        alert("进入了插件错误调用返回,错误信息是:" + x_info);
68
      });
69
    });
70
  });
61
	        Common.callSvc("SceneBean.dataRequestScene", param, function (resultData) {
62
	            ipu.hidePreloader();
63
	            alert("成功返回\n参数是:" + JSON.stringify(resultData));
64
	        }, null, function (x_info) {
65
	            ipu.hidePreloader();
66
	            alert("进入了插件错误调用返回,错误信息是:" + x_info);
67
	        });
68
	    });
69
	});
71 70
72 71
});