pages-index-realName.365dbd95.js
12.0 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-realName"],{"0088":function(t,e,a){t.exports=a.p+"static/img/img_card_a.01f35abd.png"},"14ba":function(t,e,a){"use strict";a("d3b7"),Object.defineProperty(e,"__esModule",{value:!0}),e.request=e.baseURL=void 0;var n="http://yuanjie.n.broing.cn/api/";e.baseURL=n;var i=function(t){return new Promise((function(e,a){uni.request({url:n+t.url,method:t.method||"GET",data:t.data||{},header:{"Content-Type":"application/x-www-form-urlencoded",token:uni.getStorageSync("token")||""},success:function(t){console.log(t,uni.getStorageSync("token")),1==t.data.code?e(t.data.data):(401==t.data.code&&(uni.navigateTo({url:"/login/login"}),uni.clearStorageSync()),a(t.data.msg))},fail:function(t){console.log(t),a(t)}})}))};e.request=i},2361:function(t,e,a){var n=a("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.realName[data-v-1f742e96]{padding:0 %?32?%;box-sizing:border-box}.realName .title[data-v-1f742e96]{margin-top:%?32?%;color:rgba(0,0,0,.9);font-size:%?52?%;font-weight:500;font-family:PingFang SC}.realName .contail[data-v-1f742e96]{margin-top:%?32?%;padding-bottom:%?160?%}.realName .contail .bar[data-v-1f742e96]{border-bottom:1px solid #f0f0f0;padding:%?32?%;display:flex;justify-content:space-between}.realName .contail .bar uni-input[data-v-1f742e96]{text-align:right}.realName .contail .imgbar[data-v-1f742e96]{text-align:center;position:relative}.realName .contail .imgbar .mytitle[data-v-1f742e96]{margin-top:%?32?%;text-align:left;color:rgba(0,0,0,.9);font-size:%?28?%;font-weight:400;font-family:PingFang SC}.realName .contail .imgbar .image_s[data-v-1f742e96]{margin-top:%?32?%;width:%?524?%;height:%?330?%}.realName .contail .imgbar .image_b[data-v-1f742e96]{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:%?128?%;height:%?128?%}.realName .contail .imgbar .tip[data-v-1f742e96]{margin-top:%?25?%;color:rgba(0,0,0,.4);font-size:%?28?%;font-weight:400;font-family:PingFang SC}.realName .btn[data-v-1f742e96]{position:fixed;bottom:0;left:0;width:100%;height:%?128?%;padding:%?16?% %?32?%;box-sizing:border-box;opacity:1;background:#fff}.realName .btn .paybtn[data-v-1f742e96]{width:100%;height:%?96?%;line-height:%?96?%;text-align:center;border-radius:%?28?%;opacity:1;color:rgba(0,0,0,.9);font-size:%?32?%;font-weight:600;font-family:PingFang SC;background:linear-gradient(134.8deg,#ffe864,#ffd800)}',""]),t.exports=e},"4b95":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.authorization=e.payGuarantee=e.getLastInfo=e.realAuthentication=e.sendProduct=e.getCategory=void 0;var n=a("14ba"),i=function(){return(0,n.request)({url:"product/sort_all",method:"post",data:{}})};e.getCategory=i;var r=function(t){return(0,n.request)({url:"product/product_publish",method:"post",data:t})};e.sendProduct=r;var o=function(t,e,a,i){return(0,n.request)({url:"user/user_cert",method:"post",data:{name:t,identity:e,image_front:a,image_back:i}})};e.realAuthentication=o;var s=function(){return(0,n.request)({url:"product/last_fabu_data",method:"post"})};e.getLastInfo=s;var u=function(){return(0,n.request)({url:"user/user_cert_withdraw",method:"post"})};e.payGuarantee=u;var c=function(t){return(0,n.request)({url:"user/getAuthorizeUrl",method:"post",data:{redirect_uri:t}})};e.authorization=c},"57eb":function(t,e,a){"use strict";var n=a("f96c"),i=a.n(n);i.a},"75f9":function(t,e,a){t.exports=a.p+"static/img/icon_square_cream.514dde9c.png"},a33d:function(t,e,a){"use strict";var n=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("96cf");var i,r=n(a("1da1")),o=a("4b95"),s=a("bbe3"),u=a("d115"),c={data:function(){return{key:"",name:"",number:"",imageZ:"",imageF:"",imgFrontShort:"",imgBackShort:""}},onLoad:function(){i=this},methods:{realAuthentication:function(){var t=this;return(0,r.default)(regeneratorRuntime.mark((function e(){var a,n,i,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(e.prev=0,a=/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,a.test(t.number)){e.next=4;break}return e.abrupt("return",s.toa.toast("请输入正确的身份证号码"));case 4:if(t.name){e.next=6;break}return e.abrupt("return",s.toa.toast("请输入姓名"));case 6:if(t.number){e.next=8;break}return e.abrupt("return",s.toa.toast("请输入身份证"));case 8:if(t.imgFrontShort){e.next=10;break}return e.abrupt("return",s.toa.toast("请上传身份证正面"));case 10:if(t.imgBackShort){e.next=12;break}return e.abrupt("return",s.toa.toast("请上传身份证反面"));case 12:return e.next=14,(0,o.realAuthentication)(t.name,t.number,t.imgFrontShort,t.imgBackShort);case 14:n=e.sent,i=getCurrentPages(),r=i[i.length-2],r.$vm.lastInfo.is_cert=1,setTimeout((function(){s.toa.success("实名认证成功")}),200),uni.navigateBack({}),console.log("realAuthentication",n),e.next=27;break;case 23:e.prev=23,e.t0=e["catch"](0),uni.showToast({title:e.t0,icon:"none"}),console.log("realAuthentication",e.t0);case 27:case"end":return e.stop()}}),e,null,[[0,23]])})))()},upload:function(t){uni.chooseImage({count:1,sizeType:["original"],sourceType:["album"],success:function(){var e=(0,r.default)(regeneratorRuntime.mark((function e(a){var n,r,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:console.log(JSON.stringify(a.tempFilePaths)),n=a.tempFilePaths,r=0;case 3:if(!(r<n.length)){e.next=11;break}return e.next=6,(0,u.uploadFile)(n[r]);case 6:o=e.sent,1==t?(i.imageZ=o.fullurl,i.imgFrontShort=o.url):(i.imageF=o.fullurl,i.imgBackShort=o.url);case 8:r++,e.next=3;break;case 11:case"end":return e.stop()}}),e)})));function a(t){return e.apply(this,arguments)}return a}()})}}};e.default=c},b73c:function(t,e,a){"use strict";a.r(e);var n=a("a33d"),i=a.n(n);for(var r in n)"default"!==r&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a},bbe3:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.router=e.toa=e.hideLoading=e.loading=e.success=e.toast=void 0;var n=function(t){return uni.showToast({title:t,icon:"none"})};e.toast=n;var i=function(t){return uni.showToast({title:t})};e.success=i;var r=function(t){return uni.showLoading({title:"加载中"})};e.loading=r;var o=function(){return uni.hideLoading()};e.hideLoading=o;var s={toast:function(t){return uni.showToast({title:t,icon:"none"})},success:function(t){return uni.showToast({title:t})},loading:function(t){return uni.showLoading({title:t||"加载中",mask:!0})},hideLoading:function(){return uni.hideLoading()}};e.toa=s;var u={back:function(t){return uni.navigateBack({delta:t||1})}};e.router=u},d115:function(t,e,a){"use strict";var n=a("4ea4");a("d3b7"),Object.defineProperty(e,"__esModule",{value:!0}),e.uploadFile=void 0;var i=n(a("5530")),r=a("14ba"),o=a("bbe3"),s=function(t,e){return new Promise((function(a,n){o.toa.loading("上传中.."),uni.uploadFile({url:r.baseURL+"/common/upload",filePath:t,name:"file",formData:(0,i.default)((0,i.default)({},e),{},{token:uni.getStorageSync("token")||""}),success:function(t){o.toa.hideLoading(),console.log(t),200==t.statusCode&&a(JSON.parse(t.data).data)},fail:function(t){o.toa.hideLoading(),(0,o.toast)(JSON.parse(t.data).msg),console.log(t,"上传报错"),n(t)}})}))};e.uploadFile=s},d6db:function(t,e,a){"use strict";var n;a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return n}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"realName"},[n("v-uni-view",{staticClass:"title"},[t._v("实名认证")]),n("v-uni-view",{staticClass:"contail"},[n("v-uni-view",{staticClass:"bar"},[n("v-uni-view",{staticClass:"beforename"},[t._v("姓名:")]),n("v-uni-input",{attrs:{type:"text",placeholder:"请输入"},model:{value:t.name,callback:function(e){t.name=e},expression:"name"}})],1),n("v-uni-view",{staticClass:"bar"},[n("v-uni-view",{staticClass:"beforename"},[t._v("身份证号:")]),n("v-uni-input",{attrs:{type:"number",maxlength:"18",placeholder:"请输入"},model:{value:t.number,callback:function(e){t.number=e},expression:"number"}})],1),n("v-uni-view",{staticClass:"imgbar"},[n("v-uni-view",{staticClass:"mytitle"},[t._v("身份证照片")]),n("v-uni-image",{staticClass:"image_s",attrs:{src:t.imageZ||"/static/img_card_b.png",mode:""},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.upload(1)}}}),n("v-uni-view",{staticClass:"tip"},[t._v("点击相机拍摄头像面")]),t.imageZ?t._e():n("v-uni-image",{staticClass:"image_b",attrs:{src:"/static/icon_square_cream.png",mode:""},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.upload(1)}}})],1),n("v-uni-view",{staticClass:"imgbar"},[n("v-uni-image",{staticClass:"image_s",attrs:{src:t.imageF||"/static/img_card_a.png",mode:""},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.upload(2)}}}),n("v-uni-view",{staticClass:"tip"},[t._v("点击相机拍摄国徽面")]),t.imageF?t._e():n("v-uni-image",{staticClass:"image_b",attrs:{src:"/static/icon_square_cream.png",mode:""},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.upload(2)}}})],1)],1),n("v-uni-view",{staticClass:"btn"},[n("v-uni-view",{staticClass:"paybtn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.realAuthentication.apply(void 0,arguments)}}},[n("v-uni-input",{attrs:{type:"text",placeholder:"请输入"},model:{value:t.kidentity,callback:function(e){t.kidentity=e},expression:"kidentity"}})],1),n("v-uni-view",{staticClass:"imgbar",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.chooseImgs(1)}}},[n("v-uni-view",{staticClass:"mytitle"},[t._v("身份证照片")]),t.head_image?n("v-uni-image",{staticClass:"image_s",attrs:{src:t.head_image,mode:""}}):n("v-uni-image",{staticClass:"image_s",attrs:{src:a("d7fe"),mode:""}}),n("v-uni-view",{staticClass:"tip"},[t._v("点击相机拍摄头像面")]),t.head_image?t._e():n("v-uni-image",{staticClass:"image_b",attrs:{src:a("75f9"),mode:""}})],1),n("v-uni-view",{staticClass:"imgbar",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.chooseImgs(2)}}},[t.last_image?n("v-uni-image",{staticClass:"image_s",attrs:{src:t.last_image,mode:""}}):n("v-uni-image",{staticClass:"image_s",attrs:{src:a("0088"),mode:""}}),n("v-uni-view",{staticClass:"tip"},[t._v("点击相机拍摄国徽面")]),n("v-uni-image",{staticClass:"image_b"}),t.last_image?t._e():n("v-uni-image",{staticClass:"image_b",attrs:{src:a("75f9"),mode:""}})],1)],1),n("v-uni-view",{staticClass:"btn"},[n("v-uni-view",{staticClass:"paybtn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.user_cert.apply(void 0,arguments)}}},[t._v("提交")])],1)],1)},r=[]},d7fe:function(t,e,a){t.exports=a.p+"static/img/img_card_b.22d4942d.png"},efda:function(t,e,a){"use strict";a.r(e);var n=a("d6db"),i=a("b73c");for(var r in i)"default"!==r&&function(t){a.d(e,t,(function(){return i[t]}))}(r);a("57eb");var o,s=a("f0c5"),u=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"1f742e96",null,!1,n["a"],o);e["default"]=u.exports},f96c:function(t,e,a){var n=a("2361");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("4f06").default;i("0649f552",n,!0,{sourceMap:!1,shadowMode:!1})}}]);