(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-edit-phone-edit-phone"],{"0932":function(n,e,t){"use strict";t.r(e);var o=t("1df1"),i=t.n(o);for(var s in o)"default"!==s&&function(n){t.d(e,n,(function(){return o[n]}))}(s);e["default"]=i.a},"1c5c":function(n,e,t){var o=t("acbd");"string"===typeof o&&(o=[[n.i,o,""]]),o.locals&&(n.exports=o.locals);var i=t("4f06").default;i("02c02afd",o,!0,{sourceMap:!1,shadowMode:!1})},"1df1":function(n,e,t){"use strict";t("d3b7"),t("4d63"),t("ac1f"),t("25f0"),t("466d"),t("841c"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t("4b9e"),i={data:function(){return{countDown:0,phone:"",sms:"",isEdit:!1,isSend:!0,old:"",isPhone:!1,isSuce:!0,errMsg:"",store_id:""}},onLoad:function(n){this.old=n.old?n.old:"",this.store_id=uni.getStorageSync("storeInfo").id},methods:{finish:function(){uni.reLaunch({url:"../my-order/my-order"})},know:function(){this.isPhone=!1},sendCode:function(){var n=this,e=this;return e.countDown?(uni.showModal({content:"验证码已发送,请稍后重试",showCancel:!1}),!1):e.phone&&11==e.phone.length?void(0,o.sendCode)({phone:e.phone}).then((function(e){if(200!=e.code)return uni.showModal({content:e.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)},getUrlParam:function(n){var e=new RegExp("(^|&)"+n+"=([^&]*)(&|$)"),t=window.location.search.substr(1).match(e);return null!=t?decodeURIComponent(t[2]):""},submit:function(){var n=this,e=this;return e.phone&&11==e.phone.length?e.sms&&6==e.sms.length?!!e.isSend&&(e.isSend=!1,void(0,o.editPhone)({phone:this.phone,phone_code:this.sms}).then((function(e){n.isPhone=!0,200==e.code?(n.isSuce=!0,1===e.data.is_login&&(uni.removeStorageSync("userToken"),window.location.href="https://weidian.jiuweiyun.cn/web/user#/pages/login/login?store_id=".concat(n.store_id))):(n.isSuce=!1,n.errMsg=e.msg)})).catch((function(n){})).finally((function(){e.isSend=!0}))):(uni.showModal({content:"验证码格式不正确"}),!1):(uni.showModal({content:"手机号格式不正确"}),!1)}}};e.default=i},"2efb":function(n,e,t){"use strict";var o=t("1c5c"),i=t.n(o);i.a},acbd:function(n,e,t){var o=t("24fb");e=o(!1),e.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-4de9c642]{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-4de9c642]{width:%?600?%;height:%?478?%;text-align:center;border-radius:%?24?%;background:#fff;z-index:9999}.phone_pop .pop_con uni-image[data-v-4de9c642]{width:%?150?%;height:%?114?%;margin-top:%?30?%;margin-left:%?10?%}.phone_pop .pop_con .hint[data-v-4de9c642]{font-size:%?36?%;font-weight:700;margin:%?20?% 0 %?40?%}.phone_pop .pop_con .sub_btn[data-v-4de9c642]{margin-top:%?50?%}.phone[data-v-4de9c642]{width:%?690?%;margin:0 auto;padding-top:%?40?%}.phone .title[data-v-4de9c642]{font-size:%?32?%;margin-bottom:%?30?%;font-weight:700}.phone .phone_num[data-v-4de9c642]{line-height:%?104?%}.phone .phone_num[data-v-4de9c642],\r\n.phone .phone_inp > uni-view[data-v-4de9c642]{height:%?104?%;border-bottom:%?2?% solid #eee}.phone .code[data-v-4de9c642]{height:%?60?%;padding:0 %?25?%;line-height:%?60?%;color:#fb231f;background:#fff4f3;border-radius:%?30?%}.phone .sub_btn[data-v-4de9c642]{margin-top:%?224?%}',""]),n.exports=e},bd3a:function(n,e,t){"use strict";t.r(e);var o=t("e412"),i=t("0932");for(var s in i)"default"!==s&&function(n){t.d(e,n,(function(){return i[n]}))}(s);t("2efb");var a,c=t("f0c5"),r=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,"4de9c642",null,!1,o["a"],a);e["default"]=r.exports},e412:function(n,e,t){"use strict";var o;t.d(e,"b",(function(){return i})),t.d(e,"c",(function(){return s})),t.d(e,"a",(function(){return o}));var i=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("v-uni-view",{staticClass:"phone"},[t("v-uni-view",{staticClass:"title"},[n._v("原手机号:"+n._s(n.old))]),t("v-uni-view",{staticClass:"phone_inp"},[t("v-uni-input",{staticClass:"phone_num",attrs:{type:"number",placeholder:"请输入新手机号",maxlength:"11",disabled:n.isEdit},model:{value:n.phone,callback:function(e){n.phone=e},expression:"phone"}}),t("v-uni-view",{staticClass:"flexB"},[t("v-uni-input",{attrs:{type:"number",placeholder:"请输入验证码",maxlength:"6"},model:{value:n.sms,callback:function(e){n.sms=e},expression:"sms"}}),t("v-uni-view",{staticClass:"code",on:{click:function(e){arguments[0]=e=n.$handleEvent(e),n.sendCode.apply(void 0,arguments)}}},[n._v(n._s(n.countDown?"重新获取("+n.countDown+"s)":"获取验证码"))])],1)],1),t("v-uni-view",{staticClass:"sub_btn",on:{click:function(e){arguments[0]=e=n.$handleEvent(e),n.submit.apply(void 0,arguments)}}},[n._v("保存")]),n.isPhone?t("v-uni-view",{staticClass:"phone_pop flexCC"},[t("v-uni-view",{staticClass:"pop_con"},[t("v-uni-image",{attrs:{src:n.isSuce?"/static/imgs/index/suce.png":"/static/imgs/index/fail.png"}}),t("v-uni-view",{staticClass:"hint"},[n._v("手机号修改"+n._s(n.isSuce?"成功":"失败"))]),t("v-uni-view",[t("v-uni-text",{staticClass:"gray"},[n._v(n._s(n.isSuce?"您的手机号是:":n.errMsg))]),n.isSuce?t("v-uni-text",{staticStyle:{color:"#EA4A41"}},[n._v(n._s(n.phone))]):n._e()],1),t("v-uni-view",{staticClass:"sub_btn",on:{click:function(e){arguments[0]=e=n.$handleEvent(e),n.isSuce?n.finish():n.know()}}},[n._v(n._s(n.isSuce?"完成":"我知道了"))])],1)],1):n._e()],1)},s=[]}}]);