//临时存储
var TempCache = {
cache:function(value){
localStorage.setItem("EasyWayTempCache",value);
},
getCache:function(){
return localStorage.getItem("EasyWayTempCache");
},
setItem:function(key,value){
localStorage.setItem(key,value);
},
getItem:function(key){
return localStorage.getItem(key);
},
removeItem:function(key){
return localStorage.removeItem(key);
}
};
//绑定视图的列表的相关的信息
function bindListView(changeData){
$(".workorderclass").each(function(){
$(this).click(function(){
//绑定订单的编号,便于在下一个页面切换时候使用
TempCache.setItem("order_function_mgr_id",$(this).attr("id"));
TempCache.setItem("order_function","serviceOrderFunction");
TempCache.setItem("order_function_mgr_id_w",$(this).attr("id"));
});
});
}
//工单展示的初始化信息
function displayWorkOrder(){
//绑定订单的编号,便于在下一个页面切换时候使用
var workOrderId=TempCache.getItem("order_function_mgr_id");
workOrderId=workOrderId.replace(/(^\s*)|(\s*$)/g,"");
//追踪工单来源
functionName=TempCache.getItem("order_function");
functionName=functionName.replace(/(^\s*)|(\s*$)/g,"");
if(workOrderId!=''){
queryWorkOrderInfo(workOrderId,functionName);
TempCache.removeItem("order_function_mgr_id"); }else{
alert("服务请求失败,请稍候再试....");
}
}
$(document).on('pagebeforeshow', "#index",function () {
$(document).on('click', "#changePage",function () {
$.mobile.changePage('second.html', { dataUrl : "second.html?paremeter=123", data : { 'paremeter' : '123' }, reloadPage : false, changeHash : true });
});
});
$(document).on('pagebeforeshow', "#second",function () {
var parameters = $(this).data("url").split("?")[1];;
parameter = parameters.replace("parameter=","");
alert(parameter);
});