|
- <!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" />
- <link href="css/mui.min.css" rel="stylesheet" />
- <link href="css/style.css" rel="stylesheet" />
- <script src="js/mui.min.js"></script>
- <script src="js/serverurl.js"></script>
- <script src="js/userinfos.js"></script>
- <script type="text/javascript">
- mui.plusReady(function() {
- CheckLogin();
- GetData();
- });
- function jsonDateFormatDate(strDate) { //json日期格式转换为正常格式
- if(strDate != undefined && strDate != null) {
- var date = eval('new Date(' + strDate.replace(/\d+(?=-[^-]+$)/,
- function(a) {
- return parseInt(a, 10) - 1;
- }).match(/\d+/g) + ')');
- return formatDate(date);
- } else {
- return '';
- }
- }
- function GetData() {
- var table = document.getElementById("table");
- //server data
- // 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++) {
- // //load list
- // var dataobject = xhr.response.msg[i];
- // var li = document.createElement('li');
- // li.className = 'mui-table-view-cell mui-media';
- // li.innerHTML = '<a>' +
- // '<div class="mui-media-body">' +
- // '年度:'+year+'<br/>' +
- // '<span style="color:#C70F1A;">金额: '+dataobject[i].scoresNum+'<br/></span> 发放时间: '+jsonDateFormatDateTime(dataobject[i].createDate)+' <br/> 发放银行卡: '+dataobject[i].bankNumber+'' +
- // '</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=getRewardLists&content={'userID':'" + users.ID + "'}"));
- // xhr.send();
- plus.nativeUI.showWaiting("数据加载中...");
- mui.post(api+'/user/integradetail',{data:users.ID},function(res){
- if(res.code=="200"){
- plus.nativeUI.closeWaiting();
- console.log(JSON.stringify(res.data))
- for(var i = 0; i < res.data.length; i++) {
- //load list
- var dataobject = res.data[i];
- var li = document.createElement('li');
- li.className = 'mui-table-view-cell mui-media';//
- li.innerHTML = '<a>' +
- '<div class="mui-media-body">' +
- '年度:'+dataobject.year+'<br/>' +
- '<span style="color:#C70F1A;">金额: '+dataobject.scoresNum+'<br/></span> 发放时间: '+jsonDateFormatDateTime(dataobject.createDate)+' <br/> 发放银行卡: '+dataobject.bankNumber+'' +
- '</div>' +
- '</a>';
- table.appendChild(li, table.firstChild);
- }
- }
- },'json')
- }
- </script>
- </head>
-
- <body>
- <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-title">奖励发放</h1>
- </header>
- <div class="mui-content">
- <ul class="mui-table-view" id="table">
- </ul>
- </div>
- </body>
-
- </html>
|