user-setting.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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="bgc-back">
  18. <div id="app" v-cloak>
  19. <van-nav-bar class="user_rank_explan_title user_title_normal" left-arrow title="设置" v-if="toptitleisshow" @click-left="goback">
  20. <template #left> <img src="./static/images/left.png" alt=""></template>
  21. </van-nav-bar>
  22. <van-cell-group class="bt8f7f7f7" :border="false" v-cloak>
  23. <van-cell title="修改登录手机号" value="" is-link @click="verfifcationbtn('changephone')"></van-cell>
  24. <van-cell title="修改登录密码" value="" is-link @click="changepwd"></van-cell>
  25. <van-cell title="手势密码" value="" is-link>
  26. <template #right-icon>
  27. <van-switch v-model="checked" size="24" @click="gesture"></van-switch>
  28. </template>
  29. </van-cell>
  30. </van-cell-group>
  31. <van-cell-group class="bt8f7f7f7" :border="false" v-cloak>
  32. <van-cell title="清理缓存" value="" is-link @click="cleardataisshow = true"></van-cell>
  33. <van-cell title="关于创业帮" value="" is-link @click="about"></van-cell>
  34. </van-cell-group>
  35. <div class="bt8f7f7f7">
  36. <van-button class="nb" color="#ff502a" plain block @click="dialogisshow = true">安全退出</van-button>
  37. </div>
  38. <van-dialog style="border-radius:4px;" v-model="dialogisshow" title="确定退出登录。" show-cancel-button @confirm="gologin" @cancel="dialogisshow = false"> </van-dialog>
  39. <van-dialog style="border-radius:4px;" v-model="cleardataisshow" title="清理缓存" width="70%" message="是否清理缓存,清理缓存之后将重新登录" show-cancel-button @confirm="cleardata" @cancel="cleardataisshow = false"> </van-dialog>
  40. <van-dialog style="border-radius:4px;" v-model="closegestureisshow" title="关闭手势密码" width="70%" message="是否关闭手势密码" show-cancel-button @confirm="closegesture" @cancel="unclosegesture"> </van-dialog>
  41. </div>
  42. <script src="./static/js/klm-vv.min.js"></script>
  43. <script src="./static/js/klm-axios-config.js"></script>
  44. <script>
  45. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  46. // 可以通过下面的方式手动注册
  47. Vue.use(vant.Lazyload);
  48. // 在 #app 标签下渲染一个按钮组件
  49. let app = new Vue({
  50. el: '#app',
  51. data() {
  52. return {
  53. toptitleisshow:false,
  54. active: 0,
  55. curversion: '1.1.3',
  56. version: '1.1.4',
  57. hasNew: false,
  58. checked: '',
  59. closegestureisshow:false,
  60. dialogisshow:false,
  61. cleardataisshow:false,
  62. };
  63. },
  64. created() {
  65. this.toptitleisshow = toptitleisshow;
  66. if(PublicLib.getCookieInfo('step') === '2') {
  67. this.checked = true;
  68. }
  69. },
  70. methods: {
  71. clearDot(str) {
  72. str = str.replace(/\./g, "");
  73. return str;
  74. },
  75. //- //- 确认退出
  76. gologin(){
  77. const id = PublicLib.getCookieInfo('userId');
  78. postRequest('/api/v1/users/logout',JSON.stringify({UserId:id}));
  79. PublicLib.Goto({Url:'user-login'});
  80. PublicLib.putCookieInfo('userId', '');
  81. },
  82. //- 清理缓存并确认退出
  83. loginout(){
  84. const id = PublicLib.getCookieInfo('userId');
  85. postRequest('/api/v1/users/logout',JSON.stringify({UserId:id}));
  86. PublicLib.Goto({Url:'user-login'});
  87. PublicLib.putCookieInfo('passwordxx', '');
  88. PublicLib.putCookieInfo('chooseType', '');
  89. PublicLib.putCookieInfo('step', '');
  90. PublicLib.putCookieInfo('userId', '');
  91. },
  92. //- 手势密码
  93. gesture(){
  94. if(this.checked){
  95. this.closegestureisshow = true;
  96. }else{
  97. PublicLib.putCookieInfo('issetting', 1);
  98. PublicLib.Goto({Url:'gesture-setpassword'});
  99. }
  100. },
  101. //- 关闭手势密码
  102. closegesture(){
  103. PublicLib.putCookieInfo('passwordxx', '');
  104. PublicLib.putCookieInfo('chooseType', '');
  105. PublicLib.putCookieInfo('step', '');
  106. },
  107. //- 取消关闭手势密码
  108. unclosegesture(){
  109. this.closegestureisshow = false;
  110. this.checked = true;
  111. },
  112. goback(){
  113. PublicLib.GoBack({Level:1});
  114. },
  115. //- 修改登录密码
  116. changepwd(){
  117. PublicLib.Goto({Url:'user-changepwd'});
  118. },
  119. //- 清理缓存
  120. cleardata(){
  121. PublicLib.ClearAppCache();
  122. },
  123. //- 关于
  124. about(){
  125. PublicLib.Goto({Url:'user-about'});
  126. },
  127. verfifcationbtn(type){
  128. PublicLib.putCookieInfo("settingto",type);
  129. PublicLib.Goto({Url:'user-verification'});
  130. },
  131. }
  132. });
  133. </script>
  134. </body>
  135. </html>