pages-public-login.74c89d29.js 11 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-public-login"],{"05ec":function(e,t,n){"use strict";function r(){var e=getCurrentPages();return e[e.length-1]}function o(){var e=r(),t="/"+e.route,n="/pages/public/login",o=uni.getStorageSync("weichatBrowser");o&&(n="/pages/public/wxLogin"),t!=n&&uni.navigateTo({url:n})}function a(){var e=u(!0);uni.setStorageSync("present",e)}function u(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=r(),n="/"+t.route,o="",a=Object.keys(t.options);if(a.length>0){for(var u in t.options)("speard"!=u||e)&&(o+=u+"="+t.options[u]+"&");n+="?"+o.substr(0,o.length-1)}return n}n("b64b"),Object.defineProperty(t,"__esModule",{value:!0}),t.getActionPage=r,t.interceptor=o,t.saveUrl=a,t.getPageUrl=u},2445:function(e,t,n){"use strict";var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n("5530")),a=n("26cb"),u=n("7ccc"),i={data:function(){return{email:"",lpwd:""}},onLoad:function(){},methods:(0,o.default)((0,o.default)({},(0,a.mapMutations)("user",["login","setUserInfo"])),{},{zc:function(){uni.navigateTo({url:"/pages/public/register"})},wjmm:function(){uni.navigateTo({url:"/pages/public/forget"})},gologin:function(){var e=this;if("loading"!=e.loadingType){if(!e.isEmailAvailable(e.email))return e.$api.msg("請輸入正確的郵箱!");e.loadingType="loading",(0,u.gologin)({email:e.email,lpwd:e.lpwd}).then((function(t){console.log(t),e.loadingType="no",uni.showToast({title:"登錄成功",duration:2e3,position:"top"}),(0,u.getUser)().then((function(t){e.login(),e.setUserInfo(t.data),setTimeout((function(){uni.switchTab({url:"/pages/index/index"})}),1500)}))})).catch((function(t){console.log(t),e.loadingType="no"}))}},isEmailAvailable:function(e){var t=/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;return!!t.test(e)}})};t.default=i},"4a8a":function(e,t,n){var r=n("24fb");t=r(!1),t.push([e.i,'@charset "UTF-8";\n/* 页面左右间距 */\n/* 文字尺寸 */\n/*文字颜色*/\n/* 边框颜色 */\n/*颜色*/\n/* 图片加载中颜色 */\n/* 行为相关颜色 */\n/* 功能栏字体大小 */\n/*功能栏左侧小图标*/uni-page-body[data-v-f8769540]{height:100%;background-color:#fff;font-size:%?32?%}.container[data-v-f8769540]{width:100%;height:100%;background-size:100%}.shuru[data-v-f8769540]{display:block;background-color:#f5f5f5;width:%?673?%;height:%?95?%;margin:auto;padding-left:%?30?%;text-align:%?95?%}.tit[data-v-f8769540]{padding:%?60?% %?48?% %?20?%}.gologin[data-v-f8769540]{width:%?204?%;height:%?98?%;line-height:%?98?%;background-color:#fcd535;text-align:center;border-radius:%?20?%}.wjmm[data-v-f8769540]{color:#fcd535}body.?%PAGE?%[data-v-f8769540]{background-color:#fff}',""]),e.exports=t},"4b21":function(e,t,n){var r=n("4a8a");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var o=n("4f06").default;o("5cdbecef",r,!0,{sourceMap:!1,shadowMode:!1})},"56c1":function(e,t,n){"use strict";var r=n("4b21"),o=n.n(r);o.a},"6dc4":function(e,t,n){"use strict";var r=n("4ea4");n("d3b7"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.upFilse=void 0;var o=r(n("ee6d")),a=r(n("6ec1")),u=n("05ec");o.default.interceptors.response((function(e){try{var t=e.data;return 1!==t.code?(console.log(t.status),3==t.code?(a.default.commit("user/logout"),uni.showModal({title:"登錄",content:"您未登錄!是否马上登錄?",confirmText:"確認",success:function(e){e.confirm&&((0,u.saveUrl)(),(0,u.interceptor)())}})):"系统出现异常"!=t.info&&uni.showToast({title:t.info,duration:1500,mask:!1,icon:"none"}),Promise.reject(t)):t}catch(n){console.log(n)}}),(function(e){return uni.showToast({title:"加载错误请重试",duration:1500,mask:!1,icon:"none"}),Promise.reject(e)})),o.default.interceptors.request((function(e){var t=uni.getStorageSync("token")||"";return e.header?e.header["Authori-zation"]="Bearer "+t:e.header={"Authori-zation":"Bearer "+t},e}),(function(e){return console.log(e),Promise.reject(e)}));var i=o.default.upFilse;t.upFilse=i;var c=o.default.open;t.default=c},"7ccc":function(e,t,n){"use strict";var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.register=a,t.verify=u,t.getUserInfo=i,t.loginMobile=c,t.bangding=s,t.gologin=l,t.getYzm=d,t.zc=f,t.getForget=p,t.resetpwd=g,t.getUser=h,t.loginout=v,t.changepass=m,t.upauthrz=w,t.coininfo=b,t.bill=y,t.transfer=x,t.tradelist=_;var o=r(n("6dc4"));function a(e){return(0,o.default)({url:"/register",method:"post",data:e})}function u(e){return(0,o.default)({url:"/register/verify",method:"post",data:e})}function i(e){return(0,o.default)({url:"/userinfo",method:"get",data:e})}function c(e){return(0,o.default)({url:"/login/mobile",method:"post",data:e})}function s(e){return(0,o.default)({url:"/binding",method:"POST",data:e})}function l(e){return(0,o.default)({url:"/Login/loginsubmit",method:"get",data:e})}function d(e){return(0,o.default)({url:"/Login/sendcode",method:"get",data:e})}function f(e){return(0,o.default)({url:"/Login/upregister",method:"get",data:e})}function p(e){return(0,o.default)({url:"/Login/findsendcode",method:"get",data:e})}function g(e){return(0,o.default)({url:"/Login/resetpwd",method:"post",data:e})}function h(e){return(0,o.default)({url:"/user/userinfo",method:"get",data:e})}function v(e){return(0,o.default)({url:"/Login/loginout",method:"get",data:e})}function m(e){return(0,o.default)({url:"/Index/sub_respwd",method:"get",data:e})}function w(e){return(0,o.default)({url:"/User/upauthrz",method:"get",data:e})}function b(e){return(0,o.default)({url:"/User/coininfo",method:"get",data:e})}function y(e){return(0,o.default)({url:"/User/bill",method:"get",data:e})}function x(e){return(0,o.default)({url:"/User/transfer",method:"get",data:e})}function _(e){return(0,o.default)({url:"/Trade/tradelist",method:"get",data:e})}},"9d77":function(e,t,n){"use strict";var r;n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return r}));var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"container"},[n("v-uni-view",{staticClass:"wjmm",staticStyle:{"text-align":"right","padding-right":"30rpx","font-size":"36rpx"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.zc()}}},[e._v("注冊")]),n("v-uni-view",{staticClass:"tit",staticStyle:{"padding-top":"120rpx"}},[e._v("郵箱")]),n("v-uni-input",{staticClass:"shuru",attrs:{type:"text",placeholder:"請翰入郵箱"},model:{value:e.email,callback:function(t){e.email=t},expression:"email"}}),n("v-uni-view",{staticClass:"tit"},[e._v("密碼")]),n("v-uni-input",{staticClass:"shuru",attrs:{type:"password",placeholder:"請翰入密碼"},model:{value:e.lpwd,callback:function(t){e.lpwd=t},expression:"lpwd"}}),n("v-uni-view",{staticStyle:{padding:"20rpx 48rpx"}},[n("v-uni-view",{staticClass:"wjmm",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.wjmm()}}},[e._v("忘記密碼?")])],1),n("v-uni-view",{staticClass:"flex",staticStyle:{"justify-content":"flex-end",padding:"0 48rpx"}},[n("v-uni-view",{staticClass:"gologin",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.gologin.apply(void 0,arguments)}}},[e._v("登錄")])],1)],1)},a=[]},ee6d:function(e,t,n){"use strict";var r=n("4ea4");n("d3b7"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("96cf");var o=r(n("1da1")),a=r(n("6ec1")),u={baseURL:a.default.state.baseURL,header:{"Content-Type":"application/x-www-form-urlencoded"},interceptors:{request:function(e,t){u.request.success=e,u.request.error=t},response:function(e,t){u.response.success=e,u.response.error=t}},request:{success:function(e){return e},error:function(e){return e}},response:{success:function(e){return e},error:function(e){return e}},open:function(){var e=(0,o.default)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e,n){var r="",o="";r=u.request.success(t),o=u.baseURL+r.url,console.log("生产环境"),uni.request({url:o,method:r.method||"GET",data:r.data,header:t.header||u.header,success:function(t){if(200==t.statusCode)try{e(u.response.success(t))}catch(n){u.response.error(n)}},fail:function(e){u.response.error(e)}})}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}(),upFilse:function(){var e=(0,o.default)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e,n){var r="",a="";try{r=u.request.success(t)}catch(s){u.request.error(s)}a=u.baseURL+r.url,console.log("生产环境");var i={upload_img_url:a},c={choose:function(e){return new Promise((function(t,n){uni.chooseImage({count:e,success:function(e){t(e.tempFilePaths)},fail:function(e){console.log(e),n(e)}})}))},upload_one:function(e){return new Promise((function(t,n){uni.showLoading({title:"上传中"}),uni.uploadFile({url:i.upload_img_url,filePath:e,name:"file",header:{"Authori-zation":"Bearer "+uni.getStorageSync("token")},success:function(e){console.log(e.data,"url"),"string"===typeof e.data?t(JSON.parse(e.data).data):t(e.data.data)},complete:function(){uni.hideLoading()}})}))},upload:function(e){var t=this,n=e.length;return new Promise(function(){var r=(0,o.default)(regeneratorRuntime.mark((function r(o,a){var u,i,c;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:u=[],i=0;case 2:if(!(i<n)){r.next=10;break}return r.next=5,t.upload_one(e[i]);case 5:c=r.sent,u.push(c);case 7:i++,r.next=2;break;case 10:o(u);case 12:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}())},choose_and_upload:function(e){var t=this;return new Promise(function(){var n=(0,o.default)(regeneratorRuntime.mark((function n(r,o){var a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.choose(e);case 2:return a=n.sent,n.next=5,t.upload(a).then((function(e){r(e)})).catch((function(e){o(e)}));case 5:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}())}};c.choose_and_upload(1).then((function(t){e(t)})).catch((function(e){console.log(e)}))}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},i=u;t.default=i},f0fa:function(e,t,n){"use strict";n.r(t);var r=n("9d77"),o=n("fcc0");for(var a in o)"default"!==a&&function(e){n.d(t,e,(function(){return o[e]}))}(a);n("56c1");var u,i=n("f0c5"),c=Object(i["a"])(o["default"],r["b"],r["c"],!1,null,"f8769540",null,!1,r["a"],u);t["default"]=c.exports},fcc0:function(e,t,n){"use strict";n.r(t);var r=n("2445"),o=n.n(r);for(var a in r)"default"!==a&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=o.a}}]);