123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313 |
- <!DOCTYPE html>
- <html class="h100p">
- <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">
- <style>
- .aic{
- padding-top:.326667rem;
- }
- .pop-forgetpwd{
- top: .406667rem !important;
- }
- </style>
- </head>
- <body class="nopb login pt0" style="padding-top:0;">
- <div class="rel bankwithdrawal" id="app" v-cloak>
- <van-nav-bar class="mall_title user_title_normal user_rank_explan_title" left-arrow title="提现" v-if="toptitleisshow" right-text="提现记录" @click-left="goback" @click-right="withdrawallist">
- <template #left> <img src="./static/images/left.png" alt=""></template>
- </van-nav-bar>
- <div class="bankcard cfff pl16 pr16 pt16 pb16" :class="banktype(bankcardinfo.BankName).color">
- <div class="cardtop df">
- <div class="df banktype">
- <svg class="icon" v-if="banktype(bankcardinfo.BankName).icon === ''" t="1639551432401" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2083" width="200" height="200">
- <path d="M910.199521 304.727853L539.173184 142.199521c-0.408619-0.20431-0.919393-0.408619-1.328012-0.612929-2.553871-1.532322-13.484437-7.559457-25.334398-8.070231h-1.328013c-11.952115 0.612929-22.780527 6.537909-25.436552 8.070231-0.408619 0.20431-0.817239 0.510774-1.328013 0.612929L114.209098 304.727853c-6.537909 2.553871-10.419792 9.09178-10.419792 15.527534v19.613727c0 6.742219 5.414206 12.156425 12.156424 12.156425h40.044693c5.516361 0 10.317638 3.575419 11.747805 8.88747 5.005587 19.102953 26.253791 17.97925 29.6249 17.77494h628.252195c3.371109 0.306464 24.619314 1.430168 29.6249-17.77494 1.430168-5.312051 6.231445-8.88747 11.747806-8.88747h40.044692c6.742219 0 12.156425-5.414206 12.156425-12.156425v-18.592179c0-0.612929 0.102155-1.328013 0.20431-1.940941 0.715084-6.027135-3.064645-11.441341-9.193935-14.608141z m-26.66241 510.569833H140.769354c-28.501197 0-27.888268 27.888268-27.888269 27.888268v34.528332c0 6.742219 5.414206 12.156425 12.156425 12.156424h774.12929c6.742219 0 12.156425-5.414206 12.156424-12.156424v-34.528332c0.102155 0 0.817239-27.888268-27.786113-27.888268zM221.267358 419.447725v314.126098h-31.770151c-23.495611 0-26.764565 22.269753-27.173185 26.560255 0 0.408619-0.102155 0.817239-0.102154 1.123703v13.893057c0 6.742219 5.414206 12.156425 12.156424 12.156425h676.877893c6.742219 0 12.156425-5.414206 12.156425-12.156425v-13.893057c0-0.408619 0-0.817239-0.102155-1.123703-0.408619-4.290503-3.677574-26.560255-27.173184-26.560255h-31.770152V419.447725c0-6.742219-5.414206-12.156425-12.156425-12.156424h-78.046289c-6.742219 0-12.156425 5.414206-12.156424 12.156424v314.126098h-62.314445V419.447725c0-6.742219-5.414206-12.156425-12.156425-12.156424h-77.43336c-6.742219 0-12.156425 5.414206-12.156425 12.156424v314.739027h-50.56664V419.447725c0-6.742219-5.414206-12.156425-12.156424-12.156424h-77.43336c-6.742219 0-12.156425 5.414206-12.156425 12.156424v314.126098h-62.314445V419.447725c0-6.742219-5.414206-12.156425-12.156425-12.156424h-77.43336c-7.048683 0-12.462889 5.414206-12.462889 12.156424z m0-12.156424" p-id="2084"></path>
- </svg>
- <div class="svgbc mr16 df" v-else>
- <svg class="icon" aria-hidden="true">
- <use :href="banktype(bankcardinfo.BankName).icon"></use>
- </svg>
- </div>
- <div class="f12">{{bankcardinfo.BankName}}</div>
- </div>
- <div class="cardtype">借记卡</div>
- </div>
- <div class="cardnumber tc mt16 df pl16 pr16">
- <div class="num">{{splice(bankcardinfo.SettleBankCardNo,0,4)}}</div>
- <div class="num">{{splice(bankcardinfo.SettleBankCardNo,4,9)}}</div>
- <div class="num">{{splice(bankcardinfo.SettleBankCardNo,7,11)}}</div>
- <div class="num">{{splice(bankcardinfo.SettleBankCardNo,12,bankcardinfo.SettleBankCardNo.length)}}</div>
- </div>
- </div>
- <div class="balanceinfo pl16 pr16 df f14">
- <div class="balance">可提余额:{{balanceinfo.BalanceAmount}}元</div>
- <div class="more" @click="withdrawal">全部提现</div>
- </div>
- <van-field class="inputbalancecount pl16 f16" placeholder="请输入提现金额" type="number" v-model="withdrawalcount" @input="withdrawalinput"></van-field>
- <div class="btn pl16 pr16 mt16 bc333">
- <van-button color="#FFD500" block @click="surewithdrawal" :disabled="isauth !== '1'">确认提现</van-button>
- <div class="f14 c333 mt16 tc" v-if="isauth !== '1'"> <span class="more" @click="gorealauth">提现认证失败,</span><span class="more" @click="gorealauth" style="text-decoration:underline;">点击修改认证资料</span></div>
- </div>
- <div class="withdrawalrules pl16 pr16">
- <div class="title">提现规则:</div>
- <div class="content mt8 c999" v-html="rules.Contents"></div>
- </div>
- <van-popup class="pwdPop" v-model="pwdPop" position="bottom" closeable close-icon-position="top-left" :style="{ height: '60%' }">
- <div class="tc pt16 rel aic">
- <div class="f18 c333">输入密码</div>
- <div class="pop-forgetpwd abs f14 c666" @click.stop="forgetpaypwd">忘记密码</div>
- </div>
- <div class="pt8">
- <van-password-input class="mt8" :value="value" :info="pwdInfo" :error-info="errorInfo" :focused="showKeyboard" @focus="showKeyboard = true"></van-password-input>
- </div>
- <van-number-keyboard v-model="value" maxlength="6" :show="true">
- <template #extra-key>
- <van-icon @click="onKeyboardHide" name="shrink"></van-icon>
- </template>
- </van-number-keyboard>
- </van-popup>
- </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 src="./static/js/iconfont.js"></script>
- <script>
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
-
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- //- dialogisshow:false,
- toptitleisshow:false,
- bankcardinfo:{
- SettleBankCardNo:'',
- BankName:'',
- },
- balanceinfo:{},
- rules:{
- Title:'',
- Contents:'',
- },
- withdrawalcount:'',
- pwdPop:false,
- value:'',
- pwdInfo: '密码为 6 位数字',
- showKeyboard: true,
- errorInfo:'',
- isauth:'',
- };
- },
- created() {
- this.toptitleisshow = toptitleisshow;
- this.getrules();
- this.getbankcardinfo();
- this.getbalance();
- this.getCashauthFailInfo();
- //- if(PublicLib.getCookieInfo('withdrawRealAuth') === 'true'){
- //- this.isauth = false;
- //- };
- },
- watch: {
- //- 监控密码输入是否正确
- async value(value) {
- if(value.length === 6){
- //- 验证原支付密码
- const Id = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/users/checkpaypwd?t='+Math.random(6),JSON.stringify({Id,PayPwd:this.value}));
- if(res.status === '1'){
- this.pwdInfo = '密码正确';
- const that = this;
- this.putwithdrawal();
- this.pwdPop = false;
- this.withdrawalcount = '';
- setTimeout(function(){
- that.value = '';
- },800);
- }else{
- this.errorInfo = '密码错误';
- const that = this;
- setTimeout(function(){
- that.value = '';
- },800);
- };
- } else if(value.length === 0){
- this.errorInfo = '';
- this.pwdInfo = '密码为 6 位数字';
- } else{
- this.errorInfo = '';
- this.pwdInfo = '再输入' + (6 - value.length) + '位密码';
- };
- },
- },
- methods: {
- gorealauth(){
- this.dialogisshow = true;
- PublicLib.Goto({Url:'new-pag1'});
- },
- //- 实时监控金额输入框
- withdrawalinput(){
- if(Number(this.withdrawalcount) > Number(this.balanceinfo.BalanceAmount)){
- this.withdrawalcount = this.balanceinfo.BalanceAmount;
- this.withdrawalcount = Number(this.withdrawalcount).toFixed(2);
- };
- },
- //- 忘记支付密码
- forgetpaypwd(){
- PublicLib.putCookieInfo("settingto",'forgetpaypwd');
- PublicLib.Goto({Url:'user-verification'});
- },
- surewithdrawal:undebounce(async function(){
- //- 确认提现按钮
- const Id = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/users/existpaypwd?t='+Math.random(6),JSON.stringify({Id}));
- if(res.status !== '1') return PublicLib.Goto({Url:'user-setpaypwd-1'});
- if(this.withdrawalcount === '') return tips('请输入提现金额');
- if(Number(this.withdrawalcount) < 100) return tips('提现最低金额100.00元');
- this.pwdPop = true;
- }),
- //- 关闭密码输入框
- onKeyboardHide(){
- this.pwdPop = false;
- },
- //- 返回个人中心
- goback(){
- PublicLib.GoBack({Level:1});
- },
- //- 跳转提现记录
- withdrawallist(){
- PublicLib.Goto({Url:'user-withdrawal-list'});
- },
- //- 截取银行卡函数
- splice(num,begin,end){
- return num.substring(begin,end);
- },
- //- 全部提现
- withdrawal(){
- this.withdrawalcount = this.balanceinfo.BalanceAmount;
- },
- //- 获取规则
- async getrules(){
- const res = await getRequest('api/v1/pageinfo/detail?t='+Math.random(6),JSON.stringify({Id:7}));
- if(res.status !== '1') return tips('提现规则获取失败!');
- this.rules = res.data;
- },
- gtouchstart(){
- const that = this;
- this.timeOutEvent = setTimeout(()=>{
- that.longPress()
- },500);
- },
- gtouchend(){
- clearTimeout(this.timeOutEvent);
- },
- gtouchmove(){
- clearTimeout(this.timeOutEvent);
- this.timeOutEvent = 0;
- },
- longPress(){
- this.timeOutEvent = 0;
- PublicLib.SaveToSd({PicPath:'https://bs.kexiaoshuang.com/static/qrcode.jpg'});
- // 下载分享图片
- },
- //获取认证状态及失败原因
- async getCashauthFailInfo(){
- const Id = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/users/cashauthfailinfo?t='+Math.random(6),JSON.stringify({Id}))
- this.isauth = res.status
- },
- //- 获取银行卡信息
- async getbankcardinfo(){
- const Id = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/users/bindbankinfo?t='+Math.random(6),JSON.stringify({Id}));
- if(res.status !== '1') return tips('结算卡信息获取失败!');
- this.bankcardinfo = res.data;
- this.bankcardinfo.SettleBankCardNo = hidemiddlenum(this.bankcardinfo.SettleBankCardNo,0,5);
- //- this.bankcardinfo.BankName = '中国建设银行';
- },
- //- 获取账户余额信息
- async getbalance(){
- //- PublicLib.ShowLoading({Message:''});
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/useraccount/myaccount?t='+Math.random(6),JSON.stringify({UserId}));
- if(res.status !== '1') return tips('余额信息获取失败!');
- //- PublicLib.HideLoading();
- this.balanceinfo = res.data;
- this.balanceinfo.BalanceAmount = res.data.BalanceAmount.toFixed(2);
- },
- //- 提交提现申请
- async putwithdrawal(){
- const that = this;
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await postRequest('api/v1/usercashrecord/postwithdraw?t='+Math.random(6),JSON.stringify({UserId,TradeAmount:Number(this.withdrawalcount)}));
- if(res.status !== '1')return tips('提现发起失败,请稍后重试!');
- tips('提现发起成功,请关注提现审核结果!');
- setTimeout(function(){
- that.getbalance();
- },800);
-
- },
- //- 动态匹配银行
- banktype(bankname){
- switch(bankname){
- case '建设银行':
- return {color:'CCB',icon:'#icon-jiansheyinhang'};
- case '工商银行':
- return {color:'ICBC',icon:'#icon-zhongguogongshangyinhang'};
- case '汇丰银行':
- return {color:'HSBC',icon:'#icon-huifengyinhang'};
- case '中国银行':
- return {color:'BOC',icon:'#icon-zhongxinyinhang'};
- case '农业银行':
- return {color:'ABC',icon:'#icon-zhongguonongyeyinhang'};
- case '交通银行':
- return {color:'BC',icon:'#icon-jiaotongyinhang'};
- case '招商银行':
- return {color:'CMERB',icon:'#icon-zhaoshangyinhang'};
- case '中国民生银行':
- return {color:'CMINB',icon:'#icon-zhongguominshengyinhang'};
- case '中信银行':
- return {color:'CITIC',icon:'#icon-zhongxinyinhang'};
- case '华夏银行':
- return {color:'HB',icon:'#icon-huaxiayinhang'};
- case '兴业银行':
- return {color:'CIB',icon:'#icon-xingyeyinhang'};
- case '广东发展银行':
- return {color:'GDB',icon:'#icon-guangfayinhang'};
- case '平安银行':
- return {color:'PABC',icon:'#icon-pinganyinhang'};
- case '邮政银行':
- return {color:'PSBC',icon:'#icon-youzhengyinhang'};
- case '光大银行':
- return {color:'GDBC',icon:'#icon-guangdayinhang'};
- case '贵阳银行':
- return {color:'GYBC',icon:'#icon-guiyangyinhangguiyangshishangyeyinhang'};
- case '恒生银行':
- return {color:'HSBC',icon:'#icon-hengshengyinhanglogo'};
- case '浦发银行':
- return {color:'PFBC',icon:'#icon-yinhanglogo-1'};
- case '重庆银行':
- return {color:'PFBC',icon:'#icon-yinhanglogo-'};
- default:
- return {color:'DEFAULT',icon:''};
- };
- }
- }
- });
- </script>
- </body>
- </html>
|