pages-edit-phone-edit-phone.cfc48623.js 6.2 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-edit-phone-edit-phone"],{"0932":function(n,t,e){"use strict";e.r(t);var i=e("1df1"),o=e.n(i);for(var s in i)"default"!==s&&function(n){e.d(t,n,(function(){return i[n]}))}(s);t["default"]=o.a},"1df1":function(n,t,e){"use strict";e("d3b7"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e("4b9e"),o={data:function(){return{countDown:0,phone:"",sms:"",isEdit:!1,isSend:!0,old:"",isPhone:!1,isSuce:!0,errMsg:""}},onLoad:function(n){this.old=n.old?n.old:""},methods:{finish:function(){uni.reLaunch({url:"../my-order/my-order"})},know:function(){this.isPhone=!1},sendCode:function(){var n=this,t=this;return t.countDown?(uni.showModal({content:"验证码已发送,请稍后重试",showCancel:!1}),!1):t.phone&&11==t.phone.length?void(0,i.sendCode)({phone:t.phone}).then((function(t){if(200!=t.code)return uni.showModal({content:t.msg||"获取验证码失败",showCancel:!1}),!1;n.isEdit=!0,uni.showModal({content:"验证码发送成功",showCancel:!1}),n.countDown=60,n.timer=setInterval((function(){n.countDown--,n.countDown||(n.countDown=0,clearInterval(n.timer))}),1e3)})).finally((function(){n.isEdit=!0})):(uni.showModal({content:"手机号格式不正确",showCancel:!1}),!1)},submit:function(){var n=this,t=this;return t.phone&&11==t.phone.length?t.sms&&6==t.sms.length?!!t.isSend&&(t.isSend=!1,void(0,i.editPhone)({phone:this.phone,phone_code:this.sms}).then((function(t){n.isPhone=!0,200==t.code?n.isSuce=!0:(n.isSuce=!1,n.errMsg=t.msg)})).catch((function(n){})).finally((function(){t.isSend=!0}))):(uni.showModal({content:"验证码格式不正确"}),!1):(uni.showModal({content:"手机号格式不正确"}),!1)}}};t.default=o},"2ead":function(n,t,e){var i=e("d0fd");"string"===typeof i&&(i=[[n.i,i,""]]),i.locals&&(n.exports=i.locals);var o=e("4f06").default;o("4a8fbaed",i,!0,{sourceMap:!1,shadowMode:!1})},bd3a:function(n,t,e){"use strict";e.r(t);var i=e("db07"),o=e("0932");for(var s in o)"default"!==s&&function(n){e.d(t,n,(function(){return o[n]}))}(s);e("bf99");var a,r=e("f0c5"),c=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,"721ff616",null,!1,i["a"],a);t["default"]=c.exports},bf99:function(n,t,e){"use strict";var i=e("2ead"),o=e.n(i);o.a},d0fd:function(n,t,e){var i=e("24fb");t=i(!1),t.push([n.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/* 文章场景相关 */\r\n/*主题色及按钮渐变背景*/\r\n/*字体大小*/.phone_pop[data-v-721ff616]{width:100%;height:100vh;position:fixed;top:0;left:0;background-color:rgba(0,0,0,.7);z-index:999}.phone_pop .pop_con[data-v-721ff616]{width:%?600?%;height:%?478?%;text-align:center;border-radius:%?24?%;background:#fff;z-index:9999}.phone_pop .pop_con uni-image[data-v-721ff616]{width:%?150?%;height:%?114?%;margin-top:%?30?%;margin-left:%?10?%}.phone_pop .pop_con .hint[data-v-721ff616]{font-size:%?36?%;font-weight:700;margin:%?20?% 0 %?40?%}.phone_pop .pop_con .sub_btn[data-v-721ff616]{margin-top:%?50?%}.phone[data-v-721ff616]{width:%?690?%;margin:0 auto;padding-top:%?40?%}.phone .title[data-v-721ff616]{font-size:%?32?%;margin-bottom:%?30?%;font-weight:700}.phone .phone_num[data-v-721ff616]{line-height:%?104?%}.phone .phone_num[data-v-721ff616],\r\n.phone .phone_inp > uni-view[data-v-721ff616]{height:%?104?%;border-bottom:%?2?% solid #eee}.phone .code[data-v-721ff616]{height:%?60?%;padding:0 %?25?%;line-height:%?60?%;color:#fb231f;background:#fff4f3;border-radius:%?30?%}.phone .sub_btn[data-v-721ff616]{margin-top:%?224?%}',""]),n.exports=t},db07:function(n,t,e){"use strict";var i;e.d(t,"b",(function(){return o})),e.d(t,"c",(function(){return s})),e.d(t,"a",(function(){return i}));var o=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("v-uni-view",{staticClass:"phone"},[e("v-uni-view",{staticClass:"title"},[n._v("原手机号:"+n._s(n.old))]),e("v-uni-view",{staticClass:"phone_inp"},[e("v-uni-input",{staticClass:"phone_num",attrs:{type:"number",placeholder:"请输入新手机号",maxlength:"11",disabled:n.isEdit},model:{value:n.phone,callback:function(t){n.phone=t},expression:"phone"}}),e("v-uni-view",{staticClass:"flexB"},[e("v-uni-input",{attrs:{type:"number",placeholder:"请输入验证码",maxlength:"6"},model:{value:n.sms,callback:function(t){n.sms=t},expression:"sms"}}),e("v-uni-view",{staticClass:"code",on:{click:function(t){arguments[0]=t=n.$handleEvent(t),n.sendCode.apply(void 0,arguments)}}},[n._v(n._s(n.countDown?"重新获取("+n.countDown+"s)":"获取验证码"))])],1)],1),e("v-uni-view",{staticClass:"sub_btn",on:{click:function(t){arguments[0]=t=n.$handleEvent(t),n.submit.apply(void 0,arguments)}}},[n._v("保存")]),n.isPhone?e("v-uni-view",{staticClass:"phone_pop flexCC"},[e("v-uni-view",{staticClass:"pop_con"},[e("v-uni-image",{attrs:{src:n.isSuce?"/static/imgs/index/suce.png":"/static/imgs/index/fail.png"}}),e("v-uni-view",{staticClass:"hint"},[n._v("手机号修改"+n._s(n.isSuce?"成功":"失败"))]),e("v-uni-view",[e("v-uni-text",{staticClass:"gray"},[n._v(n._s(n.isSuce?"您的手机号是:":n.errMsg))]),n.isSuce?e("v-uni-text",{staticStyle:{color:"#EA4A41"}},[n._v(n._s(n.phone))]):n._e()],1),e("v-uni-view",{staticClass:"sub_btn",on:{click:function(t){arguments[0]=t=n.$handleEvent(t),n.isSuce?n.finish():n.know()}}},[n._v(n._s(n.isSuce?"完成":"我知道了"))])],1)],1):n._e()],1)},s=[]}}]);