1 |
- (function(e){var c=JSON.parse(localStorage.getItem("out"));var d=Fx.getUrlParam("id");var b=Fx.getUrlParam("date");if(c[d]){c[d].sort(function(h,g){return h.consumptionHours>g.consumptionHours?1:-1})}e(".itable .body tbody").html(hzAPI.setTemplate(hzAPI.replaceEscape(e(".itable .body tbody").html()),c[d]));e(".itable .body tbody").show();var a=["pending","missing","rearrange"];var f={pending:"待服",missing:"漏服",taked:"已服"};e(".itable td .button").bind("tap",function(){var g=a.indexOf(e(this).attr("name"));if(g>=0){switch(g){case 0:case 1:hzAPI.sendData(window.apiUrl+"?c=Index&a=medicineScheduleUpdate",{id:e(this).attr("id"),status:"taken"},false,["服用确认失败","服用确认成功"],[1,e(this)]);break;case 2:if(e(this).attr("data")){window.location="drug_q_plan_edit.html?id="+e(this).attr("data")}break}}})})(Zepto);
|