123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>设置-创业帮</title>
- <meta name="keywords" content="设置-创业帮">
- <meta name="description" content="设置-创业帮">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="设置-创业帮">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/main.css">
- </head>
- <body class="bgc-back pt0 ovh" style="padding-top:0;">
- <div id="app" v-cloak>
- <van-nav-bar class="user_rank_explan_title user_title_normal" left-arrow title="设置" v-if="toptitleisshow" @click-left="goback">
- <template #left> <img src="./static/images/left.png" alt=""></template>
- </van-nav-bar>
- <van-cell-group class="bt8f7f7f7" :border="false" v-cloak>
- <van-cell title="实名认证" value="" is-link @click="realauthfn"></van-cell>
- <van-cell title="变更结算卡" value="" is-link @click="verfifcationbtn('changeCheckcard')"></van-cell>
- </van-cell-group>
- <van-cell-group class="bt8f7f7f7" :border="false" v-cloak>
- <van-cell title="设置支付密码" value="" is-link @click="setpaypwd" v-if="!ispaypassword"></van-cell>
- <van-cell title="修改支付密码" value="" is-link @click="changepaypwd" v-if="ispaypassword"></van-cell>
- <van-cell title="忘记支付密码" value="" is-link @click="verfifcationbtn('forgetpaypwd')" v-if="ispaypassword"></van-cell>
- </van-cell-group>
- <van-cell-group class="bt8f7f7f7" :border="false" v-cloak>
- <van-cell title="修改登录手机号" value="" is-link @click="verfifcationbtn('changephone')"></van-cell>
- <van-cell title="修改登录密码" value="" is-link @click="changepwd"></van-cell>
- <van-cell title="手势密码" value="" is-link>
- <template #right-icon>
- <van-switch v-model="checked" size="24" @click="gesture"></van-switch>
- </template>
- </van-cell>
- </van-cell-group>
- <van-cell-group class="bt8f7f7f7" :border="false" v-cloak>
- <van-cell title="清理缓存" value="" is-link @click="cleardataisshow = true"></van-cell>
- <van-cell title="关于创业帮" value="" is-link @click="about"></van-cell>
- <van-cell title="注销账号" value="" is-link @click="cancelaccount"></van-cell>
- </van-cell-group>
- <div class="bt8f7f7f7">
- <van-button class="nb" color="#ff502a" plain block @click="dialogisshow = true">安全退出</van-button>
- </div>
- <van-dialog style="border-radius:4px;" v-model="dialogisshow" title="确定退出登录?" confirm-button-color="#ff502a" show-cancel-button @confirm="gologin" @cancel="dialogisshow = false"> </van-dialog>
- <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>
- <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>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js"></script>
- <script>
- function OnStart(){
- app.passwordischeck();
- app.verificationrealauth();
- app.verificationpaypassword();
- };
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
-
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- toptitleisshow:false,
- active: 0,
- curversion: '',
- version: '',
- checked: false,
- closegestureisshow:false,
- dialogisshow:false,
- cleardataisshow:false,
- realauth:false,
- ispaypassword:true,
- };
- },
- created() {
- this.toptitleisshow = toptitleisshow;
- this.passwordischeck();
- this.verificationrealauth();
- this.verificationpaypassword();
- },
- methods: {
- setpaypwd(){
- if(this.realauth){
- PublicLib.ShowDialog({
- Title:'暂未实名认证',
- Message:'是否去实名认证?',
- ConfirmText:'去实名',
- CancelText:'暂不实名',
- ConfirmAction:'app.goAuth()',
- CanelAction:''
- });
- return;
- }
- PublicLib.Goto({Url:'user-setpaypwd-1'})
- },
- passwordischeck(){
- if(PublicLib.getCookieInfo('step') === '2') {
- this.checked = true;
- }else{
- this.checked = false;
- }
- },
- clearDot(str) {
- str = str.replace(/\./g, "");
- return str;
- },
- //- //- 确认退出
- gologin(){
- PublicLib.putCookieInfo('isloginout','loginout');
- const id = PublicLib.getCookieInfo('userId');
- postRequest('api/v1/users/logout',JSON.stringify({UserId:id}));
- PublicLib.putCookieInfo('passwordxx', '');
- PublicLib.putCookieInfo('chooseType', '');
- PublicLib.putCookieInfo('step', 'close');
- PublicLib.putCookieInfo('userId', '');
- PublicLib.putCookieInfo('isloginout','');
- if(PublicLib.getCookieInfo('isfirstlogin') === 'true'){
- PublicLib.putCookieInfo('isfirstlogin', '');
- PublicLib.Goto({Url:'user-login'});
- }else{
- PublicLib.GoBack({Level:-1});
- };
- },
- async verificationrealauth(){
- const Id = PublicLib.getCookieInfo('userId');
- const userinfo = await getRequest('api/v1/users/personalinfo?t='+Math.random(6),JSON.stringify({Id}));
- //- 是否实名认证完毕
- if(userinfo.data.AuthFlag !== 1) {
- this.realauth = true;
- }else{
- this.realauth = false;
- };
- },
- async verificationpaypassword(){
- const Id = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/users/existpaypwd?t='+Math.random(6),JSON.stringify({Id}));
- //- 是否设置支付密码
- if(res.status !== '1') {
- this.ispaypassword = false;
- }else{
- this.ispaypassword = true;
- };
- },
- //- 实名认证
- realauthfn(){
- PublicLib.Goto({Url:'user-realauth-finish'});
- },
- verfifcationbtn(type){
- if((this.realauth && type === 'changeCheckcard') || (this.realauth && type === 'forgetpaypwd')){
- PublicLib.ShowDialog({
- Title:'暂未实名认证',
- Message:'是否去实名认证?',
- ConfirmText:'去实名',
- CancelText:'暂不实名',
- ConfirmAction:'app.goAuth()',
- CanelAction:''
- });
- return;
- }
- PublicLib.putCookieInfo("settingto",type);
- PublicLib.Goto({Url:'user-verification'});
- },
- goAuth(){
- PublicLib.Goto({Url:'user-realauth'});
- },
- //- 手势密码
- gesture(){
- if(this.checked){
- this.closegestureisshow = true;
- }else{
- PublicLib.putCookieInfo('issetting', 1);
- PublicLib.Goto({Url:'gesture-setpassword'});
- }
- },
- //- 关闭手势密码
- closegesture(){
- PublicLib.putCookieInfo('passwordxx', '');
- PublicLib.putCookieInfo('chooseType', '');
- PublicLib.putCookieInfo('step', 'close');
- },
- //- 取消关闭手势密码
- unclosegesture(){
- this.closegestureisshow = false;
- this.checked = true;
- },
- goback(){
- PublicLib.GoBack({Level:1});
- },
- //- 修改支付密码
- changepaypwd(){
- if(this.realauth){
- PublicLib.ShowDialog({
- Title:'暂未实名认证',
- Message:'是否去实名认证?',
- ConfirmText:'去实名',
- CancelText:'暂不实名',
- ConfirmAction:'app.goAuth()',
- CanelAction:''
- });
- return;
- }
- PublicLib.Goto({Url:'user-changepaypwd-1'});
- },
- //- 修改登录密码
- changepwd(){
- PublicLib.Goto({Url:'user-changepwd'});
- },
- //- 清理缓存
- cleardata(){
- this.gologin();
- PublicLib.ClearAppCache();
- },
- //- 关于
- about(){
- PublicLib.Goto({Url:'user-about'});
- },
- //- 注销账号
- cancelaccount(){
- PublicLib.Goto({Url:'user-cancellation'});
- },
- }
- });
- </script>
- </body>
- </html>
|