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 lines
2.9 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login/login"],{"0eb4":function(e,n,o){"use strict";o.r(n);var t=o("accc"),i=o("baff");for(var r in i)"default"!==r&&function(e){o.d(n,e,(function(){return i[e]}))}(r);o("342c");var a,s=o("f0c5"),u=Object(s["a"])(i["default"],t["b"],t["c"],!1,null,null,null,!1,t["a"],a);n["default"]=u.exports},"199c":function(e,n,o){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;i(o("8f7e"));var t=o("b528");function i(e){return e&&e.__esModule?e:{default:e}}var r=getApp(),a={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=a}).call(this,o("543d")["default"])},"22eb":function(e,n,o){"use strict";(function(e){o("eba6");t(o("66fd"));var n=t(o("0eb4"));function t(e){return e&&e.__esModule?e:{default:e}}e(n.default)}).call(this,o("543d")["createPage"])},"342c":function(e,n,o){"use strict";var t=o("d72e"),i=o.n(t);i.a},accc: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=[]},baff:function(e,n,o){"use strict";o.r(n);var t=o("199c"),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},d72e:function(e,n,o){}},[["22eb","common/runtime","common/vendor"]]]);