gesture-setpassword.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>设置手势密码-爽客邦</title>
  6. <meta name="keywords" content="设置手势密码-爽客邦">
  7. <meta name="description" content="设置手势密码-爽客邦">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="设置手势密码-爽客邦">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. </head>
  17. <body class="gesture">
  18. <div id="app" v-cloak>
  19. <van-nav-bar class="gesture_password" title="设置手势密码" :right-text="righttitle" @click-right="goindex"></van-nav-bar>
  20. <div class="df cm">
  21. <ul class="df titlelogo">
  22. <li class="df cm" v-for="item in 9" :key="item"><span class="db" :class="item === 1 || item === 4 || item &gt; 6 ? 'bgblue': ''"></span></li>
  23. </ul>
  24. </div>
  25. <div id="inputpassword" @click="goinput"></div>
  26. <div id="comeback" @click="comeback"></div>
  27. </div>
  28. <script src="./static/js/klm-vv.min.js"></script>
  29. <script src="./static/js/klm-axios-config.js"></script>
  30. <script src="./static/js/H5lock.js"> </script>
  31. <script>
  32. // 在 #app 标签下渲染一个组件
  33. let app = new Vue({
  34. el: '#app',
  35. data() {
  36. return {
  37. righttitle:'',
  38. userimg:"./static/images/user-img-color@3x.png",
  39. timer:''
  40. }
  41. },
  42. created(){
  43. if(PublicLib.getCookieInfo('step') === undefined) {
  44. this.righttitle = '跳过';
  45. };
  46. },
  47. mounted() {
  48. //- 根据内存中的变量进行判断
  49. if(PublicLib.getCookieInfo('issetting') !== '1') {
  50. //- 初始化手势密码
  51. new H5lock({
  52. //- 单位:px
  53. //- 圆圈个数
  54. chooseType: 3,
  55. //- 连接线宽度
  56. linwidth: 2,
  57. //- 成功的颜色
  58. successcolor: '#2B84FF',
  59. //- 成功的背景色
  60. successbgcolor:'rgba(43, 132, 255, 0.1)',
  61. //- 失败的颜色
  62. wariningcolor:'#FF574D',
  63. //- 失败的背景色
  64. wariningbgcolor:'rgba(255, 87, 77, 0.1)',
  65. //- 初始化小圆点颜色
  66. initcolor:'#eee',
  67. //- 初始化小圆点大小 应该比滑动时小圆点小,不然会漏出来
  68. initr:12,
  69. //- 滑动时内部小圆点大小
  70. inr:12,
  71. //- 滑动时外部大圆点大小
  72. outr:29,
  73. //- 是否跳转到解锁界面
  74. isinput: true,
  75. //- 解锁半径
  76. range:29
  77. }).init();
  78. }else{
  79. //- 个人中心设置手势密码手势密码
  80. new H5lock({
  81. //- 单位:px
  82. //- 圆圈个数
  83. chooseType: 3,
  84. //- 连接线宽度
  85. linwidth: 2,
  86. //- 成功的颜色
  87. successcolor: '#2B84FF',
  88. //- 成功的背景色
  89. successbgcolor:'rgba(43, 132, 255, 0.1)',
  90. //- 失败的颜色
  91. wariningcolor:'#FF574D',
  92. //- 失败的背景色
  93. wariningbgcolor:'rgba(255, 87, 77, 0.1)',
  94. //- 初始化小圆点颜色
  95. initcolor:'#eee',
  96. //- 初始化小圆点大小 应该比滑动时小圆点小,不然会漏出来
  97. initr:12,
  98. //- 滑动时内部小圆点大小
  99. inr:12,
  100. //- 滑动时外部大圆点大小
  101. outr:29,
  102. //- 是否跳转到解锁界面
  103. isinput: false,
  104. //- 解锁半径
  105. range:29
  106. }).init();
  107. }
  108. },
  109. methods: {
  110. goindex(){
  111. PublicLib.Goto({Url:'index'});
  112. },
  113. goinput(){
  114. PublicLib.Goto({Url:'gesture-inputpassword'});
  115. },
  116. comeback(){
  117. PublicLib.Goto({Url:'user-setting'});
  118. PublicLib.putCookieInfo('issetting', '');
  119. },
  120. },
  121. });
  122. </script>
  123. </body>
  124. </html>