(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-API-login-login"],{"0810":function(n,t,i){"use strict";i.r(t);var e=i("8c2b"),a=i.n(e);for(var o in e)"default"!==o&&function(n){i.d(t,n,(function(){return e[n]}))}(o);t["default"]=a.a},"35f1":function(n,t,i){"use strict";i.r(t);var e=i("ddfd"),a=i("0810");for(var o in a)"default"!==o&&function(n){i.d(t,n,(function(){return a[n]}))}(o);i("f5a9");var u,c=i("f0c5"),r=Object(c["a"])(a["default"],e["b"],e["c"],!1,null,"9ba3c8d2",null,!1,e["a"],u);t["default"]=r.exports},"47fc":function(n,t,i){var e=i("d580");"string"===typeof e&&(e=[[n.i,e,""]]),e.locals&&(n.exports=e.locals);var a=i("4f06").default;a("28e37456",e,!0,{sourceMap:!1,shadowMode:!1})},"8c2b":function(n,t,i){"use strict";var e=i("ee27");i("d81d"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=e(i("f3f3")),o=i("2f62"),u={data:function(){return{title:"login",providerList:[]}},computed:(0,a.default)({},(0,o.mapState)(["hasLogin"])),onLoad:function(){var n=this;uni.getProvider({service:"oauth",success:function(t){n.providerList=t.provider.map((function(n){var t="";switch(n){case"weixin":t="微信登录";break;case"qq":t="QQ登录";break;case"sinaweibo":t="新浪微博登录";break;case"xiaomi":t="小米登录";break;case"alipay":t="支付宝登录";break;case"baidu":t="百度登录";break;case"toutiao":t="头条登录";break;case"apple":t="苹果登录";break}return{name:t,id:n}}))},fail:function(n){console.log("获取登录通道失败",n)}})},methods:(0,a.default)({},(0,o.mapMutations)(["login"]),{tologin:function(n){var t=this;uni.login({provider:n.id,success:function(i){console.log("login success:",i),t.login(n.id)},fail:function(n){console.log("login fail:",n)}})}})};t.default=u},d580:function(n,t,i){var e=i("24fb");t=e(!1),t.push([n.i,"uni-button[data-v-9ba3c8d2]{background-color:#007aff;color:#fff}",""]),n.exports=t},ddfd:function(n,t,i){"use strict";var e,a=function(){var n=this,t=n.$createElement,i=n._self._c||t;return i("v-uni-view",[i("page-head",{attrs:{title:n.title}}),i("v-uni-view",{staticClass:"uni-padding-wrap"},[i("v-uni-view",{staticStyle:{background:"#FFF",padding:"40rpx"}},[!0===n.hasLogin?[i("v-uni-view",{staticClass:"uni-h3 uni-center uni-common-mt"},[n._v("已登录")]),i("v-uni-view",{staticClass:"uni-hello-text uni-center"},[i("v-uni-text",[n._v("每个账号仅需登录 1 次，\\n后续每次进入页面即可自动拉取用户信息。")])],1)]:n._e(),!1===n.hasLogin?[i("v-uni-view",{staticClass:"uni-h3 uni-center uni-common-mt"},[n._v("未登录")]),i("v-uni-view",{staticClass:"uni-hello-text uni-center"},[n._v("请点击按钮登录")])]:n._e()],2),i("v-uni-view",{staticClass:"uni-btn-v uni- uni-common-mt"},n._l(n.providerList,(function(t,e){return i("v-uni-button",{key:e,staticClass:"page-body-button",attrs:{type:"primary"},on:{click:function(i){arguments[0]=i=n.$handleEvent(i),n.tologin(t)}}},[n._v(n._s(t.name))])})),1)],1)],1)},o=[];i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return o})),i.d(t,"a",(function(){return e}))},f5a9:function(n,t,i){"use strict";var e=i("47fc"),a=i.n(e);a.a}}]);