示例1:

image.png

  1. //调用
  2. inforshow_format_html("樊亦村","320961199012675678","女","15281199000");
  3. //传入数据
  4. //name……姓名
  5. //idcno……身份证
  6. //sex……性别
  7. //mobile……手机号码
  8. function inforshow_format_html(name,idcno,sex,mobile) {
  9. var dom = "";
  10. dom = "<div style='font-size:32px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;line-height:70px;'>" +
  11. "<div>姓名:" + name+"</div>" +
  12. "<div>身份证:" + idcno+"</div>" +
  13. "<div>性别:"+sex+"</div>" +
  14. "<div>手机号码:" + mobile+"</div>" +
  15. "</div>";
  16. return dom;
  17. }

示例2:

image.png

  1. //调用
  2. inforshow_format_html();
  3. //无传入数据
  4. function inforshow_format_html(){
  5. var dom = "";
  6. dom = "<div style='font-size:32px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;line-height:70px;padding-left:20px'>" +
  7. "<div>1、请您使用二代身份证在本机办理居民健康卡。</div>"+
  8. "<div>2、本院诊疗卡将收取您的10元押金。</div>" +
  9. "<div>3、请您务必妥善保管您挂号时打印出的凭条,以便就诊、取药时使用。</div>" +
  10. "<div>4、请根据 自助设备上提示及时取出您的诊疗卡。</div>" +
  11. "</div>";
  12. return dom;
  13. }

示例3:

image.png

  1. //调用
  2. inforshow_format_html("99889900");
  3. //cardNo……卡号
  4. function inforshow_format_html(cardNo) {
  5. var dom = "";
  6. dom = "<div style='font-size:32px;display:flex;flex-direction:column;justify-content:center;align-items:center;'>" +
  7. "<div>您已经办过卡,卡号是:<spans style='color:#386fc9'>" + cardNo + "</span></div>" +
  8. "<br/>" +
  9. "<div>点击确认进行补卡,补卡后<span style='color:red'>原卡作废</span></div>" +
  10. "<div style='margin-top:20px'>否则请点击返回按钮!</div>" +
  11. "</div>";
  12. return dom;
  13. }

示例4:

image.pngimage.pngimage.png

  1. //调用:
  2. //type……类型(success|failed)
  3. //pic……ICON图片名(路径:./h5/img/icon/inforshow)
  4. //content……文字内容
  5. // 传入的文字内容超过一行时将自动换行,如需强制换行,则在string中加入"<br/>"即可。
  6. content: inforshow_format_html("failed", "failed.svg", "操作失败"),
  7. content: inforshow_format_html("success", "success.svg", "操作成功"),
  8. content: inforshow_format_html("success", "left-arrow.svg","请按图示,插入您的医保卡"),
  9. //HTML代码(复制即可用)
  10. function inforshow_format_html(type, pic,content) {
  11. //获取当前分辨率信息
  12. var dpi = window.ZZH5.Dpi;
  13. var _img_width ="100px";
  14. if (dpi == "1024_768") {
  15. _img_width = "75px";
  16. }
  17. var dom = "";
  18. var iconUrl = "./h5/img/icon/inforshow/";
  19. var maincolor = "#386fc9";
  20. if (type == "success") {
  21. maincolor = "#386fc9";
  22. }
  23. if (type == "failed") {
  24. maincolor = "#a81503";
  25. }
  26. dom = "<div style='display:flex;flex-direction:column;justify-content:center;align-items:center;'>" +
  27. "<img src='" + iconUrl + pic + "' style='width:" + _img_width+";margin-bottom:10px'/>" +
  28. "<div style='text-align:center;font-size:40px;color:" + maincolor + "'>" + content + "</div>" +
  29. "</div>";
  30. return dom;
  31. }

示例5:

示例6: