1 line
19 KiB
JavaScript
1 line
19 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-me-index"],{"0335":function(e,t,a){var n=a("e8b5");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=a("967d").default;i("877912f6",n,!0,{sourceMap:!1,shadowMode:!1})},"49a5d":function(e,t,a){"use strict";var n=a("0335"),i=a.n(n);i.a},c047:function(e,t,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("fd3c");var i=n(a("2634")),o=n(a("2fdc")),s=a("e789"),r=n(a("02ea")),l=n(a("a239")),c=n(a("9849")),d=a("d3ac"),u=n(a("c591")),m={data:function(){return{emailCode:"",googleCode:"",emaiTip:"發送",googleTip:"發送",acconToAdress:"",showPassword:!0,showpwdImg:"static/icon/eye_on.png",hidepwdImg:"static/icon/eye_off.png",newUserName:"",modalUserName:!1,exportType:"",allProvince:null,allCity:null,allArea:null,modalName:!1,modalNameZj:!1,zhifuMima:"",userInfos:{},userMnemonic:"",userPrivateKey:"",srcollList:[{title:"邀請好友",img:"/static/icon/tongxunlu.png"},{title:"推薦客戶",img:"/static/icon/tuandui1.png"},{title:"導出助記詞",img:"/static/icon/zhuciqi.png"},{title:"導出私鑰",img:"/static/icon/yinsi.png"},{title:"修改密碼",img:"/static/icon/qianbao.png"},{title:"重置密碼",img:"/static/icon/reset.png"}]}},watch:{modalName:{handler:function(e){0==e&&(this.emailCode="",this.googleCode="",this.zhifuMima="",this.emaiTip="發送",this.googleTip="發送")}}},onShow:function(){this.allProvince=c.default,this.allCity=l.default,this.allArea=r.default},mounted:function(){this.getUserInfos()},methods:{tosendemail:function(){var e=this;return(0,o.default)((0,i.default)().mark((function t(){var a,n,o;return(0,i.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if("發送"!=e.emaiTip){t.next=9;break}return a=60,n=setInterval((function(){e.emaiTip=a+"s",a--,a<0&&(e.emaiTip="發送",clearInterval(n))}),1e3),t.next=5,(0,d._emailSend)({email:e.userInfos.email,event:"check"});case 5:o=t.sent,1===o.code?uni.showToast({title:"發送成功",icon:"none"}):uni.showToast({title:o.msg,icon:"none"}),t.next=10;break;case 9:return t.abrupt("return");case 10:case"end":return t.stop()}}),t)})))()},googleemail:function(){var e=this,t=60,a=setInterval((function(){e.googleTip=t+"s",t--,t<0&&(e.googleTip="發送",clearInterval(a))}),1e3)},privateKeyOptions:function(e){var t=e.substring(0,26),a=e.substring(e.length-4),n=t+"…"+a;return n},changePassword:function(){this.showPassword=!this.showPassword},submitUserName:function(){var e=this;return(0,o.default)((0,i.default)().mark((function t(){var a,n;return(0,i.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.newUserName){t.next=3;break}return uni.showToast({title:"請輸入新用戶名",icon:"none"}),t.abrupt("return");case 3:return a={nickname:e.newUserName,newpassword:"",newpaykey:""},t.next=6,(0,d._profile)(a);case 6:n=t.sent,1===n.code&&(uni.showToast({title:"修改成功",icon:"success",duration:1e3}),e.newUserName="",e.modalUserName=!1,e.getUserInfos());case 8:case"end":return t.stop()}}),t)})))()},copyAdress:function(e){uni.setClipboardData({data:e,success:function(){uni.showToast({title:"複製成功",icon:"success"})}})},chineseCity:function(e){var t=this,a="",n="";if(e){var i=e.substring(0,2),o=e.substring(0,4);return t.allProvince.map((function(s,r){if(s.value==i){if(a=s.label,"00"==o)return;t.allCity[r].map((function(a,i){a.value==o&&t.allArea[r][i].map((function(t,a){t.value==e&&(n=t.label)}))}))}})),a+n}return""},getUserInfos:function(){var e=this;return(0,o.default)((0,i.default)().mark((function t(){var a;return(0,i.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,d._userInfos)();case 2:a=t.sent,1===a.code&&(e.userInfos=a.data.userinfo,console.log("userInfos",e.userInfos));case 4:case"end":return t.stop()}}),t)})))()},copeZhuji:function(e){uni.setClipboardData({data:e,success:function(){uni.showToast({title:"複製成功",icon:"success"})}})},modalBtn:function(){var e=this;return(0,o.default)((0,i.default)().mark((function t(){var a,n,o;return(0,i.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.zhifuMima&&e.emailCode&&e.googleCode){t.next=2;break}return t.abrupt("return",uni.showToast({title:"請填寫正確資訊",icon:"none"}));case 2:return a={code:e.emailCode,googlecode:e.googleCode,paykey:(0,u.default)(e.zhifuMima+Math.floor(Date.now()/1e3)),timestamp:Math.floor(Date.now()/1e3)},t.next=5,(0,d._walletinfo)(a);case 5:if(n=t.sent,1!==n.code){t.next=21;break}return e.modalName=!1,t.next=10,(0,s.publicjiemi)(e.exportType,e.zhifuMima,e.userInfos.wallet.address);case 10:o=t.sent,console.log("sssss"),1==e.exportType?e.userMnemonic=o:e.userPrivateKey=o,e.modalNameZj=!0,e.emailCode="",e.googleCode="",e.zhifuMima="",e.emaiTip="發送",e.googleTip="發送",t.next=22;break;case 21:uni.showToast({title:n.msg,icon:"none"});case 22:case"end":return t.stop()}}),t)})))()},toShenfen:function(){uni.navigateTo({url:"/pages/myProxy/myProxy"})},userMoneyAdressOptions:function(e){var t=e.substring(0,4),a=e.substring(e.length-4),n=t+"…"+a;return n},listClick:function(e){switch(e){case"邀請好友":uni.navigateTo({url:"/pages/myuser/myuser"});break;case"推薦客戶":uni.navigateTo({url:"/pages/mymoney/allDetail?detailLabel=".concat(e)});break;case"修改關聯錢包":this.exportInfos(3);break;case"導出助記詞":this.exportInfos(1);break;case"導出私鑰":this.exportInfos(2);break;case"修改密碼":uni.navigateTo({url:"/pages/me/editUserInfo"});break;case"重置密碼":uni.navigateTo({url:"/pages/me/resetPwd"});break}},outlogin:function(){uni.removeStorageSync("token"),uni.reLaunch({url:"/pages/login/login"})},exportInfos:function(e){this.modalName=!0,this.exportType=e},handleInput:function(e){this.zhifuMima=e}}};t.default=m},c460:function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return o})),a.d(t,"a",(function(){return n}));var n={uIcon:a("ec95").default,"u-Input":a("e087").default},i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.userInfos.token?a("v-uni-view",{staticClass:"me_container"},[a("v-uni-view",{staticClass:"m_c_header"},[a("v-uni-view",{staticClass:"header_top"},[a("v-uni-view",{staticClass:"h_t_left"},[a("v-uni-view",{staticClass:"avt"},[a("v-uni-image",{attrs:{src:e.userInfos.avatar,mode:""}})],1),a("v-uni-view",{staticClass:"identity"},[a("v-uni-view",{on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.modalUserName=!0}}},[e._v(e._s(e.userInfos.nickname))]),a("v-uni-view",{staticStyle:{"margin-top":"20rpx","font-size":"28rpx"}},[e._v("身份資格:"+e._s(e.userInfos.level_text.title))])],1)],1),a("v-uni-view",{staticClass:"h_t_right",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toShenfen.apply(void 0,arguments)}}},[e._v("升級")])],1)],1),a("v-uni-view",{staticStyle:{padding:"30rpx"}},[a("v-uni-view",{staticStyle:{"background-color":"#3B3D83","border-radius":"30rpx 30rpx 0 0"}},[a("v-uni-scroll-view",{staticClass:"m_c_footer",attrs:{"scroll-y":"true"}},[a("v-uni-view",{staticStyle:{padding:"0 30rpx"}},e._l(e.srcollList,(function(t,n){return a("v-uni-view",{key:n,staticClass:"listBox",on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.listClick(t.title)}}},[a("v-uni-view",{staticClass:"l_left"},[a("v-uni-view",{staticClass:"l_icon"},[a("v-uni-image",{attrs:{src:t.img,mode:"widthFix"}})],1),a("v-uni-view",{staticClass:"l_title",staticStyle:{"margin-left":"30rpx"}},[e._v(e._s(t.title))])],1),a("v-uni-view",{staticClass:"l_right"},[a("u-icon",{attrs:{name:"arrow-right",color:"#FFF",size:"16"}})],1)],1)})),1)],1)],1)],1),a("v-uni-view",{staticClass:"outlogin"},[a("v-uni-view",{staticClass:"out_cent",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.outlogin.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"out_img"},[a("v-uni-image",{attrs:{src:"/static/icon/uid.png",mode:""}})],1),a("v-uni-view",{staticClass:"out"},[e._v("退出登錄")])],1)],1),e.modalUserName?a("v-uni-view",{staticClass:"modal"},[a("v-uni-view",{staticClass:"modal-content"},[a("v-uni-view",{staticClass:"modal-header"},[a("v-uni-view",{staticClass:"zz_content"},[e._v("請輸入新用戶名")])],1),a("v-uni-view",{staticClass:"modal-body"},[a("v-uni-view",{staticClass:"modal-item"},[a("v-uni-text",{staticClass:"modal-label"},[e._v("用戶名:")]),a("v-uni-input",{staticStyle:{flex:"1"},attrs:{type:"text"},model:{value:e.newUserName,callback:function(t){e.newUserName=t},expression:"newUserName"}})],1)],1),a("v-uni-view",{staticClass:"modal-footer"},[a("v-uni-button",{staticClass:"modal-button cancel",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.modalUserName=!1}}},[e._v("取消")]),a("v-uni-button",{staticClass:"modal-button confirm",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.submitUserName.apply(void 0,arguments)}}},[e._v("確定")])],1)],1)],1):e._e(),e.modalName?a("v-uni-view",{staticClass:"modal"},[a("v-uni-view",{staticClass:"modal-content"},[a("v-uni-view",{staticClass:"modal-header"},[a("v-uni-view",{staticClass:"zz_content"},[e._v("請輸入驗證信息")])],1),a("v-uni-view",{staticClass:"modal-body"},[a("v-uni-view",{staticClass:"modal-item zf_mod_item"},[a("v-uni-text",{staticClass:"modal-label"},[e._v("郵箱:")]),a("v-uni-view",{},[e._v(e._s(e.userInfos.email))])],1),a("v-uni-view",{staticClass:"modal-item zf_mod_item"},[a("v-uni-text",{staticClass:"modal-label"},[e._v("支付密碼:")]),a("u--input",{staticStyle:{width:"70%"},attrs:{color:"#fff",value:e.zhifuMima,password:e.showPassword,border:"none"},on:{input:function(t){arguments[0]=t=e.$handleEvent(t),e.handleInput.apply(void 0,arguments)}}}),a("img",{staticStyle:{width:"50rpx",height:"50rpx"},attrs:{src:e.showPassword?e.hidepwdImg:e.showpwdImg},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.changePassword.apply(void 0,arguments)}}})],1),a("v-uni-view",{staticClass:"modal-item zf_mod_item"},[a("v-uni-text",{staticClass:"modal-label"},[e._v("郵箱驗證碼:")]),a("u--input",{staticStyle:{width:"70%"},attrs:{color:"#fff",border:"none"},model:{value:e.emailCode,callback:function(t){e.emailCode=t},expression:"emailCode"}}),a("v-uni-view",{staticClass:"sendcode",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.tosendemail.apply(void 0,arguments)}}},[e._v(e._s(e.emaiTip))])],1),a("v-uni-view",{staticClass:"modal-item zf_mod_item"},[a("v-uni-text",{staticClass:"modal-label"},[e._v("谷歌驗證碼:")]),a("u--input",{staticStyle:{width:"70%"},attrs:{color:"#fff",border:"none"},model:{value:e.googleCode,callback:function(t){e.googleCode=t},expression:"googleCode"}}),a("v-uni-view",{staticClass:"sendcode",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.googleemail.apply(void 0,arguments)}}},[e._v(e._s(e.googleTip))])],1)],1),a("v-uni-view",{staticClass:"modal-footer"},[a("v-uni-button",{staticClass:"modal-button cancel",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.modalName=!1}}},[e._v("取消")]),a("v-uni-button",{staticClass:"modal-button confirm",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.modalBtn.apply(void 0,arguments)}}},[e._v("確定")])],1)],1)],1):e._e(),e.modalNameZj?a("v-uni-view",{staticClass:"modal"},[a("v-uni-view",{staticClass:"modal-content"},[a("v-uni-view",{staticClass:"modal-header"},[1==e.exportType||2==e.exportType?a("v-uni-view",{staticClass:"zz_content"},[e._v("點擊可複製:")]):e._e(),3==e.exportType?a("v-uni-view",{staticClass:"zz_content"},[e._v("關聯錢包")]):e._e()],1),1==e.exportType?a("v-uni-view",{staticClass:"modal-body",staticStyle:{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.copeZhuji(e.userMnemonic)}}},[e._v("助記詞:"+e._s(e.userMnemonic))]):e._e(),2==e.exportType?a("v-uni-view",{staticClass:"modal-body",staticStyle:{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.copeZhuji(e.userPrivateKey)}}},[e._v("私鑰:"+e._s(e.privateKeyOptions(e.userPrivateKey)))]):e._e(),3==e.exportType?a("v-uni-view",{staticClass:"modal-body"},[a("v-uni-view",{staticClass:"modal-item"},[a("v-uni-text",{staticClass:"modal-label"},[e._v("關聯地址:")]),a("v-uni-text",{staticClass:"modal-value",staticStyle:{"text-align":"left"}},[a("v-uni-input",{staticStyle:{color:"#fff"},attrs:{type:"text"},model:{value:e.acconToAdress,callback:function(t){e.acconToAdress=t},expression:"acconToAdress"}})],1)],1)],1):e._e(),a("v-uni-view",{staticClass:"modal-footer"},[a("v-uni-button",{staticClass:"modal-button cancel",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.modalNameZj=!1}}},[e._v("取消")]),a("v-uni-button",{staticClass:"modal-button confirm",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.modalNameZj=!1}}},[e._v("確定")])],1)],1)],1):e._e()],1):e._e()},o=[]},e3a0:function(e,t,a){"use strict";a.r(t);var n=a("c460"),i=a("eb56");for(var o in i)["default"].indexOf(o)<0&&function(e){a.d(t,e,(function(){return i[e]}))}(o);a("49a5d");var s=a("828b"),r=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"a2c21d4e",null,!1,n["a"],void 0);t["default"]=r.exports},e8b5:function(e,t,a){var n=a("c86c");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/* 文章场景相关 */.uni-flex[data-v-a2c21d4e]{display:flex;flex-direction:row}.uni-flex-item[data-v-a2c21d4e]{flex:1}.flex-item[data-v-a2c21d4e]{flex:1}.uni-row[data-v-a2c21d4e]{flex-direction:row}.uni-column[data-v-a2c21d4e]{flex-direction:column}.me_container[data-v-a2c21d4e]{border-top:1px solid #696969;width:100vw;min-height:100vh;background-color:#003;font-size:%?30?%}.me_container .m_c_header[data-v-a2c21d4e]{height:10%;color:#fff;padding:0 15px;box-sizing:border-box;position:relative}.me_container .m_c_header > uni-view[data-v-a2c21d4e]{margin-bottom:10px}.me_container .m_c_header .user_name[data-v-a2c21d4e]{position:absolute;left:15px;top:20px;font-size:10px;background-color:#4e538b;padding:5px 10px}.me_container .m_c_header .user_adress[data-v-a2c21d4e]{position:absolute;left:15px;top:50px;font-size:10px;background-color:#4e538b;padding:5px 10px}.me_container .m_c_header .btnSj[data-v-a2c21d4e]{background-color:#4caf50;width:40%;height:30px;line-height:30px;text-align:center;border-radius:15px}.me_container .header_top[data-v-a2c21d4e]{display:flex;justify-content:space-between;align-items:center;margin-top:%?80?%}.me_container .header_top .h_t_left[data-v-a2c21d4e]{display:flex;justify-content:space-between;align-items:center;height:%?120?%}.me_container .header_top .h_t_left .avt[data-v-a2c21d4e]{width:%?120?%;height:%?120?%;border-radius:50%}.me_container .header_top .h_t_left .identity[data-v-a2c21d4e]{font-size:%?40?%;margin-left:%?20?%}.me_container .header_top .h_t_right[data-v-a2c21d4e]{width:%?135?%;height:%?55?%;background-color:#263773;display:flex;justify-content:center;align-items:center;border-radius:%?30?%;font-size:%?24?%}.me_container .header_top uni-image[data-v-a2c21d4e]{width:100%;height:100%;border-radius:50%}.me_container .m_c_footer[data-v-a2c21d4e]{height:calc(75% - %?40?%);margin-top:%?40?%;box-sizing:border-box}.me_container .m_c_footer .listBox[data-v-a2c21d4e]{background-color:#3b3d83;height:%?120?%;width:100%;display:flex;align-items:center;justify-content:space-between;color:#fff;box-sizing:border-box;border-bottom:%?2?% solid #534a84}.me_container .m_c_footer .listBox .l_left[data-v-a2c21d4e]{display:flex}.me_container .m_c_footer .listBox uni-image[data-v-a2c21d4e]{width:%?40?%;height:%?40?%}.me_container .modal[data-v-a2c21d4e]{position:fixed;left:0;right:0;bottom:0;top:0;background-color:rgba(0,0,0,.6);display:flex;align-items:flex-end;z-index:999}.me_container .modal-content[data-v-a2c21d4e]{background-color:#b6b5c8;border-radius:20px 20px 0 0;padding:20px;box-sizing:border-box;width:100%;-webkit-animation:slideUp-data-v-a2c21d4e .3s ease-out;animation:slideUp-data-v-a2c21d4e .3s ease-out;box-shadow:0 -4px 10px rgba(0,0,0,.1)}@-webkit-keyframes slideUp-data-v-a2c21d4e{from{-webkit-transform:translateY(100%);transform:translateY(100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes slideUp-data-v-a2c21d4e{from{-webkit-transform:translateY(100%);transform:translateY(100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.me_container .modal-header[data-v-a2c21d4e]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.me_container .modal-title[data-v-a2c21d4e]{font-size:20px;font-weight:700;color:#333}.me_container .modal-close[data-v-a2c21d4e]{font-size:24px;color:#999;cursor:pointer}.me_container .modal-body[data-v-a2c21d4e]{margin-bottom:20px}.me_container .modal-item[data-v-a2c21d4e]{display:flex;margin-bottom:15px;padding-bottom:10px;border-bottom:1px solid #f0f0f0}.me_container .zf_mod_item[data-v-a2c21d4e]{display:flex;align-items:center}.me_container .modal-label[data-v-a2c21d4e]{color:#666;font-size:14px;margin-right:%?20?%}.me_container .modal-value[data-v-a2c21d4e]{flex:1;font-weight:700;color:#333;font-size:14px;word-break:break-all;text-align:right;overflow:hidden;\r\n /* 超出部分隱藏 */text-overflow:ellipsis;\r\n /* 超出部分顯示省略號 */white-space:nowrap\r\n /* 不換行 */}.me_container .modal-footer[data-v-a2c21d4e]{display:flex;justify-content:space-between}.me_container .modal-button[data-v-a2c21d4e]{width:48%;height:44px;border-radius:22px;font-size:16px;font-weight:700;border:none;cursor:pointer;transition:all .3s ease}.me_container .modal-button.cancel[data-v-a2c21d4e]{background-color:#f0f0f0;color:#333}.me_container .modal-button.cancel[data-v-a2c21d4e]:hover{background-color:#e0e0e0}.me_container .modal-button.confirm[data-v-a2c21d4e]{background-color:#4caf50;color:#fff}.me_container .modal-button.confirm[data-v-a2c21d4e]:hover{background-color:#45a049}.outlogin[data-v-a2c21d4e]{padding:0 %?30?%}.outlogin .out_cent[data-v-a2c21d4e]{background-color:#515496;width:100%;height:%?110?%;display:flex;justify-content:center;align-items:center;border-radius:%?10?%;color:#fff}.outlogin .out_cent .out_img[data-v-a2c21d4e]{width:%?60?%;height:%?60?%;margin-right:%?20?%}.outlogin .out_cent .out_img uni-image[data-v-a2c21d4e]{width:100%;height:100%}',""]),e.exports=t},eb56:function(e,t,a){"use strict";a.r(t);var n=a("c047"),i=a.n(n);for(var o in n)["default"].indexOf(o)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(o);t["default"]=i.a}}]); |