|
- <!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 src="js/tools.js"></script>
- <style>
- .mui-control-item span {
- display: block;
- margin: 0;
- padding: 0;
- font-size: 20px;
- }
- </style>
- <script type="text/javascript">
- mui.plusReady(function() {
- CheckLogin();
- document.getElementById("bank").addEventListener("tap", function() {
- mui.openWindow({
- url: 'bankcard.html',
- id: 'bankcard',
- show: {
- aniShow: 'pop-in'
- }
- });
- });
- document.getElementById("faf").addEventListener("tap", function() {
- mui.openWindow({
- url: 'fafang.html',
- id: 'fafang',
- show: {
- aniShow: 'pop-in'
- }
- });
- });
- 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) {
- GetDataCount();
- 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;
- var li = document.createElement('li');
- li.className = 'mui-table-view-cell mui-media';
- li.innerHTML = '<a>' +
- '<div class="mui-media-body">' +
- '' + dataobject[i].user_id + '' +
- '<span style="width: 25%; color:#C70F1A; text-align: left; float: right;">' + jsonDateFormatDate(dataobject[i].create_date) + '</span>' +
- '<p style="font-size: 14px;">' + dataobject[i].scores_name + '<span>(' + dataobject[i].scores_num + ')</span></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=getScoresInfo&content={'logname':'" + users.phone + "','app':'2'}"));
- xhr.send();
- plus.nativeUI.showWaiting("数据加载中...");
- mui.post(api+'/user/integradetail',{data:users.ID},function(res){
- if(res.code=="200"){
- plus.nativeUI.closeWaiting();
-
- 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">' +
- '' + users.username + '' +
- '<span style="width: 25%; color:#C70F1A; text-align: left; float: right;">' + jsonDateFormatDate(dataobject.createDate) + '</span>' +
- '<p style="font-size: 14px;">' + dataobject.scorename + '<span>(' + dataobject.scoresNum + ')</span></p>' +
- '</div>' +
- '</a>';
- table.appendChild(li, table.firstChild);
- }
- }
- },'json')
- }
- function GetDataCount() {//
-
- plus.nativeUI.showWaiting("数据加载中...");
- mui.post(api+'/user/detailInfo',{data:users.ID},function(res){
- if(res.code=="200"){
- plus.nativeUI.closeWaiting();
- document.getElementById("jlcount").innerText=res.data.getcount;
- document.getElementById("mxcount").innerText=res.data.allcount;
- }
- },'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">
- <div id="slider" class="mui-slider">
- <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
- <a class="mui-control-item mui-active" href="#item1mobile">
- <span id="jlcount">0</span>我的奖励
- </a>
- <a class="mui-control-item" href="#item2mobile">
- <span id="mxcount">0</span>奖励明细
- </a>
- </div>
- <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div>
- <div class="mui-slider-group">
- <div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
-
- <ul class="mui-table-view" style="margin-top: 25px;" id="bank">
- <li class="mui-table-view-cell">
- <a class="mui-navigate-right"><img style="max-width: 20px; height: 20px;" class="mui-pull-left" src="images/card.png"> 银行卡</a>
- </li>
- </ul>
- <ul class="mui-table-view" style="margin-top: 25px;" id="faf">
- <li class="mui-table-view-cell">
- <a class="mui-navigate-right"><img style="max-width: 20px; height: 20px;" class="mui-pull-left" src="images/jiangli.png"> 奖励发放</a>
- </li>
- </ul>
-
- </div>
- <div id="item2mobile" class="mui-slider-item mui-control-content">
- <ul class="mui-table-view" id="table">
-
- </ul>
- </div>
- </div>
- </div>
- </div>
- </body>
-
- </html>
|