|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369 |
- <!DOCTYPE html>
- <html>
-
- <head>
- <meta charset="utf-8">
- <title>总校区</title>
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link rel="stylesheet" href="css/mui.min.css">
- <link rel="stylesheet" href="css/style.css">
- </head>
-
- <body>
-
- <style>
- .mui-control-content {
- min-height: 215px;
- }
-
- .mui-control-content .mui-loading {
- margin-top: 50px;
- }
-
- .mui-media-body span {
- min-width: 40px;
- color: #C70F1A;
- text-align: left;
- float: right;
- }
-
- .hd {
- width: 60px;
- height: 30px;
- font-size: 16px;
- text-align: right;
- margin-right: 10px;
- margin-top: 7px;
- color: #b3b3b3;
- float: right;
- }
-
- .mui-table-view-cell.mui-active {
- background-color: #FFFFFF;
- }
-
- .mui-table-view .mui-media-object {
- max-width: 60px;
- }
-
- .phnr {
- width: 94%;
- padding-top: 10px;
- text-indent: 2em;
- margin: auto;
- }
-
- .mui-bar-nav {
- background-color: #c70f1a;
- }
-
- .mui-bar-nav p {
- line-height: 44px;
- color: #FFFFFF;
- float: right;
- }
-
- .mui-active img {
- width: 94%;
- margin: 10px;
- }
-
- .phnr {
- width: 94%;
- padding-top: 10px;
- font-family: "微软雅黑";
- font-size: 13px;
- text-indent: 2em;
- margin: auto;
- }
-
- .mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active {
- border-bottom: 2px solid#c70f1a;
- }
- .mui-titlenew{
- right:65px;left:40px;display:inline-block;overflow:hidden;width:auto;margin:0;text-overflow:ellipsis;
- color: #FFFFFF;
- font-weight:500;
- font-size: 17px;
- text-align: center;
- line-height: 44px;
- position:absolute;
- }
- </style>
- <header class="mui-bar mui-bar-nav">
- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
- <h1 class="mui-titlenew">校区信息</h1>
- <p id="profession">查看专业</p>
- </header>
- <div class="mui-content">
- <div id="SegmentedControl" class="mui-segmented-control mui-segmented-control-inverted">
- <a class="mui-control-item mui-active" href="#item1mobile">
- 校区简介
- </a>
- <a class="mui-control-item" href="#item2mobile">
- 校区新闻
- </a>
- <a class="mui-control-item" href="#item3mobile">
- 招生信息
- </a>
- </div>
- <div class="mui-slider-group">
- <div id="item1mobile" class="mui-control-content mui-active">
-
- </div>
- <div id="item2mobile" class="mui-control-content">
- <ul class="mui-table-view" id="tablenews">
- </ul>
- </div>
- <div id="item3mobile" class="mui-control-content">
- <ul class="mui-table-view" id="tablezhaosheng">
- </ul>
- </div>
- </div>
- </div>
- <script src="js/mui.min.js"></script>
- <script src="js/serverurl.js"></script>
- <script src="js/tools.js"></script>
- <script src="js/jquery-1.10.2.min.js"></script>
- <script type="text/javascript">
- mui.plusReady(function() {
- var schollid = plus.webview.currentWebview().schoolID;
-
- GetArticle(schollid);
- GetData(schollid);
- GetDataZhaosheng(schollid);
- document.getElementById("profession").addEventListener("tap", function() {
- mui.openWindow({
- url: 'profession.html',
- id: 'profession',
- show: {
- aniShow: 'pop-in'
- },
- extras: {
- schoolID: schollid
- }
- });
- });
- });
-
- function OpenArticle(id) {
- mui.openWindow({
- url: "NewsDetail.html",
- id: 'NewsDetail' + id,
- extras: {
- NewsID: id
- },
- show: {
- aniShow: 'pop-in'
- }
- });
- }
-
- function GetArticle(schollid) {
- // var xhr = new plus.net.XMLHttpRequest();
- // xhr.responseType = "json";
- // xhr.onreadystatechange = function() {
- // switch (xhr.readyState) {
- // case 4:
- // if (xhr.status == 200) {
- // GetData(newstypeid, zhaoshengtypeid, "tablenews");
- // if (xhr.response.result == "ok") {
- // document.getElementById("item1mobile").innerHTML = xhr.response.msg.content;
- // } else {}
- // } else {
- // plus.nativeUI.toast('世界上最遥远的距离就是没有网络。');
- // }
- // break;
- // default:
- // break;
- // }
- // }
- // xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=getSchoolNews&content={'articleID':'" +
- // id + "','app':'1'}"));
- // xhr.send();
- mui.post(api + '/user/getCompanyInfo', {
- data: schollid
- }, function(res) {
- if (res.code == "200") {
- document.getElementById("item1mobile").innerHTML = res.data.F_BriefIntroduction;
- $("#item1mobile").html($("#item1mobile").text()) //
- }
- }, 'json')
- }
-
- function GetData(schollid) {
- var table = document.getElementById("tablenews");
- // var xhr = new plus.net.XMLHttpRequest();
- // xhr.responseType = "json";
- // xhr.onreadystatechange = function() {
- // switch(xhr.readyState) {
- // case 4:
- // if(xhr.status == 200) {
- // if(tableid=="tablenews")
- // {
- // GetDataZhaosheng(zhaoshengtypeid,"tablezhaosheng");
- // }
- // table.innerHTML = "";
- // table.innerText = "";
- // if(xhr.response.msg != null && xhr.response.msg.length > 0) {
- // for(var i = 0; i < xhr.response.msg.length; i++) {
- // var dataobject = xhr.response.msg;
- // var li = document.createElement('li');
- // li.setAttribute("articleID", dataobject[i].articleID);
- // li.addEventListener("tap", function() {
- // OpenArticle(this.getAttribute("articleID"));
- // });
- // li.className = 'mui-table-view-cell mui-media';
- // li.innerHTML = '<a>' +
- // //'<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') + '">' +
- // '<div class="mui-media-body">' +
- // '' + dataobject[i].title + '' +
- // '<p class="mui - ellipsis">' + dataobject[i].common + '</p>' +
- // '<p class="time">' + jsonDateFormatDateTime(dataobject[i].date) + '</p>' +
- // '</div>' +
- // '</a>';
- // table.appendChild(li, table.firstChild);
- // }
- // } else {}
- // plus.nativeUI.closeWaiting();
- // } else {
- // plus.nativeUI.closeWaiting();
- // plus.nativeUI.toast('世界上最遥远的距离就是没有网络。');
- // }
- // break;
- // default:
- // break;
- // }
- // }
- // xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=getArticleList&content={'type':'"+newstypeid+"','app':'1'}"));
- // xhr.send();
- plus.nativeUI.showWaiting("数据加载中...");
-
- var param = {
- companyid: schollid,
- type: '0'
- }
- mui.post(api + '/user/getCompanyNews', {
- data: JSON.stringify(param)
- }, function(res) {
- plus.nativeUI.closeWaiting();
- if (res.code == "200") {
- for (var i = 0; i < res.data.length; i++) {
- var dataobject = res.data;
- var li = document.createElement('li');
- li.setAttribute("articleID", dataobject[i].articleID);
- li.addEventListener("tap", function() {
- OpenArticle(this.getAttribute("articleID"));
- });
- li.className = 'mui-table-view-cell mui-media';
- li.innerHTML = '<a>' +
- //'<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') + '">' +
- '<div class="mui-media-body">' +
- '' + dataobject[i].title + '' +
- '<p class="mui - ellipsis bbb">' + dataobject[i].content + '</p>' +
- '<p class="time">' + jsonDateFormatDateTime(dataobject[i].date) + '</p>' +
- '</div>' +
- '</a>';
- table.appendChild(li, table.firstChild);
- }
-
- $.each($('.bbb'), function(i, item) {
-
- $(item).html($(item).text());
- var str = $(item).text();
- $(item).html(str.substr(0, 15) + "...")
-
- });
-
- }
- }, 'json')
- }
-
- function GetDataZhaosheng(schollid) {
- var table = document.getElementById("tablezhaosheng");
- // var xhr = new plus.net.XMLHttpRequest();
- // xhr.responseType = "json";
- // xhr.onreadystatechange = function() {
- // switch (xhr.readyState) {
- // case 4:
- // if (xhr.status == 200) {
- // table.innerHTML = "";
- // table.innerText = "";
- // if (xhr.response.msg != null && xhr.response.msg.length > 0) {
- // for (var i = 0; i < xhr.response.msg.length; i++) {
- // var dataobject = xhr.response.msg;
- // var li = document.createElement('li');
- // li.setAttribute("articleID", dataobject[i].articleID);
- // li.addEventListener("tap", function() {
- // OpenArticle(this.getAttribute("articleID"));
- // });
- // li.className = 'mui-table-view-cell mui-media';
- // li.innerHTML = '<a>' +
- // //'<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') + '">' +
- // '<div class="mui-media-body">' +
- // '' + dataobject[i].title + '' +
- // '<p class="mui - ellipsis">' + dataobject[i].common + '</p>' +
- // '<p class="time">' + jsonDateFormatDateTime(dataobject[i].date) + '</p>' +
- // '</div>' +
- // '</a>';
- // table.appendChild(li, table.firstChild);
- // }
- // } else {}
- // plus.nativeUI.closeWaiting();
- // } else {
- // plus.nativeUI.closeWaiting();
- // plus.nativeUI.toast('世界上最遥远的距离就是没有网络。');
- // }
- // break;
- // default:
- // break;
- // }
- // }
- // xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=getArticleList&content={'type':'" +
- // zhaoshengtypeid + "','app':'1'}"));
- // xhr.send();
- plus.nativeUI.showWaiting("数据加载中...");
-
- var param = {
- companyid: schollid,
- type: '1'
- }
- mui.post(api + '/user/getCompanyNews', {
- data: JSON.stringify(param)
- }, function(res) {
- plus.nativeUI.closeWaiting();
- if (res.code == "200") {
- for (var i = 0; i < res.data.length; i++) {
- var dataobject = res.data;
- var li = document.createElement('li');
- li.setAttribute("articleID", dataobject[i].articleID);
- li.addEventListener("tap", function() {
- OpenArticle(this.getAttribute("articleID"));
- });
- li.className = 'mui-table-view-cell mui-media';
- li.innerHTML = '<a>' +
- //'<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') + '">' +
- '<div class="mui-media-body">' +
- '' + dataobject[i].title + '' +
- '<p class="mui - ellipsis bbb">' + dataobject[i].content + '</p>' +
- '<p class="time">' + jsonDateFormatDateTime(dataobject[i].date) + '</p>' +
- '</div>' +
- '</a>';
- table.appendChild(li, table.firstChild);//
- }
- $.each($('.bbb'), function(i, item) {
-
- $(item).html($(item).text());
- var str = $(item).text();
- $(item).html(str.substr(0, 15) + "...")
-
- });
- }
- }, 'json')
- }
- </script>
- </body>
-
- </html>
|