| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="utf-8">
- <title>公告通知</title>
- <meta name="viewport" content="width=device-width, initial-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">
- <!--标准mui.css-->
- <link rel="stylesheet" href="../css/mui.min.css">
- <!--App自定义的css-->
- <!--<link rel="stylesheet" type="text/css" href="css/app.css" />-->
- <style>
- .mui-table h4,
- .mui-table h5,
- .mui-table .mui-h5,
- .mui-table .mui-h6,
- .mui-table p {
- margin-top: 0;
- }
-
- .mui-table h4 {
- line-height: 21px;
- font-size: 16px;
- font-weight: 500;
- }
-
- .mui-table .oa-icon {
- position: absolute;
- right: 0;
- bottom: 0;
- }
-
- .mui-table .oa-icon-star-filled {
- color: #f14e41;
- }
-
- .mui-bar-nav {
- background-color: #00a1cb;
- }
-
- .hy_loading {
- position: fixed;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, .3);
- z-index: 9998;
- transition: all .2s;
- }
-
- .hy_loading .loading_img {
- position: absolute;
- left: 0;
- top: 0;
- bottom: 0;
- right: 0;
- overflow: hidden;
- margin: auto;
- width: 60px;
- height: 24px;
- z-index: 9999;
- }
- </style>
- </head>
- <body>
- <div class="hy_loading" id="hy_loading">
- <img class="loading_img" src="../images/loading-0.gif" alt="加载中" />
- </div>
- <div class="mui-content mui-content mui-scroll-wrapper" id="pullrefresh">
- <div class="mui-scroll">
- <ul class="mui-table-view" id="order_list">
- <!--<li class="mui-table-view-cell">
- <div class="mui-input-row mui-search">
- <input type="search" class="mui-input-clear go_search" placeholder="请输入关键字" style="margin-bottom: 0;">
- </div>
- <div class="mui-btn mui-btn-primary turnGo">更多</div>
- </li>-->
- </ul>
- </div>
- </div>
- </body>
- <script src="../js/zepto.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <script src="../Script/Common/huayi.http.js"></script>
- <script src="../js/mui.min.js"></script>
- <script>
- var page = 1; //页数
- var pageSize = 10; //每页显示条目
- var total; //数据总条数
- var token = localStorage.getItem("T"); //获取本地存储
- Ajax();
- mui.init({
- swipeBack: false,
- pullRefresh: {
- container: '#pullrefresh',
- up: {
- contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容
- contentnomore: '没有更多数据了', //可选,请求完毕若没有更多数据时显示的提醒内容;
- callback: pullupRefresh
- }
- }
- });
- //下拉刷新
- function pullupRefresh() {
- setTimeout(function() {
- mui('#pullrefresh').pullRefresh().endPullupToRefresh((page++ >= Math.ceil(total / 10)));
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'Notice/GetList',
- dataType: 'json', //服务器返回json格式数据
- data: {
- openid: helper.cookies.get("openid"),
- page: page,
- pagesize: pageSize
- },
- success: function(data) {
- total = data.total;
- var a = "";
- $(data.rows).each(function(i, n) {
- var T = n.F_CreateOn.substring(0, n.F_CreateOn.indexOf(' '));
- a = '<li class="mui-table-view-cell order" index=' + n.F_NoticeId + '>' +
- '<div class="mui-table">' +
- '<div class="mui-table-cell mui-col-xs-8">' +
- '<h4 class="mui-ellipsis">' + n.F_Title + '</h4>' +
- '<span class="mui-h5">' + T + '</span>' +
- '</div>' +
- '<div class="mui-table-cell mui-col-xs-4 mui-text-right">' +
- ' <a class="mui-navigate-right"></a>' +
- '</div>' +
- '</div>' +
- '</li>'
- $(a).appendTo($("#order_list"));
- })
- },
- })
- }, 1000);
- }
- //初次加载
- function Ajax() {
- $(".order").remove();
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'Notice/GetList',
- dataType: 'json', //服务器返回json格式数据
- data: {
- openid: helper.cookies.get("openid"),
- page: page,
- pagesize: pageSize
- },
- success: function(data) {
- if(document.getElementById('hy_loading')){
- document.getElementById('hy_loading').style.opacity = 0;
- document.getElementById('hy_loading').remove();
- }
- total = data.total;
- var a = "";
- $(data.rows).each(function(i, n) {
- var T = n.F_CreateOn.substring(0, n.F_CreateOn.indexOf(' '));
- a = '<li class="mui-table-view-cell order" index=' + n.F_NoticeId + '>' +
- '<div class="mui-table">' +
- '<div class="mui-table-cell mui-col-xs-8">' +
- '<h4 class="mui-ellipsis">' + n.F_Title + '</h4>' +
- '<span class="mui-h5">' + T + '</span>' +
- '</div>' +
- '<div class="mui-table-cell mui-col-xs-4 mui-text-right">' +
- ' <a class="mui-navigate-right"></a>' +
- '</div>' +
- '</div>' +
- '</li>'
- $(a).appendTo($("#order_list"));
- })
- //详情
- $('.order').on('tap', function() {
- var index = $(this).attr("index");
- window.location.href = "AnnDeal.html?index=" + index;
- })
- },
- })
- }
- </script>
- </html>
|