Browse Source

1vsN改造

huangbo 9 years ago
parent
commit
b4930d0110

+ 1 - 1
multiple-server/etc/app-config.xml

8
		appWelcomePage="WelcomeIoo" requestHost="http://114.215.100.48:8080"
8
		appWelcomePage="WelcomeIoo" requestHost="http://114.215.100.48:8080"
9
		requestPath="/ioo" requestServlet="/mobiledata" appPath="ioo-client" />
9
		requestPath="/ioo" requestServlet="/mobiledata" appPath="ioo-client" />
10
	
10
	
11
	<app appId="mutl" appName="1vsN平台" appType="I" appIcon="e_ico-audio"
11
	<app appId="mutl" appName="1vsN平台" appType="I" appIcon="e_ico-file"
12
		appWelcomePage="WelcomeDisplay" requestHost="http://10.0.2.2:8080"
12
		appWelcomePage="WelcomeDisplay" requestHost="http://10.0.2.2:8080"
13
		requestPath="/mutl" requestServlet="/mobiledata" appPath="mutl-client" />
13
		requestPath="/mutl" requestServlet="/mobiledata" appPath="mutl-client" />
14

14


+ 0 - 9
multiple-server/etc/server-data.xml

1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<datas>
2
<datas>
3
	<!-- 获取首页数据 -->
4
	<action name="IndexBean.getAppDatas" class="com.ai.server.multiple.bean.IndexBean" method="getAppDatas" verify="false"></action>
5

6
	<!-- 登陆初始化 -->
3
	<!-- 登陆初始化 -->
7
	<action name="LoginBean.init" class="com.ai.server.multiple.bean.LoginBean" method="init" verify="false"></action>
4
	<action name="LoginBean.init" class="com.ai.server.multiple.bean.LoginBean" method="init" verify="false"></action>
8
	<action name="LoginBean.refreshVerifyCode" class="com.ai.server.multiple.bean.LoginBean" method="refreshVerifyCode" verify="false"></action>
5
	<action name="LoginBean.refreshVerifyCode" class="com.ai.server.multiple.bean.LoginBean" method="refreshVerifyCode" verify="false"></action>
9
	<!-- 登陆 -->
6
	<!-- 登陆 -->
10
	<action name="LoginBean.login" class="com.ai.server.multiple.bean.LoginBean" method="login" verify="false"></action>
7
	<action name="LoginBean.login" class="com.ai.server.multiple.bean.LoginBean" method="login" verify="false"></action>
11

12
	<!-- 登陆应用 -->
13
	<action name="LoginBean.loginApp" class="com.ai.server.multiple.bean.LoginBean" method="loginApp" verify="false"></action>
14
	
15
	<action name="LoginBean.initAppConfig" class="com.ai.server.multiple.bean.LoginBean" method="initAppConfig" verify="false"></action>
16
	<action name="LoginBean.checkIpuSession" class="com.ai.server.multiple.bean.LoginBean" method="checkIpuSession" verify="false"></action>
8
	<action name="LoginBean.checkIpuSession" class="com.ai.server.multiple.bean.LoginBean" method="checkIpuSession" verify="false"></action>
17
	
18
</datas>
9
</datas>

+ 26 - 16
multiple-server/src/com/ai/server/multiple/core/config/AppConfig.java

41
					.attributeValue(Constant.AppConfig.APP_TYPE));
41
					.attributeValue(Constant.AppConfig.APP_TYPE));
42
			appMap.put(Constant.AppConfig.APP_ICON, ((Element) node)
42
			appMap.put(Constant.AppConfig.APP_ICON, ((Element) node)
43
					.attributeValue(Constant.AppConfig.APP_ICON));
43
					.attributeValue(Constant.AppConfig.APP_ICON));
44
			appMap.put(Constant.AppConfig.APP_WELCOME_PAGE, ((Element) node)
45
					.attributeValue(Constant.AppConfig.APP_WELCOME_PAGE)=null);
46
			appMap.put(Constant.AppConfig.REQUEST_HOST, ((Element) node)
47
					.attributeValue(Constant.AppConfig.REQUEST_HOST));
48
			appMap.put(Constant.AppConfig.REQUEST_HOST, ((Element) node)
49
					.attributeValue(Constant.AppConfig.REQUEST_HOST));
50
			appMap.put(Constant.AppConfig.REQUEST_PATH, ((Element) node)
51
					.attributeValue(Constant.AppConfig.REQUEST_PATH)=null);
52
			appMap.put(Constant.AppConfig.REQUEST_SERVLET, ((Element) node)
53
					.attributeValue(Constant.AppConfig.REQUEST_SERVLET));
54
			appMap.put(Constant.AppConfig.APP_PATH, ((Element) node)
55
					.attributeValue(Constant.AppConfig.APP_PATH));
56
			appMap.put(Constant.AppConfig.PACKAGE_NAME, ((Element) node)
57
					.attributeValue(Constant.AppConfig.PACKAGE_NAME));
58
			appMap.put(Constant.AppConfig.CLASS_NAME, ((Element) node)
59
					.attributeValue(Constant.AppConfig.CLASS_NAME));
44
			// IPU的配置加载
45
			if(((Element) node).attributeValue(Constant.AppConfig.APP_WELCOME_PAGE)!=null=null)
46
				appMap.put(Constant.AppConfig.APP_WELCOME_PAGE, 
47
						((Element) node).attributeValue(Constant.AppConfig.APP_WELCOME_PAGE));
48
			if(((Element) node).attributeValue(Constant.AppConfig.REQUEST_HOST)!=null)
49
				appMap.put(Constant.AppConfig.REQUEST_HOST, 
50
						((Element) node).attributeValue(Constant.AppConfig.REQUEST_HOST));
51
			if(((Element) node).attributeValue(Constant.AppConfig.REQUEST_PATH)!=null=null)
52
				appMap.put(Constant.AppConfig.REQUEST_PATH, 
53
						((Element) node).attributeValue(Constant.AppConfig.REQUEST_PATH));
54
			if(((Element) node).attributeValue(Constant.AppConfig.REQUEST_SERVLET)!=null)
55
				appMap.put(Constant.AppConfig.REQUEST_SERVLET, 
56
						((Element) node).attributeValue(Constant.AppConfig.REQUEST_SERVLET));
57
			if(((Element) node).attributeValue(Constant.AppConfig.APP_PATH)!=null)
58
				appMap.put(Constant.AppConfig.APP_PATH, 
59
						((Element) node).attributeValue(Constant.AppConfig.APP_PATH));
60
			// Native的配置加载
61
			if(((Element) node).attributeValue(Constant.AppConfig.PACKAGE_NAME)!=null)
62
				appMap.put(Constant.AppConfig.PACKAGE_NAME, 
63
						((Element) node).attributeValue(Constant.AppConfig.PACKAGE_NAME));
64
			if(((Element) node).attributeValue(Constant.AppConfig.CLASS_NAME)!=null)
65
				appMap.put(Constant.AppConfig.CLASS_NAME, 
66
						((Element) node).attributeValue(Constant.AppConfig.CLASS_NAME));
67
			if(((Element) node).attributeValue(Constant.AppConfig.DOWNLOAD_URL)!=null)
68
				appMap.put(Constant.AppConfig.DOWNLOAD_URL, 
69
						((Element) node).attributeValue(Constant.AppConfig.DOWNLOAD_URL));
60
			
70
			
61
			results.add(appMap);
71
			results.add(appMap);
62
		}
72
		}

+ 1 - 0
multiple-server/src/com/ai/server/multiple/util/Constant.java

42
		public static final String APP_PATH = "appPath";
42
		public static final String APP_PATH = "appPath";
43
		public static final String PACKAGE_NAME = "packageName";
43
		public static final String PACKAGE_NAME = "packageName";
44
		public static final String CLASS_NAME = "className";
44
		public static final String CLASS_NAME = "className";
45
		public static final String DOWNLOAD_URL = "downloadUrl";
45
	}
46
	}
46
}
47
}

+ 6 - 6
multiple-server/web/biz/js/common/biz-mobile.js

4
define(["require"],function(require) {
4
define(["require"],function(require) {
5
	var BizMobile = (function(){
5
	var BizMobile = (function(){
6
		return{
6
		return{
7
			openIpuApp:function(appName,param,err){ //打开ipu应用
8
				execute("openIpuApp", [appName,param],err);
9
			},openNativeApp:function(packageName,className,param,err){ //打开ipu应用
10
				execute("openNativeApp", [packageName,className,param],err);
11
			},initAppConfig:function(err){ //初始化应用
12
				execute("initAppConfig", [],err);
7
			openIpuApp:function(appId,err){ //打开ipu应用
8
				execute("openIpuApp",[appId],err);
9
			},openNativeApp:function(appId,param,err){ //打开原生应用
10
				execute("openNativeApp",[appId,param],err);
11
			},initAppConfig:function(appConfigs, err){ //初始化应用
12
				execute("initAppConfig",[appConfigs],err);
13
			}
13
			}
14
		};
14
		};
15
	})();
15
	})();

+ 3 - 6
multiple-server/web/biz/js/index.js

6
		$(item).tap(function(item) {
6
		$(item).tap(function(item) {
7
			var appId = item.getAttribute("appId");
7
			var appId = item.getAttribute("appId");
8
			var appType = item.getAttribute("appType");
8
			var appType = item.getAttribute("appType");
9
			var loginData = new Wade.DataMap();
10
			loginData.put("APP_TYPE",appType);
11
			loginData.put("APP_ID",appId);
12

13
			if(appType=="I"){
9
			if(appType=="I"){
14
				//alert("打开IPU应用"+appId);
15
				WadeMobile.openIpuApp(appId);
10
				WadeMobile.openIpuApp(appId);
16
			}else if(appType=="N"){
11
			}else if(appType=="N"){
17
				var param = new Wade.DataMap();
12
				var param = new Wade.DataMap();
18
				Mobile.openNativeApp(item.getAttribute("appId"), item.getAttribute("appId"), param);
13
				param.put("SESSION_ID","12345678");
14
				param.put("STAFF_ID","IpuAccount");
15
				Mobile.openNativeApp(item.getAttribute("appId"), param);
19
			}
16
			}
20
		},item);
17
		},item);
21
	});
18
	});

+ 1 - 1
multiple-server/web/biz/js/login.js

26
			}
26
			}
27
			console.log("登陆成功:" + result);
27
			console.log("登陆成功:" + result);
28
			Common.put("ACCOUNT", sessionId);
28
			Common.put("ACCOUNT", sessionId);
29
			WadeMobile.initAppConfig();
29
			WadeMobile.initAppConfig(result.get("APPS").toString());
30
			Mobile.openTemplate("Index", result);
30
			Mobile.openTemplate("Index", result);
31
		});
31
		});
32
	});
32
	});

BIN
multiple-server/web/biz/temp/female.png


BIN
multiple-server/web/biz/temp/male.png


BIN
multiple-server/web/biz/temp/photo1.jpg


BIN
multiple-server/web/biz/temp/photo2.jpg


BIN
multiple-server/web/biz/temp/photo3.jpg


BIN
multiple-server/web/biz/temp/product1.jpg


BIN
multiple-server/web/biz/temp/product2.jpg


BIN
multiple-server/web/biz/temp/product3.jpg


BIN
multiple-server/web/biz/temp/product4.jpg


BIN
multiple-server/web/biz/temp/product5.jpg


BIN
multiple-server/web/biz/temp/product6.jpg


BIN
multiple-server/web/biz/temp/qr.png


BIN
multiple-server/web/biz/temp/slider1.jpg


BIN
multiple-server/web/biz/temp/slider2.jpg


BIN
multiple-server/web/biz/temp/slider3.jpg


BIN
multiple-server/web/biz/temp/slider4.jpg


+ 1 - 1
multiple-server/web/template/webapp/Menu.html

1
<ul id="app-menu">
1
<ul id="app-menu">
2
	{%#APPS%}
2
	{%#APPS%}
3
	<li appType="{%.appType%}" appId="{%.appId%}">
3
	<li appId="{%.appId%}" appType="{%.appType%}">
4
		<div class="pic"><span class="{%.appIcon%}"></span></div>
4
		<div class="pic"><span class="{%.appIcon%}"></span></div>
5
		<div class="text">{%.appName%}</div>
5
		<div class="text">{%.appName%}</div>
6
	</li>
6
	</li>