调用:InforShow 背景:bg3.jpg

image.png
image.png
image.png
image.png

⚙ 配置

属性 说明 是否必需
media 左侧媒体信息配置
资源路径:./h5/img/icon/qrcode/(文件名不可随意定义)
YES
topTip 左侧媒体信息上方提示信息内容 NO
subTip 左侧媒体信息下方提示信息内容 NO
txt 信息内容 NO
contentCenter 信息内容是否垂直居中显示(可不配该配置,默认为true)。
设置为false时,内容以左上角处开始显示。
⚠️当设置为true时,传入内容时,超过一行数据将自动换行。
NO
tip 温馨提示配置(1080*1920竖屏下不支持) NO

整体配置范例

  1. function InforShow() {
  2. var data = {
  3. model: "InforShow",
  4. config: {
  5. shell: commonShellCfg2,
  6. bgImg: "bg3.jpg",
  7. modInAnimation: "fadeIn",
  8. media: {
  9. type: "qrcode", //swf pic qrcode
  10. // url: "./h5/img/lefttip/dycg.png",
  11. size: 220,
  12. data: "http://weixin.qq.com/r/3jovN8vEXZYirY9U92-M",
  13. qrIcon: "wx",
  14. },
  15. subTip: "请您打开微信进行扫码",
  16. txt: inforshow_format_html1("failed", "failed.svg", "通讯失败"),
  17. // txt: inforshow_format_html1("success", "success.svg", "操作成功"),
  18. // txt: inforshow_format_html1("success", "left-arrow.svg","请按图示,插入您的医保卡"),
  19. // txt: inforshow_format_html2("9988222"),
  20. // txt: inforshow_format_html3(),
  21. // txt: inforshow_format_html4("王晓华", "320402199008083418", "女", "15961287766"),
  22. // txt: "信息回显内容",
  23. contentCenter: true,
  24. tip: {
  25. title: "温馨提示",
  26. txt: "请您按提示认真操作,如有问题请求助自助机旁的导医人员。\n操作完成时,\n请您取走您的银行卡或诊疗卡,以防丢失!"
  27. }
  28. }
  29. };
  30. return data;
  31. }
  32. function inforshow_format_html1(type, pic, content) {
  33. var dpi = window.ZZH5.Dpi;
  34. var _img_width = "100px";
  35. if (dpi == "1024_768") {
  36. _img_width = "75px";
  37. }
  38. var dom = "";
  39. var iconUrl = "./h5/img/icon/inforshow/";
  40. var maincolor = "#386fc9";
  41. if (type == "success") {
  42. maincolor = "#386fc9";
  43. }
  44. if (type == "failed") {
  45. maincolor = "#a81503";
  46. }
  47. dom = "<div style='display:flex;flex-direction:column;justify-content:center;align-items:center;'>" +
  48. "<img src='" + iconUrl + pic + "' style='width:" + _img_width + ";margin-bottom:10px'/>" +
  49. "<div style='text-align:center;font-size:40px;color:" + maincolor + "'>" + content + "</div>" +
  50. "</div>";
  51. return dom;
  52. }
  53. function inforshow_format_html2(cardNo) {
  54. var dom = "";
  55. dom = "<div style='font-size:32px;display:flex;flex-direction:column;justify-content:center;align-items:center;'>" +
  56. "<div>您已经办过卡,卡号是:<spans style='color:#386fc9'>" + cardNo + "</span></div>" +
  57. "<br/>" +
  58. "<div>点击确认进行补卡,补卡后<span style='color:red'>原卡作废</span></div>" +
  59. "<div style='margin-top:20px'>否则请点击返回按钮!</div>" +
  60. "</div>";
  61. return dom;
  62. }
  63. function inforshow_format_html3() {
  64. var dom = "";
  65. dom = "<div style='font-size:24px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;line-height:52px;padding-left:20px'>" +
  66. "<div>1、请您使用二代身份证在本机办理居民健康卡。</div>" +
  67. "<div>2、本院诊疗卡将收取您的10元押金。</div>" +
  68. "<div style='width:600px'>3、请您务必妥善保管您挂号时打印出的凭条,以便就诊、取药时使用。</div>" +//想要换行须加width
  69. "<div>4、请根据 自助设备上提示及时取出您的诊疗卡。</div>" +
  70. "</div>";
  71. return dom;
  72. }
  73. function inforshow_format_html4(name, idcno, sex, mobile) {
  74. var dom = "";
  75. dom = "<div style='font-size:32px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;line-height:70px;'>" +
  76. "<div>姓  名:" + name + "</div>" +
  77. "<div>身份证号:" + idcno + "</div>" +
  78. "<div>性  别:" + sex + "</div>" +
  79. "<div>手机号码:" + mobile + "</div>" +
  80. "</div>";
  81. return dom;
  82. }

media

  1. //当type为pic或swf时
  2. media:{
  3. //媒体类型:swf|pic(可以是gif文件)|qrcode
  4. type:"swf",//swf pic qrcode
  5. //媒体文件路径
  6. url:"./h5/swf/idc.swf",
  7. //媒体文件尺寸(非必要,默认是文件原件尺寸大小)
  8. //🔆为了不影响缩放比例,只调width或height一个值
  9. size:{
  10. width:"200px",
  11. height:"100px"
  12. },
  13. }
  14. //当type为qrcode时
  15. media:{
  16. //媒体类型
  17. type:"qrcode",
  18. //二维码大小
  19. //🔆为正方形,可不配置,默认220(1024*768),280(1280*1024)
  20. size:220,
  21. //二维码数据
  22. data:"123",
  23. //二维码中ICON
  24. //微信:wx
  25. //支付宝:ali
  26. qrIcon:"ali"
  27. }

subTip

  1. //#调用
  2. subTip:"请按提示操作"

title

  1. //#调用
  2. title:"请核对您的信息"

txt

  1. //#调用(支持HTML标签)
  2. txt: inforshow_format_html1("failed", "failed.svg", "通讯失败"),
  3. txt: inforshow_format_html1("success", "success.svg", "操作成功"),
  4. function inforshow_format_html1(type, pic, content) {
  5. var dpi = window.ZZH5.Dpi;
  6. var _img_width = "100px";
  7. if (dpi == "1024_768") {
  8. _img_width = "75px";
  9. }
  10. var dom = "";
  11. var iconUrl = "./h5/img/icon/inforshow/";
  12. var maincolor = "#386fc9";
  13. if (type == "success") {
  14. maincolor = "#386fc9";
  15. }
  16. if (type == "failed") {
  17. maincolor = "#a81503";
  18. }
  19. dom = "<div style='display:flex;flex-direction:column;justify-content:center;align-items:center;'>" +
  20. "<img src='" + iconUrl + pic + "' style='width:" + _img_width + ";margin-bottom:10px'/>" +
  21. "<div style='text-align:center;font-size:40px;color:" + maincolor + "'>" + content + "</div>" +
  22. "</div>";
  23. return dom;
  24. }

image.pngimage.png

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

image.png

  1. //#调用(支持HTML标签)
  2. txt: inforshow_format_html23("王晓华", "32040219900808", "女", "15961287766"),
  3. function inforshow_format_html23(name, idcno, sex, mobile) {
  4. var dom = "";
  5. // 🔥行数多时注意修改line-height属性,降低行高
  6. dom = "<div style='font-size:36px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;line-height:100px;'>" +
  7. "<lable>姓  名:" + name + "</lable>" +
  8. "<lable>身份证号:" + idcno + "</lable>" +
  9. "<lable>性  别:" + sex + "</lable>" +
  10. "<lable>手机号码:" + mobile + "</lable>" +
  11. "</div>";
  12. return dom;
  13. }

image.png

contentCenter

  1. //#调用
  2. contentCenter:false

tip

  1. //#调用(支持HTML标签)
  2. //文本换行请加:<br/>或每行以<p></p>来包裹或\n
  3. tip:{
  4. //标题
  5. title: "温馨提示",
  6. //内容
  7. txt: "请您认真操作"
  8. }

👉点击这里:使用更多HTML格式

♨️ JS Call

方法 说明
setData(type,content):void 文字内容设置。

setData(type,content):void

[入参] type……设置方式。 add:追加文字内容。 reset:重置文字内容。 content……文字内容(支持HTML标签) [返回]无

  1. //#调用-追加文字
  2. ZZH5.Call.setData("add","加载成功,正在跳转页面...");
  3. //#调用-重设文字
  4. ZZH5.Call.setData("reset","加载成功,正在跳转页面...");

🚀 getData