You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
high-mini/unpackage/dist/build/mp-weixin/pages/login/login.js

1 line
2.9 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login/login"],{"059e":function(e,n,o){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;i(o("cd20"));var t=o("524d");function i(e){return e&&e.__esModule?e:{default:e}}var r=getApp(),s={data:function(){return{phoneNumber:"",passwd:"",isShowOauth:!1,showProvider:{weixin:!1,qq:!1,sinaweibo:!1,xiaomi:!1}}},onShow:function(){},onLoad:function(){this.getProvider()},methods:{oauthLogin:function(n){e.showLoading(),e.login({provider:n,success:function(o){console.log("success: "+JSON.stringify(o)),e.getUserInfo({provider:n,success:function(n){console.log("用户信息:"+JSON.stringify(n.userInfo)),e.setStorage({key:"UserInfo",data:{username:n.userInfo.nickName,face:n.userInfo.avatarUrl,signature:"个性签名",integral:0,balance:0,envelope:0},success:function(){e.hideLoading(),e.showToast({title:"登录成功",icon:"success"}),setTimeout((function(){e.navigateBack()}),300)}})}})},fail:function(e){console.log("fail: "+JSON.stringify(e))}})},getProvider:function(){var n=this;e.getProvider({service:"oauth",success:function(e){for(var o=e.provider.length,t=0;t<o;t++)n.showProvider[e.provider[t]]=!0;0==e.provider.length&&(n.isShowOauth=!1)}})},toPage:function(n){e.hideKeyboard(),e.navigateTo({url:n})},doLogin:function(){if(e.hideKeyboard(),""==this.phoneNumber)return e.showToast({title:"请填写账号",icon:"none"}),!1;if(""==this.passwd)return e.showToast({title:"请填写密码",icon:"none"}),!1;e.showLoading({title:"登录中..."});var n={loginName:this.phoneNumber,password:this.passwd};(0,t.userLogin)(n).then((function(n){"000000"==n.return_code?(e.hideLoading(),e.navigateTo({url:"../user/business/business"}),r.globalData.brestUserInfo=n.return_data.object.secUser,r.globalData.brestToken=n.return_data.uniqueCode):(e.hideLoading(),e.showToast({title:n.return_msg,icon:"none"}))}))}}};n.default=s}).call(this,o("543d")["default"])},"233e":function(e,n,o){},"380c":function(e,n,o){"use strict";o.r(n);var t=o("8ffe"),i=o("b61e");for(var r in i)"default"!==r&&function(e){o.d(n,e,(function(){return i[e]}))}(r);o("fbcd");var s,a=o("f0c5"),u=Object(a["a"])(i["default"],t["b"],t["c"],!1,null,null,null,!1,t["a"],s);n["default"]=u.exports},"8ffe":function(e,n,o){"use strict";var t;o.d(n,"b",(function(){return i})),o.d(n,"c",(function(){return r})),o.d(n,"a",(function(){return t}));var i=function(){var e=this,n=e.$createElement;e._self._c},r=[]},b61e:function(e,n,o){"use strict";o.r(n);var t=o("059e"),i=o.n(t);for(var r in t)"default"!==r&&function(e){o.d(n,e,(function(){return t[e]}))}(r);n["default"]=i.a},e5b5:function(e,n,o){"use strict";(function(e){o("185d");t(o("66fd"));var n=t(o("380c"));function t(e){return e&&e.__esModule?e:{default:e}}e(n.default)}).call(this,o("543d")["createPage"])},fbcd:function(e,n,o){"use strict";var t=o("233e"),i=o.n(t);i.a}},[["e5b5","common/runtime","common/vendor"]]]);