var t_background="#000";
订单查询
if(!UserInfo.has_login()){
location.href="login.html";
}
var page = 1;
mui.init({
swipeBack: true,
pullRefresh: {
container: '#pullrefresh',
down: {
callback: pulldownRefresh
},
up: {
contentrefresh: '正在加载...',
contentnomore:'没有更多数据了',//可选,请求完毕若没有更多数据时显示的提醒内容;
callback: pullupRefresh
}
}
});
if (mui.os.plus) {
mui.plusReady(function() {
setTimeout(function() {
mui('#pullrefresh').pullRefresh().pullupLoading();
}, 400);
});
} else {
mui.ready(function() {
mui('#pullrefresh').pullRefresh().pullupLoading();
});
}
function pulldownRefresh() {
page = 1;
$.ajax({
url: Common.domain + '/tools/red_packet_order.ashx',
async:true,
dataType: 'json',
data: {
action:'get_sj_order_list',
PageIndex: page,
access_token:UserInfo.token()
},
success: function(data) {
var lastPage=false;
if(data.result.length>0)
{page++;}
else{lastPage=true;}
$("#list").append(get_list_nr(data.result));
}
});
}
function pullupRefresh() {
$.ajax({
url: Common.domain + '/tools/red_packet_order.ashx',
async:true,
dataType: 'json',
data: {
action:'get_sj_order_list',
PageIndex: page,
access_token:UserInfo.token()
},
success: function(data) {
var lastPage=false;
if(data.result.length>0)
{page++;}
else{lastPage=true; }
$("#list").append(get_list_nr(data.result));
mui('#pullrefresh').pullRefresh().endPullupToRefresh(lastPage); //参数为true代表没有更多数据了。
}
});
}
function get_list_nr(data){
var html="";
for(var i=0;i
var v=data[i];
var zurl="order_jxz";
if(v.state==1)
{
zurl="shuttle_ck";
}
if(v.state==3)
{
zurl="order_ywc";
}
var jc_html="";
if(v.jcbs>1)
{
jc_html="加乘"+v.jcbs+"倍"
}
html+='
';html+='
html+=''+v.order_no+'';
html+=' '+jc_html+'';
html+=' ';
html+='';
// html+=' 已评价 ';
html+='
html+='
html+='
html+=''+v.add_time+'';
html+=''+v.origin_name+'';
html+=' '+v.dest_name+'';
html+='
html+='
html+=' ';
html+=' ¥'+v.price+'';
html+=''+v.state_tilte+'';
html+='';
html+='
html+='
html+='
html+='';
html+='
';}
return html;
}