pages-register-register.5c3576b3.js 13 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-register-register"],{"16d3":function(e,n,t){"use strict";t.d(n,"b",(function(){return a})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){}));var a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-uni-view",{staticClass:"page"},[t("public-module"),t("v-uni-view",{staticClass:"mx-3 mt-3"},[t("v-uni-view",{staticClass:"phone d-flex"},[t("v-uni-view",{staticClass:"title"},[e._v("电话号码")]),t("v-uni-input",{attrs:{placeholder:"请输入手机号",maxlength:"11"},model:{value:e.phone,callback:function(n){e.phone=n},expression:"phone"}})],1),t("v-uni-view",{staticClass:"phone d-flex"},[t("v-uni-view",{staticClass:"title"},[e._v("真实姓名")]),t("v-uni-input",{attrs:{placeholder:"请输入姓名"},model:{value:e.name,callback:function(n){e.name=n},expression:"name"}})],1),t("v-uni-view",{staticClass:"password d-flex"},[t("v-uni-view",{staticClass:"title"},[e._v("密码")]),t("v-uni-input",{staticStyle:{"padding-right":"200rpx"},attrs:{placeholder:"请输入密码",password:e.isHidePassword,maxlength:"15"},model:{value:e.password,callback:function(n){e.password=n},expression:"password"}}),t("v-uni-view",{staticClass:"d-flex a-center j-center yanzhengma"},[t("v-uni-view",{staticClass:"icon iconfont",class:e.isHidePassword?"icon-buxianshimima":"icon-xianshimima",staticStyle:{"font-size":"40rpx"},on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.isHidePassword=!e.isHidePassword}}})],1)],1),t("v-uni-view",{staticClass:"code d-flex"},[t("v-uni-view",{staticClass:"title"},[e._v("验证码")]),t("v-uni-input",{staticStyle:{"padding-right":"200rpx"},attrs:{placeholder:"请输入验证码",maxlength:"5"},model:{value:e.code,callback:function(n){e.code=n},expression:"code"}}),t("v-uni-view",{staticClass:"d-flex a-center j-center login-font-color yanzhengma",on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.getCheckNum.apply(void 0,arguments)}}},[t("v-uni-view",{staticClass:"d-flex a-center j-center",class:e.codetime?"yanzhengma2":"yanzhengma1 main-text-color"},[e._v(e._s(e.codetime?e.codetime+" s":"获取验证码"))])],1)],1),e.showRecommend?[t("v-uni-view",{staticClass:"recommendInfo"},[t("v-uni-view",{staticClass:"d-flex"},[t("v-uni-view",[t("v-uni-image",{attrs:{src:"/static/bigLogo.png"}})],1),t("v-uni-view",[t("v-uni-view",[t("span",{staticClass:"text-muted mr-2"},[e._v("推荐人姓名")]),e._v(e._s(e.recommendername))]),t("v-uni-view",[t("span",{staticClass:"text-muted mr-2"},[e._v("推荐人会员号")]),e._v(e._s(e.recommenderid))])],1)],1),t("v-uni-view",{staticClass:"px-3 py-1 d-flex a-center j-center"},[e._v("请确认推荐人信息,注册后,推荐人将不可修改")])],1)]:e._e(),t("v-uni-button",{staticClass:"my-3 mt-4 d-flex a-center j-center font-weight main-bg-color",class:{"main-bf-hover-color":e.disabled},staticStyle:{"letter-spacing":"20rpx"},attrs:{loading:e.loading,type:"primary",disabled:e.disabled},on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.submit.apply(void 0,arguments)}}},[e._v("注册")]),t("v-uni-view",{staticClass:"d-flex a-center j-center my-3"},[e._v("已有帐号?"),t("v-uni-view",{staticClass:"main-text-color",on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.navigate({url:"/pages/login/login"},"reLaunch")}}},[e._v("去登录")])],1)],2)],1)},i=[]},2747:function(e,n,t){"use strict";var a=t("e978"),i=t.n(a);i.a},"577d":function(e,n,t){var a=t("24fb");n=a(!1),n.push([e.i,'@charset "UTF-8";\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.idCardBefore[data-v-5f8c2900]{background:rgba(234,85,45,.1) url(/static/image/user/identy2.png) 50% no-repeat;background-size:auto 70%;padding:%?10?%}.page[data-v-5f8c2900]{background:#f5f5f5;height:100vh;width:100%;position:absolute}.phone[data-v-5f8c2900], .password[data-v-5f8c2900], .code[data-v-5f8c2900]{position:relative;height:%?90?%;display:flex;align-items:center;background-color:#fff;padding:0 %?30?%;margin-bottom:%?26?%}.phone .title[data-v-5f8c2900], .password .title[data-v-5f8c2900], .code .title[data-v-5f8c2900]{width:%?160?%;flex-shrink:0;color:#666}.phone uni-input[data-v-5f8c2900], .password uni-input[data-v-5f8c2900], .code uni-input[data-v-5f8c2900]{width:%?350?%;font-size:%?28?%}.yanzhengma[data-v-5f8c2900]{width:%?150?%;position:absolute;right:%?30?%}.yanzhengma1[data-v-5f8c2900]{font-size:%?26?%;background:#fff;border-radius:%?10?%;width:%?150?%;padding:%?5?% 0}.yanzhengma2[data-v-5f8c2900]{background:#fff;font-size:%?26?%;color:#b2b2b2;border-radius:%?10?%;width:%?150?%;padding:%?5?% 0}.recommendInfo[data-v-5f8c2900]{background:#fff}.recommendInfo > uni-view[data-v-5f8c2900]:nth-of-type(1){border-bottom:1px solid #ddd}.recommendInfo > uni-view:nth-of-type(1) > uni-view[data-v-5f8c2900]:nth-of-type(1){width:%?150?%;height:%?150?%;border-radius:50%}.recommendInfo > uni-view:nth-of-type(1) > uni-view:nth-of-type(1) > uni-image[data-v-5f8c2900]{width:100%;height:100%}.recommendInfo > uni-view:nth-of-type(1) > uni-view[data-v-5f8c2900]:nth-of-type(2){padding:%?20?%}.recommendInfo > uni-view:nth-of-type(1) > uni-view:nth-of-type(2) > uni-view[data-v-5f8c2900]{height:%?55?%}.recommendInfo > uni-view[data-v-5f8c2900]:nth-of-type(2){line-height:%?50?%}',""]),e.exports=n},"65a8":function(e,n,t){"use strict";t("7a82");var a=t("4ea4").default;Object.defineProperty(n,"__esModule",{value:!0}),n.base64ToPath=function(e){return new Promise((function(n,t){if("object"===("undefined"===typeof window?"undefined":(0,i.default)(window))&&"document"in window){e=e.split(",");var a=e[0].match(/:(.*?);/)[1],o=atob(e[1]),r=o.length,s=new Uint8Array(r);while(r--)s[r]=o.charCodeAt(r);return n((window.URL||window.webkitURL).createObjectURL(new Blob([s],{type:a})))}var d=e.match(/data\:\S+\/(\S+);/);d?d=d[1]:t(new Error("base64 error"));var c=Date.now()+"."+d;if("object"!==("undefined"===typeof plus?"undefined":(0,i.default)(plus)))if("object"===("undefined"===typeof wx?"undefined":(0,i.default)(wx))&&wx.canIUse("getFileSystemManager")){var u=wx.env.USER_DATA_PATH+"/"+c;wx.getFileSystemManager().writeFile({filePath:u,data:e.replace(/^data:\S+\/\S+;base64,/,""),encoding:"base64",success:function(){n(u)},fail:function(e){t(e)}})}else t(new Error("not support"));else{var f=new plus.nativeObj.Bitmap("bitmap"+Date.now());f.loadBase64Data(e,(function(){var e="_doc/uniapp_temp/"+c;f.save(e,{},(function(){f.clear(),n(e)}),(function(e){f.clear(),t(e)}))}),(function(e){f.clear(),t(e)}))}}))},n.pathToBase64=function(e){return new Promise((function(n,t){if("object"===("undefined"===typeof window?"undefined":(0,i.default)(window))&&"document"in window){if("function"===typeof FileReader){var a=new XMLHttpRequest;return a.open("GET",e,!0),a.responseType="blob",a.onload=function(){if(200===this.status){var e=new FileReader;e.onload=function(e){n(e.target.result)},e.onerror=t,e.readAsDataURL(this.response)}},a.onerror=t,void a.send()}var o=document.createElement("canvas"),r=o.getContext("2d"),s=new Image;return s.onload=function(){o.width=s.width,o.height=s.height,r.drawImage(s,0,0),n(o.toDataURL()),o.height=o.width=0},s.onerror=t,void(s.src=e)}"object"!==("undefined"===typeof plus?"undefined":(0,i.default)(plus))?"object"===("undefined"===typeof wx?"undefined":(0,i.default)(wx))&&wx.canIUse("getFileSystemManager")?wx.getFileSystemManager().readFile({filePath:e,encoding:"base64",success:function(e){n("data:image/png;base64,"+e.data)},fail:function(e){t(e)}}):t(new Error("not support")):plus.io.resolveLocalFileSystemURL(function(e){if(0===e.indexOf("_www")||0===e.indexOf("_doc")||0===e.indexOf("_documents")||0===e.indexOf("_downloads"))return e;if(0===e.indexOf("file://"))return e;if(0===e.indexOf("/storage/emulated/0/"))return e;if(0===e.indexOf("/")){var n=plus.io.convertAbsoluteFileSystem(e);if(n!==e)return n;e=e.substr(1)}return"_www/"+e}(e),(function(e){e.file((function(e){var a=new plus.io.FileReader;a.onload=function(e){n(e.target.result)},a.onerror=function(e){t(e)},a.readAsDataURL(e)}),(function(e){t(e)}))}),(function(e){t(e)}))}))};var i=a(t("53ca"));t("c975"),t("d3b7"),t("d9e2"),t("d401"),t("ac1f"),t("466d"),t("81b2"),t("0eb6"),t("b7ef"),t("8bd4"),t("ace4"),t("5cc6"),t("907a"),t("9a8c"),t("a975"),t("735e"),t("c1ac"),t("d139"),t("3a7b"),t("986a"),t("1d02"),t("d5d6"),t("82f8"),t("e91f"),t("60bd"),t("5f96"),t("3280"),t("3fcc"),t("ca91"),t("25a1"),t("cd26"),t("3c5d"),t("2954"),t("649e"),t("219c"),t("b39a"),t("72f7"),t("3ca3"),t("ddb0"),t("2b3d"),t("9861"),t("5319")},"9d67":function(e,n,t){"use strict";t.r(n);var a=t("16d3"),i=t("d663");for(var o in i)["default"].indexOf(o)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(o);t("2747");var r=t("f0c5"),s=Object(r["a"])(i["default"],a["b"],a["c"],!1,null,"5f8c2900",null,!1,a["a"],void 0);n["default"]=s.exports},d663:function(e,n,t){"use strict";t.r(n);var a=t("e905"),i=t.n(a);for(var o in a)["default"].indexOf(o)<0&&function(e){t.d(n,e,(function(){return a[e]}))}(o);n["default"]=i.a},e905:function(e,n,t){"use strict";t("7a82");var a=t("4ea4").default;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,t("c975"),t("ac1f"),t("00b4");var i=a(t("5530")),o=a(t("c7eb")),r=a(t("1da1")),s=(t("65a8"),t("26cb")),d={data:function(){return{name:"",phone:"",password:"",code:"",isHidePassword:!0,disabled:!0,loading:!1,codetime:0,showRecommend:!1,recommendername:"",recommenderid:""}},onLoad:function(e){var n=this;return(0,r.default)((0,o.default)().mark((function t(){var a;return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.id){t.next=8;break}return n.recommenderid=e.id,t.next=4,n.$http.get("/user/findById?id="+e.id);case 4:a=t.sent,"200"==a.code&&null!=a.data?(n.recommendername=a.data.name,n.showRecommend=!0):n.$base.baseUrl.indexOf("test")>-1?(n.recommenderid="99140109M01D01001",n.recommendername="耿陈杰",n.showRecommend=!1):(n.recommenderid="99140109M03D01001",n.recommendername="掌柜老王",n.showRecommend=!1),t.next=9;break;case 8:n.$base.baseUrl.indexOf("test")>-1?(n.recommenderid="99140109M01D01001",n.recommendername="耿陈杰",n.showRecommend=!1):(n.recommenderid="99140109M03D01001",n.recommendername="掌柜老王",n.showRecommend=!1);case 9:case"end":return t.stop()}}),t)})))()},watch:{name:function(){this.OnBtnChange()},phone:function(e){this.OnBtnChange()},password:function(e){this.OnBtnChange()},code:function(e){this.OnBtnChange()}},methods:(0,i.default)((0,i.default)({},(0,s.mapMutations)(["setUserModules"])),{},{OnBtnChange:function(){this.phone&&this.password&&this.code&&this.name?this.disabled=!1:this.disabled=!0},isPwdRules:function(){return/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/.test(this.password)},getCheckNum:function(){var e=this;return(0,r.default)((0,o.default)().mark((function n(){var t,a;return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(uni.hideKeyboard(),!(e.codetime>0)){n.next=3;break}return n.abrupt("return");case 3:if(e.phone){n.next=5;break}return n.abrupt("return",uni.showToast({title:"请输入手机号",icon:"none"}));case 5:if(e.$base.phoneRegular.test(e.phone)){n.next=7;break}return n.abrupt("return",uni.showToast({title:"请输入正确的手机号码",icon:"none"}));case 7:return n.next=9,e.$http.get("/sendMsg",{phone:e.phone,type:"1"});case 9:if(t=n.sent,200==t.code){n.next=14;break}return n.abrupt("return",uni.showToast({title:t.data.msg,icon:"none"}));case 14:uni.showToast({title:"发送成功",icon:"none"});case 15:e.codetime=60,a=setInterval((function(){e.codetime--,e.codetime<1&&(clearInterval(a),e.codetime=0)}),1e3);case 17:case"end":return n.stop()}}),n)})))()},submit:function(){var e=this;return(0,r.default)((0,o.default)().mark((function n(){var t,a;return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.name){n.next=2;break}return n.abrupt("return",uni.showToast({title:"请输入姓名",icon:"none"}));case 2:if(e.$base.phoneRegular.test(e.phone)){n.next=4;break}return n.abrupt("return",uni.showToast({title:"请输入正确的手机号码",icon:"none"}));case 4:if(e.$base.passwordRegular.test(e.password)){n.next=6;break}return n.abrupt("return",uni.showToast({title:"密码须6-15位数字与字母组合",icon:"none"}));case 6:return n.next=8,e.$http.post("/esmUserInternalcheck/userRegist",{name:e.name,identity:e.identity,addressnow:e.addressnow,password:e.password,phone:e.phone,phoneMsg:e.code,recommenderid:e.recommenderid,recommendername:e.recommendername});case 8:t=n.sent,"",a=e.phone,e.password="",e.phone="",e.code="",e.name="",200==t.code&&t.data?setTimeout((function(){return uni.reLaunch({url:"/pages/register/registerSuccess?id="+t.data+"&phone="+a})}),2e3):uni.showToast({title:"已注册,重复注册",icon:"success",duration:2e3});case 16:case"end":return n.stop()}}),n)})))()}})};n.default=d},e978:function(e,n,t){var a=t("577d");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var i=t("4f06").default;i("3360f2e9",a,!0,{sourceMap:!1,shadowMode:!1})}}]);