var url = null; var recordList = null; //申请记录 var data = { "interfaceId": "5702", "outId": "10702", "reqDateTime": new Date(), "tokenAuth": "", "data": { "userName": "", } }; function init() { var user = JSON.parse(localStorage.getItem('user')); url = user.url + "/api-phone/v35/gateway"; data.tokenAuth = user.tokenAuth; data.data.userName = user.userName; getRecordList(); } //获取申请记录列表 function getRecordList() { mui.ajax(url, { type: "POST", dataType: "json", crossDomain: true, contentType: "application/json;charset=utf-8", data: JSON.stringify(data), success: function(result) { if (result.code == "0000") { recordList = result.data; // console.log(JSON.stringify(recordList)) renderRecordList(); } else { renderRecordList(); mui.alert(result.msg, '提示', ["确定"], function() {}, "div"); } }, error: function() { renderRecordList(); mui.alert('系统繁忙,请重新登录尝试!', '提示', ["确定"], function() {}, "div"); } }) } function renderRecordList() { var html = ''; if (recordList && recordList.length > 0) { $.each(recordList, function(index, item) { html += '
有效开始时间: ' + item.startTime + '
有效结束时间: ' + item.endTime + '