user-withdrawal-authentication.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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/crop.css">
  16. <link rel="stylesheet" href="./static/css/main.css">
  17. </head>
  18. <body class="nopb pt0" style="padding-top:0;">
  19. <div id="app" v-cloak>
  20. <van-nav-bar class="user_rank_explan_title user_title_normal" left-arrow @click-left="goback" v-if="toptitleisshow" title="提现认证">
  21. <template #left> <img src="./static/images/left.png" alt=""></template>
  22. </van-nav-bar>
  23. <div class="pt16 pb16 pl16 pr16 bb8f7f7f7">
  24. <van-row class="pt8 pb8">
  25. <van-col offset="1" span="11" @click="takephoto(0)"><img :src="showphoto[0]" alt="" width="100%">
  26. <div class="f14 c999 tc">身份证正面照片</div>
  27. </van-col>
  28. <van-col offset="1" span="11" @click="takephoto(1)"><img :src="showphoto[1]" alt="" width="100%">
  29. <div class="f14 c999 tc">身份证背面照片</div>
  30. </van-col>
  31. </van-row>
  32. </div>
  33. <div class="mb20 bb8f7f7f7">
  34. <van-field v-model="username" @input="checkValue" label="姓名" readonly></van-field>
  35. <van-field v-model="IdCard" @input="checkValue" label="身份证号" readonly></van-field>
  36. <van-field v-model="real.SettleBankCardNo" @input="checkValue" label="结算银行卡" placeholder="请输入您的结算银行卡号"></van-field>
  37. <van-field v-model="real.BankMobile" @input="checkValue" label="预留手机号" placeholder="请输入结算银行卡预留手机号"></van-field>
  38. <van-field class="mb12" v-model="real.SettleBankName" placeholder="请选择" readonly @click="typeisshow" label="结算银行名称" right-icon="arrow-down"></van-field>
  39. </div>
  40. <div class="pt16 bc333" v-cloak>
  41. <van-button type="primary" block color="#FFD500" :disabled="canRegist ? false : true" @click="uploadheadhpotofn">确认提交</van-button>
  42. </div>
  43. <van-dialog v-model="showSuccess" theme="round-button" @close="closefinish" confirm-button-text="知道了">
  44. <div class="pt16 pl16 pr16 tc"><img src="./static/images/success@3x.png" width="48">
  45. <div class="f14 c333">变更成功</div>
  46. <div class="pt16 pb16 f12 c999">欢迎加入创业帮团队</div>
  47. </div>
  48. </van-dialog>
  49. <van-dialog v-model="showFail" theme="round-button" confirm-button-text="返回修改" @close="closefinish">
  50. <div class="pt16 pl16 pr16 tc"><img src="./static/images/fail@3x.png" width="48">
  51. <div class="f14 c333">变更失败</div>
  52. <div class="pt16 pb16 f12 c999">信息有误,请核对信息确认无误后提交</div>
  53. </div>
  54. </van-dialog>
  55. <input type="file" accept="image/*" id="upload" style="display:none;">
  56. <van-popup v-model="choseType" position="bottom">
  57. <van-picker title="开户银行" show-toolbar :columns="typecolumns" @confirm="choseTypeonConfirm" @cancel="choseType = false"></van-picker>
  58. </van-popup>
  59. </div>
  60. <script src="./static/js/clipboard.min.js"></script>
  61. <script src="./static/js/klm-vv.min.js"></script>
  62. <script src="./static/js/appfunc.min.js"></script>
  63. <script src="./static/js/klm-axios-config.js"></script>
  64. <script src="./static/js/publicfn.js"></script>
  65. <script src="./static/js/exif.js"></script>
  66. <script src="./static/js/transformation-matrix.js"></script>
  67. <script src="./static/js/prefix-umd.js"></script>
  68. <script src="./static/js/index.js"></script>
  69. <script src="./static/js/arealist.js"></script>
  70. <script>
  71. //上回后回调方法,用于调用缩放、裁切、旋转功能
  72. function AppUpload(imgpath) {
  73. setTimeout(function () {
  74. PublicLib.WapCropForApp(600, 380, 'upload', imgpath, 1);
  75. }, 300);
  76. }
  77. //裁切结束后回调方法
  78. function ShowPhoto(url) {
  79. //获取最终的图片地址
  80. app.changebankimg(url);
  81. }
  82. if (isWeb) {
  83. PublicLib.WapCrop(600, 380, 'upload', 1);
  84. }
  85. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  86. // 可以通过下面的方式手动注册
  87. Vue.use(vant.Lazyload);
  88. PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
  89. // 在 #app 标签下渲染一个按钮组件
  90. let app = new Vue({
  91. el: '#app',
  92. data() {
  93. return {
  94. Bankdetailname:'',
  95. BankType:'',
  96. BankNameflag:false,
  97. BankNamelist:[],
  98. choseType:false,
  99. toptitleisshow:false,
  100. active: 0,
  101. showSuccess: false,
  102. showFail: false,
  103. username: '',
  104. real:{
  105. SettleBankCardNo: '',
  106. //- BankName:'',
  107. SettleBankName:'',
  108. //- BankCardPositiveImage:'',
  109. BankMobile:''
  110. },
  111. IdCard:'',
  112. bankCardFormatter:'',
  113. showphoto:['./static/images/realauth-1.png','./static/images/realauth-2.png'],
  114. canRegist: false,
  115. show: false,
  116. codeisclick:true,
  117. countdown:60,
  118. typecolumns:[],
  119. imgIndex:0,
  120. };
  121. },
  122. mounted() {
  123. this.toptitleisshow = toptitleisshow;
  124. //- this.giveToast();
  125. this.getCashauthFailInfo();
  126. this.getbankinfo();
  127. },
  128. watch:{
  129. ['real.SettleBankCardNo']:function(val){
  130. if(val){
  131. this.real.SettleBankCardNo = val.replace(/\D/g, '').replace(/....(?!$)/g, '$& ');
  132. }
  133. }
  134. },
  135. methods: {
  136. closefinish(){
  137. this.goback();
  138. },
  139. //- async BankNameflagfn(){
  140. //- this.BankNameflag = true;
  141. //- //- 发起请求
  142. //- res = await getRequest('api/v1/openbanktable/list?t='+Math.random(6),JSON.stringify({PageSize:50,PageNum:1,SearchKey:this.Bankdetailname}));
  143. //- if(res.status !== '1') return tips(user.info);
  144. //- //- console.log(res)
  145. //- let arr = [];
  146. //- res.data.forEach(item=>{
  147. //- arr.push(item.BankName);
  148. //- })
  149. //- this.BankNamelist = arr;
  150. //- },
  151. //- banknamefn(data){
  152. //- this.BankNameflag = false;
  153. //- //- this.real.BankName = data;
  154. //- this.checkValue()
  155. //- },
  156. //- 选择器选择
  157. choseTypeonConfirm(date){
  158. this.real.SettleBankName = date.value;
  159. this.choseType = false;
  160. this.checkValue()
  161. },
  162. async typeisshow(){
  163. this.choseType = true;
  164. res = await getRequest('api/v1/merchantaddinfo/options?t='+Math.random(6),JSON.stringify({PageSize:1000,PageNum:1,Kind:4}));
  165. if(res.status !== '1') return tips('账户类型请求错误,请关闭重试!');
  166. this.typecolumns = res.data;
  167. },
  168. //- giveToast(){
  169. //- //- vant.Toast('提示');
  170. //- // 警告通知
  171. //- vant.Notify({color: '#333', background: '#FFD500',duration: 3000, message: '请选择中/农/工/建/招等大型银行或者商业银行,有助于到账' });
  172. //- },
  173. takephoto(index){
  174. this.imgIndex = index
  175. PublicLib.UploadPhoto({
  176. Quality:1,
  177. PhotoCount:1,
  178. Width:300,
  179. Height:300,
  180. });
  181. },
  182. checkValue(){
  183. //- this.canRegist = (this.username !== '' && this.IdCard !== '' && this.real.MobileCode !== '' && this.real.BankName !== '' && this.real.SettleBankName !== '' && this.real.SettleBankCardNo !== '' && this.real.BankCardPositiveImage !== '') ? true : false;
  184. this.canRegist = (this.username !== '' && this.IdCard !== '' && this.real.BankName !== '' && this.real.SettleBankName !== '' && this.real.SettleBankCardNo !== '') ? true : false;
  185. console.log(this.canRegist)
  186. },
  187. goback(){
  188. PublicLib.GoBack({Level:1});
  189. },
  190. async getbankinfo(){
  191. const Id = PublicLib.getCookieInfo('userId');
  192. const res = await getRequest('api/v1/users/authinfo?t='+Math.random(6),JSON.stringify({Id}));
  193. if(res.status !== '1' ) return tips('获取结算卡信息失败,请重试!')
  194. this.username = res.data.RealName;
  195. this.IdCard = res.data.CertId;
  196. },
  197. //获取认证状态及失败原因
  198. async getCashauthFailInfo(){
  199. const Id = PublicLib.getCookieInfo('userId');
  200. const res = await getRequest('api/v1/users/cashauthfailinfo?t='+Math.random(6),JSON.stringify({Id}))
  201. console.log(res.info,1111)
  202. vant.Notify({color: '#333', background: '#FFD500',duration: 3000, message: '失败原因:' + res.info});
  203. },
  204. changebankimg(url){
  205. //- this.real.BankCardPositiveImage = url;
  206. if(this.imgIndex === 0){
  207. this.showphoto.splice(0,1,showHost + url)
  208. }
  209. if(this.imgIndex === 1){
  210. this.showphoto.splice(1,1,showHost + url)
  211. }
  212. this.checkValue();
  213. },
  214. //- 提现认证
  215. async uploadheadhpotofn(){
  216. if(verification(this.real.BankMobile)) return;
  217. if(!verificationbankcardId(this.real.SettleBankCardNo.replaceAll(' ',''))) return tips('银行卡格式错误!');
  218. const Id = PublicLib.getCookieInfo('userId');
  219. const params = {
  220. Id,
  221. CertFrontImage:this.showphoto[0],
  222. CertReverseImage :this.showphoto[1],
  223. //- BankName:this.real.BankName,
  224. SettleBankName:this.real.SettleBankName,
  225. SettleBankCardNo:this.real.SettleBankCardNo.replaceAll(' ',''),
  226. BankMobile:this.real.BankMobile,
  227. }
  228. const res = await postRequest('api/v1/users/cashauth?t='+Math.random(6),JSON.stringify({...params}));
  229. if(res.status !== '1') return this.showFail = true;
  230. this.showSuccess = true;
  231. }
  232. }
  233. });
  234. </script>
  235. </body>
  236. </html>