jack %!s(int64=8) %!d(string=hace) años
padre
commit
53d446bd2f

+ 6 - 11
app/html/cmpinfor-basic.html

@ -11,12 +11,6 @@
11 11
	</head>
12 12
13 13
	<body>
14
		<header class="mui-bar mui-bar-nav toptitbox">
15
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></a>
16
			<h1 class="mui-title toptit">企业名称</h1>
17
			<!--<a class="mui-icon iconfont icon-share mui-pull-right button topmore" id="shareBtn"></a>-->
18
		</header>
19
20 14
		<!-- 主页面内容容器 -->
21 15
		<div class="mui-content">
22 16
			<!-- 主界面具体展示内容 -->
@ -25,12 +19,12 @@
25 19
					<div class="headbox cmpLogoBox">
26 20
						<div class="mui-content-padded">
27 21
							<div class="companyLogo">
28
								<div class="boxBlock headRadius"><img class="boxBlockimg headRadius" src="../images/default-icon.jpg" /></div>
22
								<div class="boxBlock headRadius"><img class="boxBlockimg headRadius" src="" id="oimg"/></div>
29 23
						
30 24
							</div>
31 25
						</div>
32
						<div class="listtit cmpBasic positionR"><span>企业名称应该还挺长的</span><em class="authicon authicon-com-ok"></em></div>
33
	            		<div class="listtit2 cmpBasic"><span>企业类型 </span><span>所在城市(总部)</span></div>
26
						<div class="listtit cmpBasic positionR"><span id="companyName">企业名称应该还挺长的</span><em class="authicon authicon-com-ok"></em></div>
27
	            		<div class="listtit2 cmpBasic"><span id="orgType">企业类型 </span><span id="ocity">所在城市(总部)</span></div>
34 28
					</div>
35 29
				</div>
36 30
				<ul class="mui-row mui-clearfix alignCenter cmpClassNum">
@ -47,11 +41,11 @@
47 41
				       <ul class="generalinfo">
48 42
				       		<li class="ginfolist">
49 43
				       			<span class="infotype">创立时间 :</span>
50
				       			<span class="personalMaterial">2016</span>
44
				       			<span class="personalMaterial" id="createTime">2016</span>
51 45
				       		</li>
52 46
				       		<li class="ginfolist">
53 47
				       			<span class="infotype">企业类型 :</span>
54
				       			<span class="personalMaterial">上市公司</span>
48
				       			<span class="personalMaterial" id="comType">上市公司</span>
55 49
				       		</li>
56 50
				       		<li class="ginfolist">
57 51
				       			<span class="infotype">企业规模 :</span>
@ -129,6 +123,7 @@
129 123
		</div>
130 124
		<script src="../js/public/mui.min.js"></script>
131 125
		<script src="../js/public/base.js"></script>
126
		<script src="../js/cmpinfor-basic.js"></script>
132 127
	</body>
133 128
134 129
</html>

+ 51 - 0
app/html/cmpinfor-index.html

@ -0,0 +1,51 @@
1
<!DOCTYPE html>
2
<html>
3

4
	<head>
5
		<meta charset="UTF-8">
6
		<title>企业信息浏览-企业介绍</title>
7
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
8
		<link href="../css/mui.min.css" rel="stylesheet" />
9
		<link href="../css/iconfont.css" rel="stylesheet" />
10
		<link href="../css/app.css" rel="stylesheet" />
11
	</head>
12

13
	<body>
14
		<header class="mui-bar mui-bar-nav toptitbox">
15
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></a>
16
			<h1 class="mui-title toptit">企业名称</h1>
17
			<!--<a class="mui-icon iconfont icon-share mui-pull-right button topmore" id="shareBtn"></a>-->
18
		</header>
19
		<script src="../js/public/mui.min.js"></script>
20
		<script src="../js/public/base.js"></script>
21
		<script>
22
			
23
			 //mui初始化
24
			mui.init();
25
			var subpages = ['cmpinfor-basic.html','cmpinfor-trend.html','cmpinfor-staff.html'];
26
			var subpage_style = {
27
				top: '50px',
28
				bottom: '0px'
29
			};
30
			
31
			var aniShow = {};
32
			
33
			 //创建子页面,首个选项卡页面显示,其它均隐藏;
34
			mui.plusReady(function() {
35
				var self = plus.webview.currentWebview();
36
				for (var i = 0; i < 3; i++) {
37
					var temp = {};
38
					var sub = plus.webview.create(subpages[i], subpages[i], subpage_style);
39
					if (i > 0) {
40
						sub.hide();
41
					}else{
42
						temp[subpages[i]] = "true";
43
						mui.extend(aniShow,temp);
44
					}
45
					self.append(sub);
46
				}
47
			});
48
		</script>
49
	</body>
50

51
</html>

+ 1 - 9
app/html/cmpinfor-staff.html

@ -10,12 +10,6 @@
10 10
	</head>
11 11
12 12
	<body>
13
		<header class="mui-bar mui-bar-nav toptitbox">
14
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></a>
15
			<h1 class="mui-title toptit">企业简介</h1>
16
			<!--<a class="mui-icon iconfont icon-share mui-pull-right button topmore" id="shareBtn"></a>-->
17
		</header>
18
19 13
		<!-- 主页面内容容器 -->
20 14
		<div class="mui-content">
21 15
			<div class="mui-input-group mainbox">
@ -97,9 +91,7 @@
97 91
		</div>
98 92
		<script src="../js/public/mui.min.js"></script>
99 93
		<script src="../js/public/base.js"></script>
100
		<script src="../js/public/mui.zoom.js" type="text/javascript" charset="utf-8"></script>
101
		<script src="../js/public/mui.previewimage.js" type="text/javascript" charset="utf-8"></script>
102
		<script src="../js/proinfobrow.js"></script>
94
		<script src="../js/cmpinfor-staff.js"></script>
103 95
	</body>
104 96
105 97
</html>

+ 1 - 6
app/html/cmpinfor-trend.html

@ -11,12 +11,6 @@
11 11
	</head>
12 12
13 13
	<body>
14
		<header class="mui-bar mui-bar-nav toptitbox">
15
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></a>
16
			<h1 class="mui-title toptit">企业简介</h1>
17
			<!--<a class="mui-icon iconfont icon-share mui-pull-right button topmore" id="shareBtn"></a>-->
18
		</header>
19
20 14
		<!-- 主界面具体展示内容 -->
21 15
		<div class="mui-content">
22 16
			<div class="mui-input-group mainbox">
@ -92,6 +86,7 @@
92 86
		</div>
93 87
		<script src="../js/public/mui.min.js"></script>
94 88
		<script src="../js/public/base.js"></script>
89
		<script src="../js/cmpinfor-trend.js"></script>
95 90
	</body>
96 91
97 92
</html>

+ 115 - 0
app/js/cmpinfor-basic.js

@ -0,0 +1,115 @@
1
mui.ready(function() {
2
	mui.plusReady(function() {
3
		/*按钮点击切换*/
4
		mui(".cmpClassNum").on("tap", "li", function() {
5
			var oStringText = this.innerText;
6
			var arr = new Array();
7
			arr[0] = plus.webview.getWebviewById("cmpinfor-basic.html");
8
			arr[1] = plus.webview.getWebviewById("cmpinfor-trend.html");
9
			arr[2] = plus.webview.getWebviewById("cmpinfor-staff.html");
10
			if(oStringText == "介绍") {
11
				return;
12
			} else if(oStringText == "动态") {
13
				arr[1].show();
14
			} else if(oStringText == "员工") {
15
				arr[2].show();
16
			}
17
		})
18
	});
19
	var id = "1B17DF270F0B4AAB8E1633267E4E2F5E";
20

21
	function companyMessage() {
22
		mui.ajax(baseUrl + "/ajax/org/" + id, {
23
				dataType: 'json', //数据格式类型
24
				type: 'GET', //http请求类型
25
				timeout: 10000, //超时设置
26
				success: function(data) {
27
					if(data.success) {
28
						console.log(JSON.stringify(data));
29
						var $data = data.data;
30
						var orgType,orgSize;
31
						document.getElementById("companyName").innerText = $data.name;
32
						if($data.hasOrgLogo) {
33
							document.getElementById("oimg").src = baseUrl + "/images/org/" + $data.id + ".jpg";
34
						} else {
35
							document.getElementById("oimg").src = "../images/default-icon.jpg"
36
						}
37
						/*企业类型*/
38
						if($data.orgType) {
39
							switch($data.orgType) {
40
								case '2':
41
									orgType = "国有企业";
42
									break;
43
								case '3':
44
									orgType = "上市企业";
45
									break;
46
								case '4':
47
									orgType = "合资企业";
48
									break;
49
								case '5':
50
									orgType = "私人企业";
51
									break;
52
								case '6':
53
									orgType = "外资企业";
54
									break;
55
								default:
56
									orgType = "初创企业";
57
									break;
58
							}
59
							document.getElementById("orgType").innerText = orgType;
60
							document.getElementById("comType").innerText = orgType;
61
						}else{
62
							document.getElementById("comType").parentNode.removeChild(document.getElementById("comType"));
63
						}
64
						/*所在城市*/
65
						if($data.city) {
66
							document.getElementById("ocity").innerText = $data.city;
67
					} else {
68
						document.getElementById("ocity").parentNode.removeChild(document.getElementById("ocity"));
69
					}
70
					/*时间*/
71
					if($data.foundTime) {
72
						var oTime = timeGeshi($data.foundTime);
73
						document.getElementById("createTime").innerText=oTime;
74
					} else {
75
						document.getElementById("createTime").parentNode.style="none";
76
					}
77
					/*企业规模*/
78
					if($data.orgSize) {
79
						switch($data.orgSize) {
80
							case '1':
81
								orgSize.innerText="50人以内";
82
								break;
83
							case '2':
84
								$("#qualificationList").text("50-100人")
85
								break;
86
							case '3':
87
								$("#qualificationList").text("100-200人")
88
								break;
89
							case '4':
90
								$("#qualificationList").text("200-500人")
91
								break;
92
							case '5':
93
								$("#qualificationList").text("500-1000人")
94
								break;
95
							default:
96
								$("#qualificationList").text("1000人以上")
97
								break;
98
						}
99
					}
100
				}
101

102
			},
103
			error: function() {
104
				plus.nativeUI.toast("服务器链接超时", toastStyle);
105
				return;
106
			}
107
		});
108
}
109
	/*时间格式转换*/
110
	function timeGeshi(otm) {
111
		var otme = otm.substring(0, 4) + "年" + otm.substring(4, 6) + "月" + otm.substring(6, 8)+"日";
112
		return otme;
113
	}
114
companyMessage();
115
})

+ 18 - 0
app/js/cmpinfor-staff.js

@ -0,0 +1,18 @@
1
mui.ready(function() {
2
	mui.plusReady(function() {
3
		mui(".cmpClassNum").on("tap","li",function(){
4
			var oStringText=this.innerText;
5
			var arr=new Array();
6
			arr[0]=plus.webview.getWebviewById("cmpinfor-basic.html");
7
			arr[1]=plus.webview.getWebviewById("cmpinfor-trend.html");			
8
			arr[2]=plus.webview.getWebviewById("cmpinfor-staff.html");
9
			if(oStringText=="介绍"){
10
				arr[0].show();
11
			}else if(oStringText=="动态"){
12
				arr[1].show();
13
			}else if(oStringText=="员工"){
14
				return;
15
			}
16
		})
17
	});
18
})

+ 18 - 0
app/js/cmpinfor-trend.js

@ -0,0 +1,18 @@
1
mui.ready(function() {
2
	mui.plusReady(function() {
3
		mui(".cmpClassNum").on("tap","li",function(){
4
			var oStringText=this.innerText;
5
			var arr=new Array();
6
			arr[0]=plus.webview.getWebviewById("cmpinfor-basic.html");
7
			arr[1]=plus.webview.getWebviewById("cmpinfor-trend.html");			
8
			arr[2]=plus.webview.getWebviewById("cmpinfor-staff.html");
9
			if(oStringText=="介绍"){
10
				arr[0].show();
11
			}else if(oStringText=="动态"){
12
				return;
13
			}else if(oStringText=="员工"){
14
				arr[2].show();
15
			}
16
		})
17
	});
18
})