modul.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
  6. <title>title</title>
  7. <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
  8. <style>
  9. html,body{
  10. background: transparent;
  11. -webkit-touch-callout: none;
  12. font-family: Tahoma, Geneva, sans-serif;
  13. font-style: normal;
  14. margin: 0;
  15. }
  16. #dialog{
  17. background-color: #fff;
  18. position: absolute; margin: auto;
  19. left: 0; right: 0; top: -150px; bottom: 0;
  20. width: 260px; height: 290px;
  21. opacity: 0;
  22. text-align: center;
  23. padding: 20px 0;
  24. box-sizing: border-box;
  25. -webkit-border-radius: 5px;
  26. border-radius: 5px;
  27. }
  28. #dialog.in{
  29. opacity: 1;
  30. }
  31. .name{
  32. font-size: 25px;
  33. color: #000;
  34. /*font-weight: bold;*/
  35. }
  36. .head{
  37. width: 90px;
  38. height: 90px;
  39. border-radius: 50%;
  40. }
  41. .del{
  42. color: #bdc3c7;
  43. font-size: 16px;
  44. margin: 5px 0;
  45. }
  46. .phone{
  47. font-size: 20px;
  48. }
  49. .call_phone{
  50. position: absolute;
  51. bottom: -30px;
  52. left: 100px;
  53. width: 60px;
  54. height: 60px;
  55. background: url("../../image/mobile_icon.png") no-repeat;
  56. background-size: cover;
  57. border-radius: 50%;z-index: 100;
  58. }
  59. .close{
  60. position: absolute;
  61. top: -8px;
  62. right: -8px;
  63. width: 30px;
  64. height: 30px;
  65. background: url("../../image/close.png") no-repeat;
  66. background-size: cover;
  67. background-position: center;
  68. border-radius: 50%;
  69. z-index: 100;
  70. }
  71. </style>
  72. </head>
  73. <body>
  74. <div id="dialog">
  75. </div>
  76. </body>
  77. <script type="text/template" id="personalInfo">
  78. <img src="{{=it.avatar == 'null'?'http://jiewei-icon.oss-cn-beijing.aliyuncs.com/icon/default-avatar.png':it.avatar}}" class="head">
  79. <p class="name">{{=it.username}}</p>
  80. {{?it.id != "" && it.id != undefined}}
  81. <div onclick="seeDetail('{{=it.id}}')" style="color:#009fe8;margin-top:5px;">查看详情</div>
  82. {{?}}
  83. <p class="del">{{=it.delp == 'null'? '无' : it.delp}}</p>
  84. <p class="phone">{{=it.mobile == 'null'? '无' : it.mobile}}</p>
  85. <span class="call_phone" tapmode onclick="call_phone()"></span>
  86. <span class="close" tapmode onclick="api.closeFrame()"></span>
  87. </script>
  88. <script type="text/javascript" src="../../script/api.js"></script>
  89. <script src="../../script/doT.min.js" charset="utf-8"></script>
  90. <script type="text/javascript" src="../../script/config.js"></script>
  91. <script type="text/javascript">
  92. $api.addCls(dialog,'in');
  93. apiready = function(){
  94. var obj = {username,mobile,avatar,delp,id} = api.pageParam
  95. $apis.html(dialog,'#personalInfo',obj);
  96. };
  97. // 查看详情
  98. function seeDetail(id) {
  99. $event.openPopup('auto','auto','personalInfo',{id})
  100. }
  101. // 拨打电话
  102. function call_phone() {
  103. if ($api.html($api.dom('.phone')) == "无") {
  104. api.alert({
  105. title: '提示',
  106. msg: '暂无手机号',
  107. });
  108. }else {
  109. api.call({
  110. type: 'tel_prompt',
  111. number: $api.html($api.dom('.phone'))
  112. });
  113. }
  114. }
  115. </script>
  116. </html>