调用:RegList 背景:bg2.jpg

image.png

image.png

⚙ 配置

属性 说明 是否必需
uniClick 所点击项触发的事件,传入当前下标与当前数据 YES
tip 下方提示信息 NO
contentConfig 数据配置 YES
btnName 每项右侧按钮的文字内容。
非必要设置,默认显示:“点击查看”
NO
AvatarClick 点击头像回调接口 NO
needPopInfor 每项的人头是否可被点击并弹出详细信息内容窗体配置
非必要设置,默认:false(不可点击弹出)
NO

整体配置范例

  1. function RegistList() {
  2. var data = {
  3. model: "RegList",
  4. config: {
  5. shell: commonShellCfg,
  6. bgImg: "bg2.jpg",
  7. modInAnimation: "fadeInLeft",
  8. uniClick: "reglistUniClick",
  9. //点击头像回调接口,传出index
  10. AvatarClick:function (index) { alert(index) },
  11. tip: "温馨提示:点击医生头像即可查询医生详细介绍",
  12. btnName: "挂号",
  13. contentConfig: [
  14. {
  15. avatar: "./h5/img/assets/doc.png",
  16. diyContent: regList_content_html3({ name: '张春华', position: '主任医师', dept: '角膜病门诊', num: '200', regDate: '早白', regFee: '14.50', goodat: '弱视、斜视' }),
  17. disabled: true,
  18. },
  19. {
  20. avatar: "./h5/img/assets/doc.png",
  21. disabled: false,
  22. diyContent: regList_content_html2({ name: "李雪峰", position: "主任医师", regDate: "上午", regFee: '35.00' }),
  23. },
  24. {
  25. avatar: "./h5/img/assets/doc.png",
  26. disabled: false,
  27. diyContent: regList_content_html2({ name: "张明明", position: "副主任医师", regDate: "上午", regFee: '20.00' }),
  28. },
  29. {
  30. avatar: "./h5/img/assets/doc.png",
  31. diyContent: regList_content_html({ name: "张明明", position: "副主任医师", regDate: "上午", regFee: '20.00' }),
  32. disabled: true
  33. },
  34. {
  35. avatar: "./h5/img/assets/doc.png",
  36. diyContent: "张医生\n简介:教授,博士生导师,国家级名老中医药专家,全国优秀中医临床研修老师,北京市中医住院医师规范化培训师承指导老师",
  37. disabled: false
  38. },
  39. {
  40. avatar: "./h5/img/assets/doc.png",
  41. diyContent: "简介:教授,博士生导师,国家级名老中医药专家,全国优秀中医临床研修老师,北京市中医住院医师规范化培训师承指导老师",
  42. disabled: false
  43. },
  44. {
  45. avatar: "./static/img/user.png",
  46. diyContent: "简介:教授,博士生导师,国家级名老中医药专家,全国优秀中医临床研修老师,北京市中医住院医师规范化培训师承指导老师",
  47. disabled: true
  48. },
  49. {
  50. avatar: "./static/img/user.png",
  51. diyContent: "简介:教授,博士生导师,国家级名老中医药专家,全国优秀中医临床研修老师,北京市中医住院医师规范化培训师承指导老师",
  52. disabled: false
  53. },
  54. {
  55. avatar: "./static/img/user.png",
  56. info: {
  57. name: "张医生",
  58. duty: "主治医师",
  59. time: "上午"
  60. },
  61. introdution: "简介:教授,博士生导师,国家级名老中医药专家,全国优秀中医临床研修老师,北京市中医住院医师规范化培训师承指导老师",
  62. disabled: false
  63. },
  64. {
  65. avatar: "./static/img/user.png",
  66. info: {
  67. name: "张医生",
  68. duty: "主治医师",
  69. time: "上午"
  70. },
  71. introdution: "简介:教授,博士生导师,国家级名老中医药专家,全国优秀中医临床研修老师,北京市中医住院医师规范化培训师承指导老师",
  72. disabled: false
  73. },
  74. ]
  75. }
  76. }
  77. return data;
  78. }

uniClick

  1. // 点击事件
  2. uniClick: "reglistUniClick",
  3. // 调用自定义函数
  4. function reglistUniClick(index,item) {
  5. //获取按钮索引以及对应索引的值
  6. console.log(index,item);
  7. }

contentConfig

  1. contentConfig:[
  2. {
  3. // 头像 url
  4. //自定义图像请采用同宽高的尺寸,推荐300*300、400*400(单位:px)
  5. //未配置时,默认是灰色默认用户样式。假如医院没有医生头像照片提供,
  6. //推荐使用:./h5/img/assets/doc.png 代替。
  7. avatar: "./static/img/user.png",
  8. // 医生基础信息(固定模板式样)
  9. // 当info为空或不存在时,自动选择解析对象为diyContent
  10. info: {
  11. name: "小华佗医生",
  12. duty: "主治医师",
  13. time: "上午"
  14. },
  15. // 简介(基础用)
  16. // diyContent不使用时生效
  17. introdution: "简介:很牛逼的主任医师,教授,博士生导师,国家级名老中医药专家,全国优秀中医临床研修老师,北京市中医住院医师规范化培训师承指导老师",
  18. // 是否禁用
  19. disabled: false,
  20. // 信息内容(可自定义内容形式)
  21. // 当diyContent为空或不存在时,默认解析info对象内的值
  22. diyContent:regList_content_html({ name: "华佗", position: "副主任医师", regDate: "上午", regFee:'50.00' }),
  23. },...
  24. ]
  25. //自定义内容形式
  26. function regList_content_html(docInfor) {
  27. return "<div style='display:flex;flex-direction:column;justify-content:center;width:100%;height:100%;font-size:28px'>" +
  28. "<div style='display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin-bottom:15px'>" +
  29. "<div>"+
  30. "<span style='font-weight:bold'>" + docInfor.name + "</span>" +
  31. "<span>(" + docInfor.position + ")</span>" +
  32. "</div>"+
  33. "<span style='color:#fff;font-size:24px;margin-right:10px;background-color:#fd2121;padding:5px;border-radius:5px'>" + docInfor.regDate + "</span>" +
  34. "</div>" +
  35. "<div>" +
  36. "<span style='color:red;font-size:24px;'>挂号费:" + docInfor.regFee + "元</span>" +
  37. "</div>" +
  38. "</div>";
  39. }

AvatarClick

  1. //点击头像回调接口,传出index
  2. AvatarClick:function (index) { alert(index) },

tip

  1. tip: "温馨提示:点击医生头像即可查询医生详细介绍",

btnName

  1. btnName: "挂号",

♨️ JS Call

🚀 getData