mybaodan.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. (function () {
  2. var page = {
  3. isScroll: true,
  4. init: function ($page) {
  5. var userinfo = renlian.storage.get('userinfo');
  6. console.log(userinfo);
  7. var postdata = {
  8. token: userinfo.baseinfo.token,
  9. loginMark: renlian.deviceId(),
  10. plate: userinfo.baseinfo.plate
  11. };
  12. renlian.http.post(config.webapi + "/?s=api/get_insurance_detail", postdata, function(res) {
  13. console.log(res);
  14. if(res.data != null){
  15. $('#total').css('display','block');
  16. var str = '<div class="lr-list-item" style="text-align: center;font-size: 20px;font-weight:bold;">套餐包含</div>';
  17. $('.insuranceName').text(res.data.insuranceName);
  18. $('.startTime').text(res.data.insureInfo.StartDate);
  19. $('.endTime').text(res.data.insureInfo.EndDate);
  20. if(res.data.insuranceDetailInfo != null){
  21. for (var i = 0; i < res.data.insuranceDetailInfo.length; i++) {
  22. str += ' <div class="lr-list-item"><div style="font-weight: bold;">险种'+ (i+1) + '</div></div><div class="lr-list-item"><div>险种名称</div><span class="weChat">' + res.data.insuranceDetailInfo[i].InsuranceTypeName + '</span></div><div class="lr-list-item"><div>保单编号</div><span class="oICQ">'
  23. + res.data.insuranceDetailInfo[i].InsuranceTypeNo + '</span></div>';
  24. }
  25. $('#detailList').after(str);
  26. }
  27. }
  28. else{
  29. $('#message').css('display','block');
  30. }
  31. });
  32. }
  33. };
  34. return page;
  35. })();
  36. // <div class="lr-list-item"><div style="font-weight: bold;">险种1</div></div>
  37. // <div class="lr-list-item"><div>险种名称</div><span class="weChat">111111</span></div>
  38. // <div class="lr-list-item"><div>保单编号</div><span class="oICQ">1111111</span></div>