Keine Beschreibung

wechatAddSuccess.html 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta content="yes" name="apple-mobile-web-app-capable">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0,user-scalable=0" />
  7. <title>加入成功</title>
  8. <link rel="stylesheet" type="text/css" href="public/public_css.css"/>
  9. <style type="text/css">
  10. body{
  11. background: #FFFFFF;
  12. }
  13. .userImg{
  14. width: 0.87rem;
  15. height: 0.87rem;
  16. border-radius: 50%;
  17. margin: auto;
  18. margin-top: 0.41rem;
  19. margin-bottom: 0.22rem;
  20. }
  21. .inviting{
  22. max-width: 2.4rem;
  23. text-align: center;
  24. font-size: 0.16rem;
  25. color: #878787;
  26. line-height: 0.22rem;
  27. margin: auto;
  28. }
  29. .inviting text{
  30. color:#646464;
  31. }
  32. .button{
  33. width: 2.47rem;
  34. height: 0.41rem;
  35. background: #FFE100;
  36. color: #FFFFFF;
  37. font-size: 0.2rem;
  38. border-radius: 0.26rem;
  39. box-shadow:0px 0.02rem 0px rgba(251,179,179,0.5);
  40. border-radius:0.26rem;
  41. margin: auto;
  42. margin-top: 0.97rem;
  43. display: block;
  44. }
  45. </style>
  46. </head>
  47. <body>
  48. <img class="userImg" src="image/logo.png" />
  49. <p class="inviting">您已成功加入《<text>旅行账本</text>》<br/>名片:<span>ZYuuu</span></p>
  50. <button class="button" onclick="goApp()">打开app,一起记账</button>
  51. <div class="mask">
  52. <div class="content">
  53. <h3>提示</h3>
  54. <p>密码错误啊啊啊啊啊</p>
  55. <div onclick="iknow()">我知道了</div>
  56. </div>
  57. </div>
  58. </body>
  59. </html>
  60. <script type="text/javascript" src="public/jquery-2.1.0.js"></script>
  61. <script type="text/javascript">
  62. document.documentElement.style.fontSize = 100 * (document.documentElement.clientWidth/375) + "px";
  63. window.onresize = function(){
  64. document.documentElement.style.fontSize = 100 * (document.documentElement.clientWidth/375) + "px";
  65. }
  66. var appUrl = null;
  67. var avatar = '';
  68. var book_name = '金牛记账';
  69. var user_name = '';
  70. var message = '';
  71. var code = '';
  72. var str=location.href; //取得整个地址栏
  73. var num=str.indexOf("?");
  74. str=str.substr(num+1); //str得到?之后的字符串
  75. var brr=str.split("&");
  76. for(var i = 0 ; i<brr.length; i++){
  77. if(brr[i].indexOf('code') != -1){
  78. code = brr[i].split('=')[1];
  79. }
  80. if(brr[i].indexOf('avatar') != -1){
  81. avatar = brr[i].split('=')[1];
  82. }
  83. if(brr[i].indexOf('userName') != -1){
  84. user_name = brr[i].split('=')[1];
  85. user_name = decodeURI(user_name);
  86. }
  87. if(brr[i].indexOf('bookName') != -1){
  88. book_name = brr[i].split('=')[1];
  89. book_name = decodeURI(book_name);
  90. }
  91. if(brr[i].indexOf('message') != -1){
  92. message = brr[i].split('=')[1];
  93. message = decodeURI(message);
  94. }
  95. if(brr[i].indexOf('appUrl') != -1){
  96. appUrl = brr[i].split('=')[1];
  97. }
  98. }
  99. window.onload = function (){
  100. $(".mask").css("visibility","visible");
  101. $(".content p").html(message);
  102. if(avatar == "null" || avatar == ""){
  103. $(".userImg").attr("src","image/logo.png");
  104. }else{
  105. $(".userImg").attr("src",avatar);
  106. }
  107. if(code != 0){
  108. $(".inviting").html(message);
  109. }
  110. $(".inviting text").html(book_name);
  111. $(".inviting span").html(user_name);
  112. }
  113. function iknow () {
  114. $(".mask").css("visibility","hidden");
  115. }
  116. function goApp () {
  117. if(navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)){
  118. window.location.href=appUrl;
  119. }
  120. if(navigator.userAgent.match(/android/i)){
  121. window.location.href='http://android.myapp.com/myapp/detail.htm?apkName=com.kuxuan.jinniunote';
  122. }
  123. }
  124. </script>