選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

370 行
12 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>总校区</title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <link rel="stylesheet" href="css/mui.min.css">
  10. <link rel="stylesheet" href="css/style.css">
  11. </head>
  12. <body>
  13. <style>
  14. .mui-control-content {
  15. min-height: 215px;
  16. }
  17. .mui-control-content .mui-loading {
  18. margin-top: 50px;
  19. }
  20. .mui-media-body span {
  21. min-width: 40px;
  22. color: #C70F1A;
  23. text-align: left;
  24. float: right;
  25. }
  26. .hd {
  27. width: 60px;
  28. height: 30px;
  29. font-size: 16px;
  30. text-align: right;
  31. margin-right: 10px;
  32. margin-top: 7px;
  33. color: #b3b3b3;
  34. float: right;
  35. }
  36. .mui-table-view-cell.mui-active {
  37. background-color: #FFFFFF;
  38. }
  39. .mui-table-view .mui-media-object {
  40. max-width: 60px;
  41. }
  42. .phnr {
  43. width: 94%;
  44. padding-top: 10px;
  45. text-indent: 2em;
  46. margin: auto;
  47. }
  48. .mui-bar-nav {
  49. background-color: #c70f1a;
  50. }
  51. .mui-bar-nav p {
  52. line-height: 44px;
  53. color: #FFFFFF;
  54. float: right;
  55. }
  56. .mui-active img {
  57. width: 94%;
  58. margin: 10px;
  59. }
  60. .phnr {
  61. width: 94%;
  62. padding-top: 10px;
  63. font-family: "微软雅黑";
  64. font-size: 13px;
  65. text-indent: 2em;
  66. margin: auto;
  67. }
  68. .mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active {
  69. border-bottom: 2px solid#c70f1a;
  70. }
  71. .mui-titlenew{
  72. right:65px;left:40px;display:inline-block;overflow:hidden;width:auto;margin:0;text-overflow:ellipsis;
  73. color: #FFFFFF;
  74. font-weight:500;
  75. font-size: 17px;
  76. text-align: center;
  77. line-height: 44px;
  78. position:absolute;
  79. }
  80. </style>
  81. <header class="mui-bar mui-bar-nav">
  82. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  83. <h1 class="mui-titlenew">校区信息</h1>
  84. <p id="profession">查看专业</p>
  85. </header>
  86. <div class="mui-content">
  87. <div id="SegmentedControl" class="mui-segmented-control mui-segmented-control-inverted">
  88. <a class="mui-control-item mui-active" href="#item1mobile">
  89. 校区简介
  90. </a>
  91. <a class="mui-control-item" href="#item2mobile">
  92. 校区新闻
  93. </a>
  94. <a class="mui-control-item" href="#item3mobile">
  95. 招生信息
  96. </a>
  97. </div>
  98. <div class="mui-slider-group">
  99. <div id="item1mobile" class="mui-control-content mui-active">
  100. </div>
  101. <div id="item2mobile" class="mui-control-content">
  102. <ul class="mui-table-view" id="tablenews">
  103. </ul>
  104. </div>
  105. <div id="item3mobile" class="mui-control-content">
  106. <ul class="mui-table-view" id="tablezhaosheng">
  107. </ul>
  108. </div>
  109. </div>
  110. </div>
  111. <script src="js/mui.min.js"></script>
  112. <script src="js/serverurl.js"></script>
  113. <script src="js/tools.js"></script>
  114. <script src="js/jquery-1.10.2.min.js"></script>
  115. <script type="text/javascript">
  116. mui.plusReady(function() {
  117. var schollid = plus.webview.currentWebview().schoolID;
  118. GetArticle(schollid);
  119. GetData(schollid);
  120. GetDataZhaosheng(schollid);
  121. document.getElementById("profession").addEventListener("tap", function() {
  122. mui.openWindow({
  123. url: 'profession.html',
  124. id: 'profession',
  125. show: {
  126. aniShow: 'pop-in'
  127. },
  128. extras: {
  129. schoolID: schollid
  130. }
  131. });
  132. });
  133. });
  134. function OpenArticle(id) {
  135. mui.openWindow({
  136. url: "NewsDetail.html",
  137. id: 'NewsDetail' + id,
  138. extras: {
  139. NewsID: id
  140. },
  141. show: {
  142. aniShow: 'pop-in'
  143. }
  144. });
  145. }
  146. function GetArticle(schollid) {
  147. // var xhr = new plus.net.XMLHttpRequest();
  148. // xhr.responseType = "json";
  149. // xhr.onreadystatechange = function() {
  150. // switch (xhr.readyState) {
  151. // case 4:
  152. // if (xhr.status == 200) {
  153. // GetData(newstypeid, zhaoshengtypeid, "tablenews");
  154. // if (xhr.response.result == "ok") {
  155. // document.getElementById("item1mobile").innerHTML = xhr.response.msg.content;
  156. // } else {}
  157. // } else {
  158. // plus.nativeUI.toast('世界上最遥远的距离就是没有网络。');
  159. // }
  160. // break;
  161. // default:
  162. // break;
  163. // }
  164. // }
  165. // xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=getSchoolNews&content={'articleID':'" +
  166. // id + "','app':'1'}"));
  167. // xhr.send();
  168. mui.post(api + '/user/getCompanyInfo', {
  169. data: schollid
  170. }, function(res) {
  171. if (res.code == "200") {
  172. document.getElementById("item1mobile").innerHTML = res.data.F_BriefIntroduction;
  173. $("#item1mobile").html($("#item1mobile").text()) //
  174. }
  175. }, 'json')
  176. }
  177. function GetData(schollid) {
  178. var table = document.getElementById("tablenews");
  179. // var xhr = new plus.net.XMLHttpRequest();
  180. // xhr.responseType = "json";
  181. // xhr.onreadystatechange = function() {
  182. // switch(xhr.readyState) {
  183. // case 4:
  184. // if(xhr.status == 200) {
  185. // if(tableid=="tablenews")
  186. // {
  187. // GetDataZhaosheng(zhaoshengtypeid,"tablezhaosheng");
  188. // }
  189. // table.innerHTML = "";
  190. // table.innerText = "";
  191. // if(xhr.response.msg != null && xhr.response.msg.length > 0) {
  192. // for(var i = 0; i < xhr.response.msg.length; i++) {
  193. // var dataobject = xhr.response.msg;
  194. // var li = document.createElement('li');
  195. // li.setAttribute("articleID", dataobject[i].articleID);
  196. // li.addEventListener("tap", function() {
  197. // OpenArticle(this.getAttribute("articleID"));
  198. // });
  199. // li.className = 'mui-table-view-cell mui-media';
  200. // li.innerHTML = '<a>' +
  201. // //'<img class="mui-media-object mui-pull-left" src="' + (dataobject[i].picUrl != undefined && dataobject[i].picUrl != null&&dataobject[i].picUrl!='' ? serverdomain + dataobject[i].picUrl : '/images/xysmall.jpg') + '">' +
  202. // '<div class="mui-media-body">' +
  203. // '' + dataobject[i].title + '' +
  204. // '<p class="mui - ellipsis">' + dataobject[i].common + '</p>' +
  205. // '<p class="time">' + jsonDateFormatDateTime(dataobject[i].date) + '</p>' +
  206. // '</div>' +
  207. // '</a>';
  208. // table.appendChild(li, table.firstChild);
  209. // }
  210. // } else {}
  211. // plus.nativeUI.closeWaiting();
  212. // } else {
  213. // plus.nativeUI.closeWaiting();
  214. // plus.nativeUI.toast('世界上最遥远的距离就是没有网络。');
  215. // }
  216. // break;
  217. // default:
  218. // break;
  219. // }
  220. // }
  221. // xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=getArticleList&content={'type':'"+newstypeid+"','app':'1'}"));
  222. // xhr.send();
  223. plus.nativeUI.showWaiting("数据加载中...");
  224. var param = {
  225. companyid: schollid,
  226. type: '0'
  227. }
  228. mui.post(api + '/user/getCompanyNews', {
  229. data: JSON.stringify(param)
  230. }, function(res) {
  231. plus.nativeUI.closeWaiting();
  232. if (res.code == "200") {
  233. for (var i = 0; i < res.data.length; i++) {
  234. var dataobject = res.data;
  235. var li = document.createElement('li');
  236. li.setAttribute("articleID", dataobject[i].articleID);
  237. li.addEventListener("tap", function() {
  238. OpenArticle(this.getAttribute("articleID"));
  239. });
  240. li.className = 'mui-table-view-cell mui-media';
  241. li.innerHTML = '<a>' +
  242. //'<img class="mui-media-object mui-pull-left" src="' + (dataobject[i].picUrl != undefined && dataobject[i].picUrl != null&&dataobject[i].picUrl!='' ? serverdomain + dataobject[i].picUrl : '/images/xysmall.jpg') + '">' +
  243. '<div class="mui-media-body">' +
  244. '' + dataobject[i].title + '' +
  245. '<p class="mui - ellipsis bbb">' + dataobject[i].content + '</p>' +
  246. '<p class="time">' + jsonDateFormatDateTime(dataobject[i].date) + '</p>' +
  247. '</div>' +
  248. '</a>';
  249. table.appendChild(li, table.firstChild);
  250. }
  251. $.each($('.bbb'), function(i, item) {
  252. $(item).html($(item).text());
  253. var str = $(item).text();
  254. $(item).html(str.substr(0, 15) + "...")
  255. });
  256. }
  257. }, 'json')
  258. }
  259. function GetDataZhaosheng(schollid) {
  260. var table = document.getElementById("tablezhaosheng");
  261. // var xhr = new plus.net.XMLHttpRequest();
  262. // xhr.responseType = "json";
  263. // xhr.onreadystatechange = function() {
  264. // switch (xhr.readyState) {
  265. // case 4:
  266. // if (xhr.status == 200) {
  267. // table.innerHTML = "";
  268. // table.innerText = "";
  269. // if (xhr.response.msg != null && xhr.response.msg.length > 0) {
  270. // for (var i = 0; i < xhr.response.msg.length; i++) {
  271. // var dataobject = xhr.response.msg;
  272. // var li = document.createElement('li');
  273. // li.setAttribute("articleID", dataobject[i].articleID);
  274. // li.addEventListener("tap", function() {
  275. // OpenArticle(this.getAttribute("articleID"));
  276. // });
  277. // li.className = 'mui-table-view-cell mui-media';
  278. // li.innerHTML = '<a>' +
  279. // //'<img class="mui-media-object mui-pull-left" src="' + (dataobject[i].picUrl != undefined && dataobject[i].picUrl != null&&dataobject[i].picUrl!='' ? serverdomain + dataobject[i].picUrl : '/images/xysmall.jpg') + '">' +
  280. // '<div class="mui-media-body">' +
  281. // '' + dataobject[i].title + '' +
  282. // '<p class="mui - ellipsis">' + dataobject[i].common + '</p>' +
  283. // '<p class="time">' + jsonDateFormatDateTime(dataobject[i].date) + '</p>' +
  284. // '</div>' +
  285. // '</a>';
  286. // table.appendChild(li, table.firstChild);
  287. // }
  288. // } else {}
  289. // plus.nativeUI.closeWaiting();
  290. // } else {
  291. // plus.nativeUI.closeWaiting();
  292. // plus.nativeUI.toast('世界上最遥远的距离就是没有网络。');
  293. // }
  294. // break;
  295. // default:
  296. // break;
  297. // }
  298. // }
  299. // xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=getArticleList&content={'type':'" +
  300. // zhaoshengtypeid + "','app':'1'}"));
  301. // xhr.send();
  302. plus.nativeUI.showWaiting("数据加载中...");
  303. var param = {
  304. companyid: schollid,
  305. type: '1'
  306. }
  307. mui.post(api + '/user/getCompanyNews', {
  308. data: JSON.stringify(param)
  309. }, function(res) {
  310. plus.nativeUI.closeWaiting();
  311. if (res.code == "200") {
  312. for (var i = 0; i < res.data.length; i++) {
  313. var dataobject = res.data;
  314. var li = document.createElement('li');
  315. li.setAttribute("articleID", dataobject[i].articleID);
  316. li.addEventListener("tap", function() {
  317. OpenArticle(this.getAttribute("articleID"));
  318. });
  319. li.className = 'mui-table-view-cell mui-media';
  320. li.innerHTML = '<a>' +
  321. //'<img class="mui-media-object mui-pull-left" src="' + (dataobject[i].picUrl != undefined && dataobject[i].picUrl != null&&dataobject[i].picUrl!='' ? serverdomain + dataobject[i].picUrl : '/images/xysmall.jpg') + '">' +
  322. '<div class="mui-media-body">' +
  323. '' + dataobject[i].title + '' +
  324. '<p class="mui - ellipsis bbb">' + dataobject[i].content + '</p>' +
  325. '<p class="time">' + jsonDateFormatDateTime(dataobject[i].date) + '</p>' +
  326. '</div>' +
  327. '</a>';
  328. table.appendChild(li, table.firstChild);//
  329. }
  330. $.each($('.bbb'), function(i, item) {
  331. $(item).html($(item).text());
  332. var str = $(item).text();
  333. $(item).html(str.substr(0, 15) + "...")
  334. });
  335. }
  336. }, 'json')
  337. }
  338. </script>
  339. </body>
  340. </html>