pages-member-setting-AccountSet.eb885850.js 19 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-member-setting-AccountSet"],{4218:function(e,t,i){"use strict";var n=i("9fec"),s=i.n(n);s.a},"868d":function(e,t,i){"use strict";i("7a82");var n=i("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=n(i("5530")),a=i("0b9f"),o=n(i("cce0")),r=n(i("7b4a")),l=i("26cb"),u=i("a921"),m=n(i("9e89")),c=i("8e05"),d=n(i("f522")),p={components:{TitleHeader:o.default,MemberBase:r.default,flexLine:d.default,CommonSendCode:m.default},name:"MemberSetting",data:function(){return{navHeight:0,screenWidth:0,authType:"mobile",paypwd1:"",paypwd2:"",mobile:"",email:"",password1:"",password2:"",verifyCodeMobile:"",canSendMobile:!0,timeIntervalMobile:!1,sendStateTextMobile:"发送",canSendEmail:!0,timeIntervalEmail:!1,sendStateTextEmail:"发送"}},beforeDestroy:function(){clearInterval(this.timeIntervalMobile),clearInterval(this.timeIntervalEmail)},created:function(){this.getMemberInfo()},computed:(0,s.default)({fontSize:function(){return(0,a.getFontSize)()}},(0,l.mapState)({user:function(e){return e.member.info}})),mounted:function(){this.screenWidth=uni.getSystemInfoSync().screenWidth},methods:(0,s.default)((0,s.default)({getMemberInfo:function(){var e=this;(0,u.getMemberInfo)().then((function(t){e.memberUpdate({info:t.result.member_info}),t.result.member_info.member_emailbind||(e.email=t.result.member_info.member_email),t.result.member_info.member_mobilebind||(e.mobile=t.result.member_info.member_mobile)}),(function(e){}))},showPopup:function(e){this.$refs[e].open()},hidePopup:function(e){this.$refs[e].close()},goBack:function(){uni.navigateBack({delta:1})}},(0,l.mapMutations)({memberUpdate:"memberUpdate",memberEdit:"memberEdit",memberLogout:"memberLogout"})),{},{logout:function(){var e=this;(0,u.logout)(this.user.member_name).then((function(t){e.memberLogout(),uni.navigateTo({url:"/pages/home/memberlogin/Login"})})).catch((function(e){uni.showToast({icon:"none",title:e.message})}))},popupVisible:function(e){switch(this.authType=e,e){case"mobile":this.user.member_mobilebind&&this.user.member_mobile?this.showPopup("sendAuthCode"):this.showPopup("editMobileVisible");break;case"email":this.user.member_emailbind&&this.user.member_email?this.showPopup("sendAuthCode"):this.showPopup("editEmailVisible");break;case"password":this.showPopup("sendAuthCode");break;case"paypwd":this.showPopup("sendAuthCode");break}},checkSuccess:function(){switch(this.hidePopup("sendAuthCode"),this.authType){case"mobile":this.showPopup("editMobileVisible");break;case"email":this.showPopup("editEmailVisible");break;case"password":this.showPopup("editPasswordVisible");break;case"paypwd":this.showPopup("editPaypwdVisible");break}},updateMobile:function(){var e=this;(0,c.updateUserMobile)(this.verifyCodeMobile).then((function(t){e.memberEdit({member_mobile:e.mobile,member_mobilebind:1}),uni.showToast({icon:"none",title:t.message}),e.getMemberInfo(),e.hidePopup("editMobileVisible")})).catch((function(e){uni.showToast({icon:"none",title:e.message})}))},updatePassword:function(){var e=this;(0,c.updateUserPassword)(this.password1,this.password2).then((function(t){uni.showToast({icon:"none",title:t.message}),e.getMemberInfo(),e.hidePopup("editPasswordVisible")})).catch((function(e){uni.showToast({icon:"none",title:e.message})}))},updatePaypwd:function(){var e=this;(0,c.updateUserPaypwd)(this.paypwd1,this.paypwd2).then((function(t){uni.showToast({icon:"none",title:t.message}),e.getMemberInfo(),e.hidePopup("editPaypwdVisible")})).catch((function(e){uni.showToast({icon:"none",title:e.message})}))},sendVerifyCodeMobile:function(){var e=this;this.canSendMobile&&(0,c.bindUserMobile)(this.mobile).then((function(t){e.memberEdit({member_mobile:e.mobile,member_mobilebind:0}),e.canSendMobile=!1;var i=60;uni.showToast({icon:"none",title:t.message});var n=e;e.timeIntervalMobile=setInterval((function(){i<=0?(n.canSendMobile=!0,n.sendStateTextMobile="发送",clearInterval(n.timeIntervalMobile)):n.sendStateTextMobile=i+"s",i--}),1e3)})).catch((function(e){uni.showToast({icon:"none",title:e.message})}))},sendVerifyCodeEmail:function(){var e=this;this.canSendEmail&&(0,c.bindUserEmail)(this.email).then((function(t){e.memberEdit({member_email:e.email,member_emailbind:0}),e.canSendEmail=!1;var i=60;uni.showToast({icon:"none",title:t.message});var n=e;e.timeIntervalEmail=setInterval((function(){i<=0?(n.canSendEmail=!0,n.sendStateTextEmail="发送",clearInterval(n.timeIntervalEmail)):n.sendStateTextEmail=i+"s",i--}),1e3)})).catch((function(e){uni.showToast({icon:"none",title:e.message})}))}})};t.default=p},"9fec":function(e,t,i){var n=i("eec90");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var s=i("4f06").default;s("858ddd16",n,!0,{sourceMap:!1,shadowMode:!1})},a921:function(e,t,i){"use strict";i("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.uploadMemberAvatar=t.uploadAuth=t.updateMemberInfo=t.updateMemberAuth=t.logout=t.goodsPoster=t.getMemberInfo=t.getMemberIndex=t.dropAuth=void 0;var n=i("887c");t.logout=function(e){return(0,n.requestApi)("/Logout/index","POST",{username:e,client:"wap"},"member")};t.getMemberIndex=function(){return(0,n.requestApi)("/Member/index","POST",{},"member")};t.getMemberInfo=function(){return(0,n.requestApi)("/Member/information","POST",{},"member")};t.updateMemberInfo=function(e){return(0,n.requestApi)("/Member/edit_information","POST",{member_nickname:e.member_nickname,member_qq:e.member_qq,member_ww:e.member_ww,member_birthday:e.member_birthday},"member")};t.uploadMemberAvatar=function(e){return(0,n.requestApi)("/Member/edit_memberavatar","POST",e,"member",!0)};t.uploadAuth=function(e){return(0,n.requestApi)("/Member/edit_auth","POST",e,"member",!0)};t.dropAuth=function(e){return(0,n.requestApi)("/Member/drop_auth","POST",{file_name:e},"member")};t.updateMemberAuth=function(e,t,i){return(0,n.requestApi)("/Member/auth","POST",{member_truename:e,member_idcard:t,if_confirm:i},"member")};t.goodsPoster=function(e){return(0,n.requestApi)("/Member/goods_poster","POST",{goods_id:e},"member")}},ce19:function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return n}));var n={pageMeta:i("6d42").default,uniNavBar:i("7bfb").default,uniPopup:i("3ae3").default},s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",[i("page-meta",{attrs:{"root-font-size":e.fontSize+"px"}}),i("member-base",{attrs:{show:!1}},[e.user?i("v-uni-view",{staticClass:"div member-account-set"},[i("v-uni-view",{staticClass:"div common-header-wrap"},[i("v-uni-view",{style:"height:"+e.navHeight+"px"}),i("v-uni-view",{staticClass:"common-header-holder"}),i("v-uni-view",{staticClass:"common-header-fixed"},[i("title-header"),i("uni-nav-bar",{staticClass:"common-header",attrs:{title:"账号设置","left-icon":"back"},on:{clickLeft:function(t){arguments[0]=t=e.$handleEvent(t),e.goBack()}}})],1)],1),i("v-uni-view",{staticClass:"div main-content"},[i("v-uni-view",{staticClass:"div menu-list"},[i("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:e.user.member_mobilebind&&e.user.member_mobile||e.user.member_emailbind&&e.user.member_email,expression:"(user.member_mobilebind && user.member_mobile) || (user.member_emailbind && user.member_email)"}],staticClass:"div",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.popupVisible("password")}}},[i("flex-line",{staticClass:"menu-item",attrs:{"is-link":!0,"show-border":!0}},[i("v-uni-text",{staticClass:"span line-name"},[e._v("修改登录密码")])],1)],1),i("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:e.user.member_mobilebind&&e.user.member_mobile||e.user.member_emailbind&&e.user.member_email,expression:"(user.member_mobilebind && user.member_mobile) || (user.member_emailbind && user.member_email)"}],staticClass:"div",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.popupVisible("paypwd")}}},[i("flex-line",{staticClass:"menu-item",attrs:{"is-link":!0,"show-border":!0}},[i("v-uni-text",{staticClass:"span line-name"},[e._v("修改支付密码")])],1)],1),i("v-uni-view",{staticClass:"div",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.popupVisible("mobile")}}},[i("flex-line",{staticClass:"menu-item",attrs:{"is-link":!0,"show-border":!0}},[i("v-uni-text",{staticClass:"span line-name"},[e._v(e._s((e.user.member_mobilebind?"修改":"绑定")+"手机"))]),i("v-uni-text",{staticClass:"span",attrs:{slot:"right"},slot:"right"},[e._v(e._s(e.user.member_mobile))])],1)],1),i("v-uni-view",{staticClass:"div",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.popupVisible("email")}}},[i("flex-line",{staticClass:"menu-item",attrs:{"is-link":!0,"show-border":!0}},[i("v-uni-text",{staticClass:"span line-name"},[e._v(e._s((e.user.member_emailbind?"修改":"绑定")+"邮箱"))]),i("v-uni-text",{staticClass:"span",attrs:{slot:"right"},slot:"right"},[e._v(e._s(e.user.member_email))])],1)],1)],1),i("v-uni-view",{staticClass:"div pt-10 pb-10"},[i("v-uni-view",{staticClass:"div common-btn ds-button-large",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.logout.apply(void 0,arguments)}}},[e._v("退出登录")])],1)],1),i("uni-popup",{ref:"editMobileVisible",attrs:{"background-color":"#fff",type:"right"}},[i("v-uni-view",{staticClass:"common-popup-wrapper",style:"width:"+e.screenWidth+"px"},[i("v-uni-view",{staticClass:"div common-header-wrap"},[i("v-uni-view",{style:"height:"+e.navHeight+"px"}),i("v-uni-view",{staticClass:"common-header-holder"}),i("v-uni-view",{staticClass:"common-header-fixed"},[i("title-header"),i("uni-nav-bar",{staticClass:"common-header",attrs:{title:(e.user.member_mobilebind?"修改":"绑定")+"手机","left-icon":"back"},on:{clickLeft:function(t){arguments[0]=t=e.$handleEvent(t),e.hidePopup("editMobileVisible")}}})],1)],1),i("v-uni-view",{staticClass:"div common-popup-content"},[i("flex-line",{staticClass:"field-line menu-item",attrs:{"show-border":!0}},[i("v-uni-text",{staticClass:"span field-name"},[e._v("手机")]),i("v-uni-view",{staticClass:"div field-line-right",attrs:{slot:"right"},slot:"right"},[i("v-uni-input",{staticClass:"field-input",attrs:{type:"number",attr:{oninput:"if(value.length>11)value=value.slice(0,11)"}},model:{value:e.mobile,callback:function(t){e.mobile=t},expression:"mobile"}})],1)],1),i("flex-line",{staticClass:"field-line",attrs:{"show-border":!0}},[i("v-uni-text",{staticClass:"span field-name"},[e._v("验证码")]),i("v-uni-view",{staticClass:"div field-line-right",attrs:{slot:"right"},slot:"right"},[i("v-uni-input",{staticClass:"field-input",attrs:{type:"number",attr:{oninput:"if(value.length>6)value=value.slice(0,6)"}},model:{value:e.verifyCodeMobile,callback:function(t){e.verifyCodeMobile=t},expression:"verifyCodeMobile"}}),i("v-uni-view",{staticClass:"div common-btn send-btn",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.sendVerifyCodeMobile.apply(void 0,arguments)}}},[e._v(e._s(e.sendStateTextMobile))])],1)],1),i("v-uni-view",{staticClass:"div common-btn ds-button-large mt-10",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.updateMobile.apply(void 0,arguments)}}},[e._v("提交")])],1)],1)],1),i("uni-popup",{ref:"editEmailVisible",attrs:{"background-color":"#fff",type:"right"}},[i("v-uni-view",{staticClass:"common-popup-wrapper",style:"width:"+e.screenWidth+"px"},[i("v-uni-view",{staticClass:"div common-header-wrap"},[i("v-uni-view",{style:"height:"+e.navHeight+"px"}),i("v-uni-view",{staticClass:"common-header-holder"}),i("v-uni-view",{staticClass:"common-header-fixed"},[i("title-header"),i("uni-nav-bar",{staticClass:"common-header",attrs:{title:(e.user.member_emailbind?"修改":"绑定")+"邮箱","left-icon":"back"},on:{clickLeft:function(t){arguments[0]=t=e.$handleEvent(t),e.hidePopup("editEmailVisible")}}})],1)],1),i("v-uni-view",{staticClass:"div common-popup-content"},[i("v-uni-scroll-view",{staticStyle:{position:"absolute",top:"0",right:"0",left:"0",bottom:"0"},attrs:{"scroll-y":"true"}},[i("v-uni-view",{staticClass:"main-content"},[i("flex-line",{staticClass:"field-line menu-item",attrs:{"show-border":!0}},[i("v-uni-text",{staticClass:"span field-name"},[e._v("邮箱")]),i("v-uni-view",{staticClass:"div field-line-right",attrs:{slot:"right"},slot:"right"},[i("v-uni-input",{staticClass:"field-input",model:{value:e.email,callback:function(t){e.email=t},expression:"email"}})],1)],1),i("v-uni-view",{staticClass:"div common-btn ds-button-large mt-10",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.sendVerifyCodeEmail.apply(void 0,arguments)}}},[e._v("提交")])],1)],1)],1)],1)],1),i("uni-popup",{ref:"editPasswordVisible",attrs:{"background-color":"#fff",type:"right"}},[i("v-uni-view",{staticClass:"common-popup-wrapper",style:"width:"+e.screenWidth+"px"},[i("v-uni-view",{staticClass:"div common-header-wrap"},[i("v-uni-view",{style:"height:"+e.navHeight+"px"}),i("v-uni-view",{staticClass:"common-header-holder"}),i("v-uni-view",{staticClass:"common-header-fixed"},[i("title-header"),i("uni-nav-bar",{staticClass:"common-header",attrs:{title:"修改登录密码","left-icon":"back"},on:{clickLeft:function(t){arguments[0]=t=e.$handleEvent(t),e.hidePopup("editPasswordVisible")}}})],1)],1),i("v-uni-view",{staticClass:"div common-popup-content"},[i("v-uni-scroll-view",{staticStyle:{position:"absolute",top:"0",right:"0",left:"0",bottom:"0"},attrs:{"scroll-y":"true"}},[i("flex-line",{staticClass:"field-line menu-item",attrs:{"show-border":!0}},[i("v-uni-text",{staticClass:"span field-name"},[e._v("新密码")]),i("v-uni-view",{staticClass:"div field-line-right",attrs:{slot:"right"},slot:"right"},[i("v-uni-input",{staticClass:"field-input",attrs:{type:"password"},model:{value:e.password1,callback:function(t){e.password1=t},expression:"password1"}})],1)],1),i("flex-line",{staticClass:"field-line menu-item",attrs:{"show-border":!0}},[i("v-uni-text",{staticClass:"span field-name"},[e._v("确认密码")]),i("v-uni-view",{staticClass:"div field-line-right",attrs:{slot:"right"},slot:"right"},[i("v-uni-input",{staticClass:"field-input",attrs:{type:"password"},model:{value:e.password2,callback:function(t){e.password2=t},expression:"password2"}})],1)],1),i("v-uni-view",{staticClass:"div common-btn ds-button-large mt-10",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.updatePassword.apply(void 0,arguments)}}},[e._v("提交")])],1)],1)],1)],1),i("uni-popup",{ref:"editPaypwdVisible",attrs:{"background-color":"#fff",type:"right"}},[i("v-uni-view",{staticClass:"common-popup-wrapper",style:"width:"+e.screenWidth+"px"},[i("v-uni-view",{staticClass:"div common-header-wrap"},[i("v-uni-view",{style:"height:"+e.navHeight+"px"}),i("v-uni-view",{staticClass:"common-header-holder"}),i("v-uni-view",{staticClass:"common-header-fixed"},[i("title-header"),i("uni-nav-bar",{staticClass:"common-header",attrs:{title:"修改支付密码","left-icon":"back"},on:{clickLeft:function(t){arguments[0]=t=e.$handleEvent(t),e.hidePopup("editPaypwdVisible")}}})],1)],1),i("v-uni-view",{staticClass:"div common-popup-content"},[i("v-uni-scroll-view",{staticStyle:{position:"absolute",top:"0",right:"0",left:"0",bottom:"0"},attrs:{"scroll-y":"true"}},[i("flex-line",{staticClass:"field-line menu-item",attrs:{"show-border":!0}},[i("v-uni-text",{staticClass:"span field-name"},[e._v("新密码")]),i("v-uni-view",{staticClass:"div field-line-right",attrs:{slot:"right"},slot:"right"},[i("v-uni-input",{staticClass:"field-input",attrs:{type:"password"},model:{value:e.paypwd1,callback:function(t){e.paypwd1=t},expression:"paypwd1"}})],1)],1),i("flex-line",{staticClass:"field-line menu-item",attrs:{"show-border":!0}},[i("v-uni-text",{staticClass:"span field-name"},[e._v("确认密码")]),i("v-uni-view",{staticClass:"div field-line-right",attrs:{slot:"right"},slot:"right"},[i("v-uni-input",{staticClass:"field-input",attrs:{type:"password"},model:{value:e.paypwd2,callback:function(t){e.paypwd2=t},expression:"paypwd2"}})],1)],1),i("v-uni-view",{staticClass:"div common-btn ds-button-large mt-10",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.updatePaypwd.apply(void 0,arguments)}}},[e._v("提交")])],1)],1)],1)],1),i("uni-popup",{ref:"sendAuthCode",attrs:{"background-color":"#fff",type:"right"}},[i("v-uni-view",{staticClass:"common-popup-wrapper",style:"width:"+e.screenWidth+"px"},[i("v-uni-view",{staticClass:"div common-header-wrap"},[i("v-uni-view",{style:"height:"+e.navHeight+"px"}),i("v-uni-view",{staticClass:"common-header-holder"}),i("v-uni-view",{staticClass:"common-header-fixed"},[i("title-header"),i("uni-nav-bar",{staticClass:"common-header",attrs:{title:"身份验证","left-icon":"back"},on:{clickLeft:function(t){arguments[0]=t=e.$handleEvent(t),e.hidePopup("sendAuthCode")}}})],1)],1),i("v-uni-view",{staticClass:"div common-popup-content"},[i("v-uni-scroll-view",{staticStyle:{position:"absolute",top:"0",right:"0",left:"0",bottom:"0"},attrs:{"scroll-y":"true"}},[i("common-send-code",{on:{checkSuccess:function(t){arguments[0]=t=e.$handleEvent(t),e.checkSuccess.apply(void 0,arguments)}}})],1)],1)],1)],1)],1):e._e()],1)],1)},a=[]},e1e4:function(e,t,i){"use strict";i.r(t);var n=i("ce19"),s=i("e476");for(var a in s)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return s[e]}))}(a);i("4218");var o=i("f0c5"),r=Object(o["a"])(s["default"],n["b"],n["c"],!1,null,"180a88f8",null,!1,n["a"],void 0);t["default"]=r.exports},e476:function(e,t,i){"use strict";i.r(t);var n=i("868d"),s=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(a);t["default"]=s.a},eec90:function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.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/* 文章场景相关 */.main-content[data-v-180a88f8]{background:#fff;padding:0 .6rem}.common-popup-content[data-v-180a88f8]{padding:0 .6rem;box-sizing:border-box}.send-btn[data-v-180a88f8]{border:1px solid #fb2630;color:#fb2630;min-width:2rem}.member-account-set[data-v-180a88f8]{position:relative;z-index:100}.member-account-set .menu-list .menu-item .right-arrow[data-v-180a88f8]{-webkit-transform:rotate(-90deg);transform:rotate(-90deg);color:#ddd;font-size:.6rem}',""]),e.exports=t}}]);