Nav apraksta

wechatAddSuccess.html 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. avatar = decodeURIComponent(avatar);
  83. }
  84. if(brr[i].indexOf('userName') != -1){
  85. user_name = brr[i].split('=')[1];
  86. user_name = decodeURI(user_name);
  87. }
  88. if(brr[i].indexOf('bookName') != -1){
  89. book_name = brr[i].split('=')[1];
  90. book_name = decodeURI(book_name);
  91. }
  92. if(brr[i].indexOf('message') != -1){
  93. message = brr[i].split('=')[1];
  94. message = decodeURI(message);
  95. }
  96. if(brr[i].indexOf('appUrl') != -1){
  97. appUrl = brr[i].split('=')[1];
  98. appUrl = decodeURIComponent(appUrl);
  99. }
  100. }
  101. console.log(appUrl)
  102. window.onload = function (){
  103. if(avatar == "null" || avatar == ""){
  104. $(".userImg").attr("src","image/logo.png");
  105. }else{
  106. $(".userImg").attr("src",avatar);
  107. }
  108. $(".inviting text").html(book_name);
  109. $(".inviting span").html(user_name);
  110. if(code != 0){
  111. $(".inviting").html(message);
  112. $(".mask").css("visibility","visible");
  113. $(".content p").html(message);
  114. }else{
  115. $(".mask").css("visibility","visible");
  116. $(".content p").html('加入账本成功');
  117. }
  118. }
  119. function iknow () {
  120. $(".mask").css("visibility","hidden");
  121. }
  122. function goApp () {
  123. if(navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)){
  124. window.location.href=appUrl;
  125. }
  126. if(navigator.userAgent.match(/android/i)){
  127. window.location.href='http://android.myapp.com/myapp/detail.htm?apkName=com.kuxuan.jinniunote';
  128. }
  129. }
  130. </script>