| 1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login/register"],{"4d61":function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return r}));var r={faNavbar:function(){return n.e("components/fa-navbar/fa-navbar").then(n.bind(null,"6858"))},uAvatar:function(){return n.e("uview-ui/components/u-avatar/u-avatar").then(n.bind(null,"3108"))},uForm:function(){return n.e("uview-ui/components/u-form/u-form").then(n.bind(null,"3e66"))},uFormItem:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-form-item/u-form-item")]).then(n.bind(null,"8413"))},uInput:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-input/u-input")]).then(n.bind(null,"b3e3"))},uButton:function(){return n.e("uview-ui/components/u-button/u-button").then(n.bind(null,"6829"))},uCheckbox:function(){return n.e("uview-ui/components/u-checkbox/u-checkbox").then(n.bind(null,"7619"))},uVerificationCode:function(){return n.e("uview-ui/components/u-verification-code/u-verification-code").then(n.bind(null,"f082"))},uToast:function(){return n.e("uview-ui/components/u-toast/u-toast").then(n.bind(null,"b352"))}},u=function(){var e=this,t=e.$createElement,n=(e._self._c,e.is_wx_phone&&e.is_bind?null:{backgroundColor:e.theme.bgColor,color:e.theme.color}),r=e.is_wx_phone&&e.is_bind?null:{backgroundColor:e.theme.bgColor,color:e.theme.color};e.$mp.data=Object.assign({},{$root:{a0:n,a1:r}})},i=[]},"709d":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n("a34a")),u=n("59de");function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r,u,i,o){try{var s=e[i](o),a=s.value}catch(c){return void n(c)}s.done?t(a):Promise.resolve(a).then(r,u)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,u){var i=e.apply(t,n);function s(e){o(i,r,u,s,a,"next",e)}function a(e){o(i,r,u,s,a,"throw",e)}s(void 0)}))}}var a={mixins:[u.loginfunc],onLoad:function(e){var t=this.$Route.query||e||{};this.is_bind=t.bind||"",this.is_bing||(this.labelPosition="left",this.rules.username=[{required:!0,message:"请输入用户名",trigger:["change","blur"]}],this.rules.password=[{required:!0,message:"请输入密码",trigger:"change"}])},onReady:function(){this.is_bind||this.$refs.uForm.setRules(this.rules)},watch:{is_wx_phone:function(e,t){var n=this;e||this.$nextTick((function(){n.$refs.uForm.setRules(n.rules)}))}},data:function(){var e=this;return{is_bind:"",is_wx_phone:!1,agreeChecked:!1,labelPosition:"top",border:!1,form:{username:"",password:"",mobile:"",code:""},rules:{mobile:[{required:!0,message:"请输入手机号码",trigger:"change"},{validator:function(t,n,r){return e.$u.test.mobile(n)},message:"手机号码不正确",trigger:["change","blur"]}],code:[{required:!0,message:"请输入短信验证码",trigger:"change"}]},codeTips:"",errorType:["message"]}},methods:{agreement:function(){this.$Router.push("/pages/my/agreement")},codeChange:function(e){this.codeTips=e},getCode:function(){var e=s(r.default.mark((function e(){var t;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.$u.test.mobile(this.form.mobile)){e.next=3;break}return this.$u.toast("手机号码格式不正确!"),e.abrupt("return");case 3:if(!this.$refs.uCode.canGetCode){e.next=11;break}return e.next=6,this.$api.getSmsSend({mobile:this.form.mobile,event:this.is_bind?"bind":"register"});case 6:t=e.sent,this.$u.toast(t.msg),t.code&&this.$refs.uCode.start(),e.next=12;break;case 11:this.$u.toast("倒计时结束后再发送");case 12:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),register:function(){var e=this;this.agreeChecked?this.$refs.uForm.validate((function(t){t?e.is_bind?e.goBind():e.goReg():e.$u.toast("验证失败")})):this.$refs.uToast.show({title:"请阅读并同意遵守《用户协议》",type:"error"})},goReg:function(){var e=s(r.default.mark((function e(){var t;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.vuex_wx_uid&&(this.form.wx_user_id=this.vuex_wx_uid),e.next=3,this.$api.goRegister(this.form);case 3:if(t=e.sent,t.code){e.next=7;break}return this.$u.toast(t.msg),e.abrupt("return");case 7:this.$u.vuex("vuex_token",t.data.token),this.success(3);case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),goBind:function(){var e=s(r.default.mark((function e(){var t,n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$api.goThirdAccount(this.form);case 2:if(t=e.sent,t.code){e.next=6;break}return this.$u.toast(t.msg),e.abrupt("return");case 6:n=2,t.data.userinfo&&(this.$u.vuex("vuex_token",t.data.userinfo.token),this.success(n));case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}};t.default=a},7303:function(e,t,n){"use strict";n.r(t);var r=n("4d61"),u=n("a41d");for(var i in u)"default"!==i&&function(e){n.d(t,e,(function(){return u[e]}))}(i);n("a3c7");var o,s=n("f0c5"),a=Object(s["a"])(u["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],o);t["default"]=a.exports},"9b3d":function(e,t,n){},a3c7:function(e,t,n){"use strict";var r=n("9b3d"),u=n.n(r);u.a},a41d:function(e,t,n){"use strict";n.r(t);var r=n("709d"),u=n.n(r);for(var i in r)"default"!==i&&function(e){n.d(t,e,(function(){return r[e]}))}(i);t["default"]=u.a},b7af:function(e,t,n){"use strict";(function(e){n("630e");r(n("66fd"));var t=r(n("7303"));function r(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("5486")["createPage"])}},[["b7af","common/runtime","common/vendor"]]]);
|