You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
6.3 KiB
1 lines
6.3 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-renzheng-phone"],{"0526":function(t,e,n){"use strict";n.r(e);var o=n("368a"),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},"368a":function(t,e,n){"use strict";n("6a54");var o=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("5c47"),n("0506");var i=o(n("2634")),a=o(n("2fdc")),r=null,s={data:function(){return{phone:"",code:"",count:60,isClikc:!0}},methods:{sendCode:function(){var t=this;return(0,a.default)((0,i.default)().mark((function e(){var n,o,a;return(0,i.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=t,n.phone){e.next=4;break}return uni.showToast({icon:"none",position:"bottom",title:"手机号不能为空!"}),e.abrupt("return");case 4:if(/^1[3456789]\d{9}$/.test(n.phone)){e.next=7;break}return uni.showToast({title:"手机号格式不能为空!",position:"bottom",icon:"none"}),e.abrupt("return");case 7:if(0!=n.isClick){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,n.$api.sendSmsCode({phone:n.phone});case 11:o=e.sent,a=o.code,o.data,o.msg,200==a?(n.isClick=!1,r=setInterval((function(){0==n.count?(clearInterval(r),n.count=60,n.isClick=!0):n.count--}),1e3),uni.showToast({icon:"none",position:"bottom",title:"发送成功"})):n.isClick=!0;case 16:case"end":return e.stop()}}),e)})))()},toReg:function(){var t=this;return(0,a.default)((0,i.default)().mark((function e(){var n,o,a,r;return(0,i.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=t,n.phone){e.next=4;break}return uni.showToast({icon:"none",position:"bottom",title:"手机号不能为空!"}),e.abrupt("return");case 4:if(/^1[3456789]\d{9}$/.test(n.phone)){e.next=7;break}return uni.showToast({title:"手机号格式不能为空!",position:"bottom",icon:"none"}),e.abrupt("return");case 7:if(n.code){e.next=10;break}return uni.showToast({icon:"none",position:"bottom",title:"验证码不能为空!"}),e.abrupt("return");case 10:return e.next=12,t.$api.phoneAuth({userId:uni.getStorageSync("userInfo").id,code:t.code,phone:t.phone});case 12:o=e.sent,a=o.code,o.data,r=o.msg,200==a?(uni.showToast({title:"提交成功"}),setTimeout((function(){uni.navigateBack({delta:1})}),2e3)):uni.showToast({icon:"none",position:"bottom",title:r});case 17:case"end":return e.stop()}}),e)})))()}}};e.default=s},4481:function(t,e,n){var o=n("9d8b");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=n("967d").default;i("66eeb653",o,!0,{sourceMap:!1,shadowMode:!1})},"916c":function(t,e,n){"use strict";n.r(e);var o=n("e05f"),i=n("0526");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("e4ac");var r=n("828b"),s=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,"f216995a",null,!1,o["a"],void 0);e["default"]=s.exports},"9d8b":function(t,e,n){var o=n("c86c");e=o(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.phone[data-v-f216995a]{padding:%?25?%;overflow:hidden}.phone .title[data-v-f216995a]{color:#222;font-weight:500;font-size:%?30?%}.phone .tips[data-v-f216995a]{font-weight:500;font-size:%?24?%;color:#999;margin-top:%?20?%}.phone-fd[data-v-f216995a]{width:100%;position:fixed;left:0;bottom:%?50?%;z-index:22}.phone-fd .btn[data-v-f216995a]{width:%?700?%;line-height:%?98?%;background:linear-gradient(0deg,#000,#3d3b38);border-radius:%?98?%;font-weight:400;font-size:%?34?%;text-align:center;color:#fff;margin:0 auto}.phone-bd[data-v-f216995a]{width:100%;overflow:hidden;background:#fff;padding:0 %?30?%;box-sizing:border-box;border-radius:%?20?%;margin-top:%?30?%}.phone-bd .item[data-v-f216995a]{display:flex;align-items:center;border-top:1px solid #eaeaea;padding:%?50?% 0 %?30?%}.phone-bd .item[data-v-f216995a]:first-child{border-top-color:#fff}.phone-bd .item uni-input[data-v-f216995a]{flex:1;font-weight:400;font-size:%?30?%;color:#333;margin-left:%?30?%}.phone-bd .item .code[data-v-f216995a]{width:%?170?%;line-height:%?60?%;background:#000;border-radius:%?60?%;text-align:center;font-weight:500;font-size:%?26?%;color:#fff}',""]),t.exports=e},e05f:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"phone"},[n("v-uni-view",{staticClass:"titlle"},[t._v("提示:")]),n("v-uni-view",{staticClass:"tips"},[t._v("请输入登录APP的手机号进行认证")]),n("v-uni-view",{staticClass:"phone-bd"},[n("v-uni-view",{staticClass:"item"},[n("v-uni-view",{staticClass:"txt"},[t._v("手机号")]),n("v-uni-input",{attrs:{placeholder:"请输入手机号",type:"number"},model:{value:t.phone,callback:function(e){t.phone=e},expression:"phone"}})],1),n("v-uni-view",{staticClass:"item"},[n("v-uni-view",{staticClass:"txt"},[t._v("验证码")]),n("v-uni-input",{attrs:{placeholder:"请输入短信验证码",type:"number"},model:{value:t.code,callback:function(e){t.code=e},expression:"code"}}),n("v-uni-view",{staticClass:"code",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.sendCode()}}},[t._v(t._s(60==t.count?"获取验证码":t.count+"s"))])],1)],1),n("v-uni-view",{staticClass:"phone-fd"},[n("v-uni-view",{staticClass:"btn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toReg()}}},[t._v("确定")])],1)],1)},i=[]},e4ac:function(t,e,n){"use strict";var o=n("4481"),i=n.n(o);i.a}}]); |