|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport"
- content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
- <title>学校新闻</title>
- <link rel="stylesheet" href="../Content/phone/css/menu.css">
- <style>
- * {
- margin: 0;
- padding: 0;
- }
-
- .menu {
- background-color: #0064D6;
- }
-
- .main_title {
- color: #282828;
- font-size: 17px;
- font-weight: bold;
- }
-
- .main_time {
- color: #9A9A9A;
- font-size: 12px;
- text-align: right;
- }
-
- .main_content {
- color: #5E5E5E;
- font-size: 14px;
- }
-
- .main {
- padding: 0px 20px;
- margin: 30px 0 10px;
- }
- </style>
- </head>
- <body>
- <div class="menu">
- <a href="javascript:history.back();">
- <img src="../Content/phone/imgs/backBtn_white.png" alt="" width="100%">
- </a>
- <div style="color: #FFFFFF;font-weight: bold;" id="title">学校新闻</div>
- </div>
- <div class="main">
- <div class="main_title">
-
- </div>
- <div class="main_time">
-
- </div>
- <div class="main_content" style="margin-top: 10px;" id="main_content">
-
- </div>
- </div>
- <script src="../Content/phone/js/jquery.min.js"></script>
- <script src="../Content/phone/js/getSize.js"></script>
- <script src="../Content/phone/js/menu.js"></script>
- <script src="server.js"></script>
-
- <script type="text/javascript">
- //type: 1学校新闻,2校园风光,3 专业介绍
- var type = getQueryString('type');
- var Id = getQueryString('Id');
- $(function () {
-
- GetDetails();
- });
- //获取详情
- function GetDetails() {
- console.log(type + "," + Id);
- $.ajax({
- url: serverurl + '/arrangelesson/GetSchoolNewsDetails?type=' + type + '&Id=' + Id,
- type: "GET",
- dataType: "json",
- async: true,
- cache: false,
- success: function (data) {
- var data = data.data;
- var title = "";
- if (type == '1') {
- title = '学校新闻';
- } else if (type == '2') {
- title = '校园风光';
- }
- else if (type == '3') {
- title = '专业介绍';
- }
- $('#title').html(title);
- $('.main_title').html(data.title);
- $('.main_time').html(data.time);
- //$('.main_content').innerHTML(data.desc);
- document.getElementById('main_content').innerHTML = data.desc;
- },
- error: function (XMLHttpRequest, textStatus, errorThrown) {
-
- },
- beforeSend: function () {
- },
- complete: function () {
- }
- });
- }
-
- function getQueryString(name){
- var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
- var r = window.location.search.substr(1).match(reg);
- if(r!=null)return unescape(r[2]); return null;
- }
-
- </script>
- </body>
- </html>
|