mybaodan.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. var str = '<div class="lr-list-item" style="text-align: center;font-size: 20px;font-weight:bold;" id="detailList">套餐包含</div>';
  15. $('.insuranceName').text(res.data.insuranceName);
  16. $('.startTime').text(res.data.insureInfo.StartDate);
  17. $('.endTime').text(res.data.insureInfo.EndDate);
  18. for (var i = 0; i < res.data.insuranceDetailInfo.length; i++) {
  19. 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">'
  20. + res.data.insuranceDetailInfo[i].InsuranceTypeNo + '</span></div>';
  21. }
  22. $('#detailList').after(str);
  23. });
  24. }
  25. };
  26. return page;
  27. })();
  28. // <div class="lr-list-item"><div style="font-weight: bold;">险种1</div></div>
  29. // <div class="lr-list-item"><div>险种名称</div><span class="weChat">111111</span></div>
  30. // <div class="lr-list-item"><div>保单编号</div><span class="oICQ">1111111</span></div>