阜外心血管项目前端

person.js 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. mui.init({})
  2. var openid = helper.cookies.get("openid");
  3. Ajax();
  4. function Ajax() {
  5. //$(".order").remove();
  6. $.ajax({
  7. url: huayi.config.callcenter_url + 'WxLogin/GetBusList',
  8. data: {
  9. openid:openid,
  10. },
  11. async: true,
  12. dataType: 'json',
  13. type: 'get', //HTTP请求类型
  14. success: function(data) {
  15. if(data.data && data.data.length > 0) {
  16. $.each(data.data, function(i,n) {
  17. $('<li class="mui-table-view-cell mui-media mui-col-xs-6 mui-col-sm-6 Managment order" data-index="' + n.F_Id + '">'+
  18. '<a href="javascript:;">'+
  19. '<div class="mui-pull-left Left-icon">'+
  20. '<div class="icon_blue"><img src="../img/icon_blue.png">'+
  21. '</div>'+
  22. '</div>'+
  23. '<div class="mui-text-left mui-pull-left">'+
  24. '<h4 class="busName">'+n.F_BusName+
  25. '</h4><h5>'+n.F_BusLabel+
  26. '</h5></div></a></li>').appendTo("#task_list")
  27. });
  28. $(".order").on("click",function(){
  29. var index = $(this).attr('data-index');
  30. if ($(this).find(".busName").text()=="开发票") {
  31. window.location.href="AddInvoice.html"
  32. }else{
  33. window.location.href="indexDetail.html?id=" + index
  34. }
  35. })
  36. } else {
  37. $(".noinfor").text("暂无信息");
  38. }
  39. },
  40. error: function(xhr, type, errorThrown) {
  41. //异常处理;
  42. }
  43. })
  44. }