user-Withdrawal.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. <!DOCTYPE html>
  2. <html class="h100p">
  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. <style>
  17. .aic{
  18. padding-top:.326667rem;
  19. }
  20. .pop-forgetpwd{
  21. top: .406667rem !important;
  22. }
  23. </style>
  24. </head>
  25. <body class="nopb login pt0" style="padding-top:0;">
  26. <div class="rel bankwithdrawal" id="app" v-cloak>
  27. <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">
  28. <template #left> <img src="./static/images/left.png" alt=""></template>
  29. </van-nav-bar>
  30. <div class="bankcard cfff pl16 pr16 pt16 pb16" :class="banktype(bankcardinfo.BankName).color">
  31. <div class="cardtop df">
  32. <div class="df banktype">
  33. <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">
  34. <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>
  35. </svg>
  36. <div class="svgbc mr16 df" v-else>
  37. <svg class="icon" aria-hidden="true">
  38. <use :href="banktype(bankcardinfo.BankName).icon"></use>
  39. </svg>
  40. </div>
  41. <div class="f12">{{bankcardinfo.BankName}}</div>
  42. </div>
  43. <div class="cardtype">借记卡</div>
  44. </div>
  45. <div class="cardnumber tc mt16 df pl16 pr16">
  46. <div class="num">{{splice(bankcardinfo.SettleBankCardNo,0,4)}}</div>
  47. <div class="num">{{splice(bankcardinfo.SettleBankCardNo,4,9)}}</div>
  48. <div class="num">{{splice(bankcardinfo.SettleBankCardNo,7,11)}}</div>
  49. <div class="num">{{splice(bankcardinfo.SettleBankCardNo,12,bankcardinfo.SettleBankCardNo.length)}}</div>
  50. </div>
  51. </div>
  52. <div class="balanceinfo pl16 pr16 df f14">
  53. <div class="balance">可提余额:{{balanceinfo.BalanceAmount}}元</div>
  54. <div class="more" @click="withdrawal">全部提现</div>
  55. </div>
  56. <van-field class="inputbalancecount pl16 f16" placeholder="请输入提现金额" type="number" v-model="withdrawalcount" @input="withdrawalinput"></van-field>
  57. <div class="btn pl16 pr16 mt16 bc333">
  58. <van-button color="#FFD500" block @click="surewithdrawal">确认提现</van-button>
  59. <div class="f14 c333 mt16 tc" v-if="jurisdiction"> <span class="more" @click="gorealauth">修改结算卡,</span><span class="more" @click="gorealauth" style="text-decoration:underline;">点击修改认证资料</span></div>
  60. </div>
  61. <div class="withdrawalrules pl16 pr16">
  62. <div class="title">提现规则:</div>
  63. <div class="content mt8 c999" v-html="rules.Contents"></div>
  64. </div>
  65. <van-popup class="pwdPop" v-model="pwdPop" position="bottom" closeable close-icon-position="top-left" :style="{ height: '60%' }">
  66. <div class="tc pt16 rel aic">
  67. <div class="f18 c333">输入密码</div>
  68. <div class="pop-forgetpwd abs f14 c666" @click.stop="forgetpaypwd">忘记密码</div>
  69. </div>
  70. <div class="pt8">
  71. <van-password-input class="mt8" :value="value" :info="pwdInfo" :error-info="errorInfo" :focused="showKeyboard" @focus="showKeyboard = true"></van-password-input>
  72. </div>
  73. <van-number-keyboard v-model="value" maxlength="6" :show="true">
  74. <template #extra-key>
  75. <van-icon @click="onKeyboardHide" name="shrink"></van-icon>
  76. </template>
  77. </van-number-keyboard>
  78. </van-popup>
  79. </div>
  80. <script src="./static/js/klm-vv.min.js"></script>
  81. <script src="./static/js/appfunc.min.js"></script>
  82. <script src="./static/js/klm-axios-config.js"></script>
  83. <script src="./static/js/publicfn.js"></script>
  84. <script src="./static/js/iconfont.js"></script>
  85. <script>
  86. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  87. // 可以通过下面的方式手动注册
  88. Vue.use(vant.Lazyload);
  89. // 在 #app 标签下渲染一个按钮组件
  90. let app = new Vue({
  91. el: '#app',
  92. data() {
  93. return {
  94. //- dialogisshow:false,
  95. toptitleisshow:false,
  96. bankcardinfo:{
  97. SettleBankCardNo:'',
  98. BankName:'',
  99. },
  100. balanceinfo:{},
  101. rules:{
  102. Title:'',
  103. Contents:'',
  104. },
  105. withdrawalcount:'',
  106. pwdPop:false,
  107. value:'',
  108. pwdInfo: '密码为 6 位数字',
  109. showKeyboard: true,
  110. errorInfo:'',
  111. isauth:'',
  112. jurisdiction:false,
  113. warehouseuserlist:[
  114. //- 22263,
  115. 12054,
  116. 47901,
  117. 527,
  118. 10677,
  119. 16184,
  120. 17199,
  121. //- 58347,
  122. 11628,
  123. 12057,
  124. 25276,
  125. 30869,
  126. //- 38254,
  127. 3211,
  128. 94764,
  129. 596,
  130. 15714,
  131. 15511,
  132. 10445,
  133. 4216,
  134. 121085,
  135. ],
  136. arrearslist:[
  137. 510,595,
  138. ],
  139. jurisdictionlist:[
  140. 14,
  141. 129585,
  142. 128464,
  143. 416,
  144. 514,
  145. 13810,
  146. 24033,
  147. 24528,
  148. 26022,
  149. 41440,
  150. 47109,
  151. 47843,
  152. 58457,
  153. 58790,
  154. 70525,
  155. 72099,
  156. 72861,
  157. 75927,
  158. 82758,
  159. 92366,
  160. 99082,
  161. 107627,
  162. 121415,
  163. 121749,
  164. 122008,
  165. 122885,
  166. 123006,
  167. 123016,
  168. 123095,
  169. 123537,
  170. 123625,
  171. 123864,
  172. 124036,
  173. 124336,
  174. 124403,
  175. 124408,
  176. 124622,
  177. 125271,
  178. 125468,
  179. 125474,
  180. 125939,
  181. 127781,
  182. 128084,
  183. 128422,
  184. 128509,
  185. 128565,
  186. 128720,
  187. 128769,
  188. 129807,
  189. 130307,
  190. 131038,
  191. 132133,
  192. 132247,
  193. 132251,
  194. 132350,
  195. 132395,
  196. 132482,
  197. 132500,
  198. 133188,
  199. 133213,
  200. 135065,
  201. 135090,
  202. 135123,
  203. 397,
  204. 2433,
  205. 4507,
  206. 62340,
  207. 66873,
  208. 78805,
  209. 97351,
  210. 97536,
  211. 120666,
  212. 120907,
  213. 121282,
  214. 122468,
  215. 122526,
  216. 124997,
  217. 125377,
  218. 125986,
  219. 126722,
  220. 126876,
  221. 126889,
  222. 127026,
  223. 127544,
  224. 127976,
  225. 129358,
  226. 129545,
  227. 129643,
  228. 130202,
  229. 130629,
  230. 132416,
  231. 132642,
  232. 132726,
  233. 132908,
  234. 133428,
  235. 135539,
  236. 135723,
  237. 135835,
  238. 135970
  239. ],
  240. };
  241. },
  242. created() {
  243. //- const name = JSON.parse(PublicLib.getCookieInfo('userInfo')).RealName;
  244. //- this.issp = name.split('').some(item=>{
  245. //- return item === '*';
  246. //- });
  247. this.toptitleisshow = toptitleisshow;
  248. this.getrules();
  249. this.getbankcardinfo();
  250. this.getbalance();
  251. this.getCashauthFailInfo();
  252. this.jurisdictionlist.forEach(item=>{
  253. if(PublicLib.getCookieInfo('userId') === String(item)){
  254. this.jurisdiction = true;
  255. };
  256. })
  257. },
  258. watch: {
  259. //- 监控密码输入是否正确
  260. async value(value) {
  261. if(value.length === 6){
  262. //- 验证原支付密码
  263. const Id = PublicLib.getCookieInfo('userId');
  264. const res = await getRequest('api/v1/users/checkpaypwd?t='+Math.random(6),JSON.stringify({Id,PayPwd:this.value}));
  265. if(res.status === '1'){
  266. this.pwdInfo = '密码正确';
  267. const that = this;
  268. this.putwithdrawal();
  269. this.pwdPop = false;
  270. this.withdrawalcount = '';
  271. setTimeout(function(){
  272. that.value = '';
  273. },800);
  274. }else{
  275. this.errorInfo = '密码错误';
  276. const that = this;
  277. setTimeout(function(){
  278. that.value = '';
  279. },800);
  280. };
  281. } else if(value.length === 0){
  282. this.errorInfo = '';
  283. this.pwdInfo = '密码为 6 位数字';
  284. } else{
  285. this.errorInfo = '';
  286. this.pwdInfo = '再输入' + (6 - value.length) + '位密码';
  287. };
  288. },
  289. },
  290. methods: {
  291. gorealauth(){
  292. this.dialogisshow = true;
  293. PublicLib.Goto({Url:'user-withdrawal-authentication'});
  294. },
  295. //- 实时监控金额输入框
  296. withdrawalinput(){
  297. if(Number(this.withdrawalcount) > Number(this.balanceinfo.BalanceAmount)){
  298. this.withdrawalcount = this.balanceinfo.BalanceAmount;
  299. this.withdrawalcount = Number(this.withdrawalcount).toFixed(2);
  300. };
  301. },
  302. //- 忘记支付密码
  303. forgetpaypwd(){
  304. PublicLib.putCookieInfo("settingto",'forgetpaypwd');
  305. PublicLib.Goto({Url:'user-verification'});
  306. },
  307. surewithdrawal:undebounce(async function(){
  308. const Id = PublicLib.getCookieInfo('userId');
  309. const warehouse = this.warehouseuserlist.some(item=>{
  310. return Number(item) === Number(Id);
  311. });
  312. const arrears = this.arrearslist.some(item=>{
  313. return Number(item) === Number(Id);
  314. });
  315. if(warehouse){return tips('该账号已被冻结,请及时退货退仓,方可解除账户冻结')};
  316. if(arrears){return tips('该账号已被冻结,请及时还清借款,方可解除账户冻结')};
  317. //- 确认提现按钮
  318. const res = await getRequest('api/v1/users/existpaypwd?t='+Math.random(6),JSON.stringify({Id}));
  319. if(res.status !== '1') return PublicLib.Goto({Url:'user-setpaypwd-1'});
  320. if(this.withdrawalcount === '') return tips('请输入提现金额');
  321. if(Number(this.withdrawalcount) < 100) return tips('提现最低金额100.00元');
  322. this.pwdPop = true;
  323. }),
  324. //- 关闭密码输入框
  325. onKeyboardHide(){
  326. this.pwdPop = false;
  327. },
  328. //- 返回个人中心
  329. goback(){
  330. PublicLib.GoBack({Level:1});
  331. },
  332. //- 跳转提现记录
  333. withdrawallist(){
  334. PublicLib.Goto({Url:'user-withdrawal-list'});
  335. },
  336. //- 截取银行卡函数
  337. splice(num,begin,end){
  338. return num.substring(begin,end);
  339. },
  340. //- 全部提现
  341. withdrawal(){
  342. this.withdrawalcount = this.balanceinfo.BalanceAmount;
  343. },
  344. //- 获取规则
  345. async getrules(){
  346. const res = await getRequest('api/v1/pageinfo/detail?t='+Math.random(6),JSON.stringify({Id:7}));
  347. if(res.status !== '1') return tips('提现规则获取失败!');
  348. this.rules = res.data;
  349. },
  350. gtouchstart(){
  351. const that = this;
  352. this.timeOutEvent = setTimeout(()=>{
  353. that.longPress()
  354. },500);
  355. },
  356. gtouchend(){
  357. clearTimeout(this.timeOutEvent);
  358. },
  359. gtouchmove(){
  360. clearTimeout(this.timeOutEvent);
  361. this.timeOutEvent = 0;
  362. },
  363. longPress(){
  364. this.timeOutEvent = 0;
  365. PublicLib.SaveToSd({PicPath:'https://bs.kexiaoshuang.com/static/qrcode.jpg'});
  366. // 下载分享图片
  367. },
  368. //获取认证状态及失败原因
  369. async getCashauthFailInfo(){
  370. const Id = PublicLib.getCookieInfo('userId');
  371. const res = await getRequest('api/v1/users/cashauthfailinfo?t='+Math.random(6),JSON.stringify({Id}))
  372. this.isauth = res.status
  373. },
  374. //- 获取银行卡信息
  375. async getbankcardinfo(){
  376. const Id = PublicLib.getCookieInfo('userId');
  377. const res = await getRequest('api/v1/users/bindbankinfo?t='+Math.random(6),JSON.stringify({Id}));
  378. if(res.status !== '1') return tips('结算卡信息获取失败!');
  379. this.bankcardinfo = res.data;
  380. this.bankcardinfo.SettleBankCardNo = hidemiddlenum(this.bankcardinfo.SettleBankCardNo,0,5);
  381. //- this.bankcardinfo.BankName = '中国建设银行';
  382. },
  383. //- 获取账户余额信息
  384. async getbalance(){
  385. //- PublicLib.ShowLoading({Message:''});
  386. const UserId = PublicLib.getCookieInfo('userId');
  387. const res = await getRequest('api/v1/useraccount/myaccount?t='+Math.random(6),JSON.stringify({UserId}));
  388. if(res.status !== '1') return tips('余额信息获取失败!');
  389. //- PublicLib.HideLoading();
  390. this.balanceinfo = res.data;
  391. this.balanceinfo.BalanceAmount = res.data.BalanceAmount.toFixed(2);
  392. },
  393. //- 提交提现申请
  394. async putwithdrawal(){
  395. const that = this;
  396. const UserId = PublicLib.getCookieInfo('userId');
  397. const res = await postRequest('api/v1/usercashrecord/postwithdraw?t='+Math.random(6),JSON.stringify({UserId,TradeAmount:Number(this.withdrawalcount)}));
  398. if(res.status !== '1')return tips(res.info);
  399. tips('提现发起成功,请关注提现审核结果!');
  400. setTimeout(function(){
  401. that.getbalance();
  402. },800);
  403. },
  404. //- 动态匹配银行
  405. banktype(bankname){
  406. switch(bankname){
  407. case '建设银行':
  408. return {color:'CCB',icon:'#icon-jiansheyinhang'};
  409. case '工商银行':
  410. return {color:'ICBC',icon:'#icon-zhongguogongshangyinhang'};
  411. case '汇丰银行':
  412. return {color:'HSBC',icon:'#icon-huifengyinhang'};
  413. case '中国银行':
  414. return {color:'BOC',icon:'#icon-zhongxinyinhang'};
  415. case '农业银行':
  416. return {color:'ABC',icon:'#icon-zhongguonongyeyinhang'};
  417. case '交通银行':
  418. return {color:'BC',icon:'#icon-jiaotongyinhang'};
  419. case '招商银行':
  420. return {color:'CMERB',icon:'#icon-zhaoshangyinhang'};
  421. case '中国民生银行':
  422. return {color:'CMINB',icon:'#icon-zhongguominshengyinhang'};
  423. case '中信银行':
  424. return {color:'CITIC',icon:'#icon-zhongxinyinhang'};
  425. case '华夏银行':
  426. return {color:'HB',icon:'#icon-huaxiayinhang'};
  427. case '兴业银行':
  428. return {color:'CIB',icon:'#icon-xingyeyinhang'};
  429. case '广东发展银行':
  430. return {color:'GDB',icon:'#icon-guangfayinhang'};
  431. case '平安银行':
  432. return {color:'PABC',icon:'#icon-pinganyinhang'};
  433. case '邮政银行':
  434. return {color:'PSBC',icon:'#icon-youzhengyinhang'};
  435. case '光大银行':
  436. return {color:'GDBC',icon:'#icon-guangdayinhang'};
  437. case '贵阳银行':
  438. return {color:'GYBC',icon:'#icon-guiyangyinhangguiyangshishangyeyinhang'};
  439. case '恒生银行':
  440. return {color:'HSBC',icon:'#icon-hengshengyinhanglogo'};
  441. case '浦发银行':
  442. return {color:'PFBC',icon:'#icon-yinhanglogo-1'};
  443. case '重庆银行':
  444. return {color:'PFBC',icon:'#icon-yinhanglogo-'};
  445. default:
  446. return {color:'DEFAULT',icon:''};
  447. };
  448. }
  449. }
  450. });
  451. </script>
  452. </body>
  453. </html>