user-setting1.html 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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 pt0 ovh" style="padding-top:0;">
  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="确定退出登录?" confirm-button-color="#ff502a" show-cancel-button @confirm="gologin" @cancel="dialogisshow = false"> </van-dialog>
  39. <van-dialog style="border-radius:4px;" v-model="cleardataisshow" title="清理缓存" confirm-button-color="#ff502a" width="70%" message="是否清理缓存?清理缓存之后将重新登录" show-cancel-button @confirm="cleardata" @cancel="cleardataisshow = false"> </van-dialog>
  40. <van-dialog style="border-radius:4px;" v-model="closegestureisshow" title="关闭手势密码" confirm-button-color="#ff502a" 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/appfunc.min.js"></script>
  44. <script src="./static/js/klm-axios-config.js"></script>
  45. <script src="./static/js/publicfn.js"></script>
  46. <script>
  47. function OnStart(){
  48. app.passwordischeck();
  49. app.verificationrealauth();
  50. app.verificationpaypassword();
  51. };
  52. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  53. // 可以通过下面的方式手动注册
  54. Vue.use(vant.Lazyload);
  55. // 在 #app 标签下渲染一个按钮组件
  56. let app = new Vue({
  57. el: '#app',
  58. data() {
  59. return {
  60. toptitleisshow:false,
  61. active: 0,
  62. curversion: '',
  63. version: '',
  64. checked: false,
  65. closegestureisshow:false,
  66. dialogisshow:false,
  67. cleardataisshow:false,
  68. realauth:false,
  69. ispaypassword:true,
  70. };
  71. },
  72. created() {
  73. this.toptitleisshow = toptitleisshow;
  74. this.passwordischeck();
  75. this.verificationrealauth();
  76. this.verificationpaypassword();
  77. },
  78. methods: {
  79. setpaypwd(){
  80. if(this.realauth){
  81. PublicLib.ShowDialog({
  82. Title:'暂未实名认证',
  83. Message:'是否去实名认证?',
  84. ConfirmText:'去实名',
  85. CancelText:'暂不实名',
  86. ConfirmAction:'app.goAuth()',
  87. CanelAction:''
  88. });
  89. return;
  90. }
  91. PublicLib.Goto({Url:'user-setpaypwd-1'})
  92. },
  93. passwordischeck(){
  94. if(PublicLib.getCookieInfo('step') === '2') {
  95. this.checked = true;
  96. }else{
  97. this.checked = false;
  98. }
  99. },
  100. clearDot(str) {
  101. str = str.replace(/\./g, "");
  102. return str;
  103. },
  104. //- //- 确认退出
  105. gologin(){
  106. PublicLib.putCookieInfo('isloginout','loginout');
  107. const id = PublicLib.getCookieInfo('userId');
  108. postRequest('api/v1/users/logout',JSON.stringify({UserId:id}));
  109. PublicLib.putCookieInfo('passwordxx', '');
  110. PublicLib.putCookieInfo('chooseType', '');
  111. PublicLib.putCookieInfo('step', 'close');
  112. PublicLib.putCookieInfo('isloginout','');
  113. PublicLib.Goto({Url:'user-login'});
  114. },
  115. async verificationrealauth(){
  116. const Id = PublicLib.getCookieInfo('userId');
  117. const userinfo = await getRequest('api/v1/users/personalinfo',JSON.stringify({Id}));
  118. //- 是否实名认证完毕
  119. if(userinfo.data.AuthFlag !== 1) {
  120. this.realauth = true;
  121. }else{
  122. this.realauth = false;
  123. };
  124. },
  125. async verificationpaypassword(){
  126. const Id = PublicLib.getCookieInfo('userId');
  127. const res = await getRequest('api/v1/users/existpaypwd',JSON.stringify({Id}));
  128. //- 是否设置支付密码
  129. if(res.status !== '1') {
  130. this.ispaypassword = false;
  131. }else{
  132. this.ispaypassword = true;
  133. };
  134. },
  135. //- 清理缓存并确认退出
  136. loginout(){
  137. PublicLib.ClearAppCache();
  138. const id = PublicLib.getCookieInfo('userId');
  139. postRequest('api/v1/users/logout',JSON.stringify({UserId:id}));
  140. PublicLib.putCookieInfo('passwordxx', '');
  141. PublicLib.putCookieInfo('chooseType', '');
  142. PublicLib.putCookieInfo('step', 'close');
  143. PublicLib.putCookieInfo('isloginout','');
  144. //- PublicLib.GoBack({Level:-1});
  145. PublicLib.Goto({Url:'user-login'});
  146. },
  147. //- 实名认证
  148. realauthfn(){
  149. PublicLib.Goto({Url:'user-realauth-finish'});
  150. },
  151. verfifcationbtn(type){
  152. if((this.realauth && type === 'changeCheckcard') || (this.realauth && type === 'forgetpaypwd')){
  153. PublicLib.ShowDialog({
  154. Title:'暂未实名认证',
  155. Message:'是否去实名认证?',
  156. ConfirmText:'去实名',
  157. CancelText:'暂不实名',
  158. ConfirmAction:'app.goAuth()',
  159. CanelAction:''
  160. });
  161. return;
  162. }
  163. PublicLib.putCookieInfo("settingto",type);
  164. PublicLib.Goto({Url:'user-verification'});
  165. },
  166. goAuth(){
  167. PublicLib.Goto({Url:'user-realauth'});
  168. },
  169. //- 手势密码
  170. gesture(){
  171. if(this.checked){
  172. this.closegestureisshow = true;
  173. }else{
  174. PublicLib.putCookieInfo('issetting', 1);
  175. PublicLib.Goto({Url:'gesture-setpassword'});
  176. }
  177. },
  178. //- 关闭手势密码
  179. closegesture(){
  180. PublicLib.putCookieInfo('passwordxx', '');
  181. PublicLib.putCookieInfo('chooseType', '');
  182. PublicLib.putCookieInfo('step', 'close');
  183. },
  184. //- 取消关闭手势密码
  185. unclosegesture(){
  186. this.closegestureisshow = false;
  187. this.checked = true;
  188. },
  189. goback(){
  190. PublicLib.GoBack({Level:1});
  191. },
  192. //- 修改支付密码
  193. changepaypwd(){
  194. if(this.realauth){
  195. PublicLib.ShowDialog({
  196. Title:'暂未实名认证',
  197. Message:'是否去实名认证?',
  198. ConfirmText:'去实名',
  199. CancelText:'暂不实名',
  200. ConfirmAction:'app.goAuth()',
  201. CanelAction:''
  202. });
  203. return;
  204. }
  205. PublicLib.Goto({Url:'user-changepaypwd-1'});
  206. },
  207. //- 修改登录密码
  208. changepwd(){
  209. PublicLib.Goto({Url:'user-changepwd'});
  210. },
  211. //- 清理缓存
  212. cleardata(){
  213. PublicLib.ClearAppCache();
  214. this.loginout();
  215. },
  216. //- 关于
  217. about(){
  218. PublicLib.Goto({Url:'user-about1'});
  219. },
  220. //- 注销账号
  221. cancelaccount(){
  222. PublicLib.Goto({Url:'user-cancellation'});
  223. },
  224. }
  225. });
  226. </script>
  227. </body>
  228. </html>