text: (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/API/login/login"],{281:
  /*!***************************************************************************************************************!*\
    !*** /Users/xueqingchen/Documents/5-uni/5-uni-xiao/5-uni-xiao/main.js?{"page":"pages%2FAPI%2Flogin%2Flogin"} ***!
    \***************************************************************************************************************/
  /*! no static exports found */function(e,n,t){"use strict";(function(e){t(/*! uni-pages */4);o(t(/*! vue */2));var n=o(t(/*! ./pages/API/login/login.vue */282));function o(e){return e&&e.__esModule?e:{default:e}}e(n.default)}).call(this,t(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */1)["createPage"])},282:
  /*!******************************************************************************************!*\
    !*** /Users/xueqingchen/Documents/5-uni/5-uni-xiao/5-uni-xiao/pages/API/login/login.vue ***!
    \******************************************************************************************/
  /*! no static exports found */function(e,n,t){"use strict";t.r(n);var o=t(/*! ./login.vue?vue&type=template&id=33850645& */283),r=t(/*! ./login.vue?vue&type=script&lang=js& */285);for(var i in r)"default"!==i&&function(e){t.d(n,e,(function(){return r[e]}))}(i);t(/*! ./login.vue?vue&type=style&index=0&lang=css& */287);var c,a=t(/*! ../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */11),u=Object(a["default"])(r["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],c);u.options.__file="pages/API/login/login.vue",n["default"]=u.exports},283:
  /*!*************************************************************************************************************************!*\
    !*** /Users/xueqingchen/Documents/5-uni/5-uni-xiao/5-uni-xiao/pages/API/login/login.vue?vue&type=template&id=33850645& ***!
    \*************************************************************************************************************************/
  /*! exports provided: render, staticRenderFns, recyclableRender, components */function(e,n,t){"use strict";t.r(n);var o=t(/*! -!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./login.vue?vue&type=template&id=33850645& */284);t.d(n,"render",(function(){return o["render"]})),t.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(n,"components",(function(){return o["components"]}))},284:
  /*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
    !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!/Users/xueqingchen/Documents/5-uni/5-uni-xiao/5-uni-xiao/pages/API/login/login.vue?vue&type=template&id=33850645& ***!
    \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  /*! exports provided: render, staticRenderFns, recyclableRender, components */function(e,n,t){"use strict";var o;t.r(n),t.d(n,"render",(function(){return r})),t.d(n,"staticRenderFns",(function(){return c})),t.d(n,"recyclableRender",(function(){return i})),t.d(n,"components",(function(){return o}));try{o={pageHead:function(){return t.e(/*! import() | components/page-head/page-head */"components/page-head/page-head").then(t.bind(null,/*! @/components/page-head/page-head.vue */1209))}}}catch(a){if(-1===a.message.indexOf("Cannot find module")||-1===a.message.indexOf(".vue"))throw a;console.error(a.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范，文档：https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范，需手动引入，并在 components 中注册该组件")}var r=function(){var e=this,n=e.$createElement;e._self._c},i=!1,c=[];r._withStripped=!0},285:
  /*!*******************************************************************************************************************!*\
    !*** /Users/xueqingchen/Documents/5-uni/5-uni-xiao/5-uni-xiao/pages/API/login/login.vue?vue&type=script&lang=js& ***!
    \*******************************************************************************************************************/
  /*! no static exports found */function(e,n,t){"use strict";t.r(n);var o=t(/*! -!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./login.vue?vue&type=script&lang=js& */286),r=t.n(o);for(var i in o)"default"!==i&&function(e){t.d(n,e,(function(){return o[e]}))}(i);n["default"]=r.a},286:
  /*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
    !*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!/Users/xueqingchen/Documents/5-uni/5-uni-xiao/5-uni-xiao/pages/API/login/login.vue?vue&type=script&lang=js& ***!
    \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  /*! no static exports found */function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=i(t(/*! ./node_modules/@babel/runtime/regenerator */13)),r=t(/*! vuex */8);function i(e){return e&&e.__esModule?e:{default:e}}function c(e,n){return f(e)||l(e,n)||u(e,n)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,n){if(e){if("string"===typeof e)return s(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?s(e,n):void 0}}function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}function l(e,n){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var t=[],o=!0,r=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(o=(c=a.next()).done);o=!0)if(t.push(c.value),n&&t.length===n)break}catch(u){r=!0,i=u}finally{try{o||null==a["return"]||a["return"]()}finally{if(r)throw i}}return t}}function f(e){if(Array.isArray(e))return e}function d(e,n,t,o,r,i,c){try{var a=e[i](c),u=a.value}catch(s){return void t(s)}a.done?n(u):Promise.resolve(u).then(o,r)}function p(e){return function(){var n=this,t=arguments;return new Promise((function(o,r){var i=e.apply(n,t);function c(e){d(i,o,r,c,a,"next",e)}function a(e){d(i,o,r,c,a,"throw",e)}c(void 0)}))}}function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){v(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function v(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var m="univerifyInfo",y={data:function(){return{title:"login",providerList:[],phoneNumber:"",univerifyBtnLoading:!1}},computed:h({},(0,r.mapState)(["hasLogin","isUniverifyLogin","univerifyErrorMsg"])),onLoad:function(){var n=this;e.getProvider({service:"oauth",success:function(e){n.providerList=e.provider.map((function(e){var n="";switch(e){case"weixin":n="微信登录";break;case"qq":n="QQ登录";break;case"sinaweibo":n="新浪微博登录";break;case"xiaomi":n="小米登录";break;case"alipay":n="支付宝登录";break;case"baidu":n="百度登录";break;case"toutiao":n="头条登录";break;case"apple":n="苹果登录";break;case"univerify":n="一键登录";break}return{name:n,id:e}}))},fail:function(e){console.log("获取登录通道失败",e)}}),this.hasLogin&&this.isUniverifyLogin&&this.getPhoneNumber(e.getStorageSync(m)).then((function(e){n.phoneNumber=e}))},methods:h(h(h({},(0,r.mapMutations)(["login","setUniverifyLogin"])),(0,r.mapActions)(["getPhoneNumber"])),{},{Toast:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;e.showToast(Object.assign({},n,{duration:t}))},tologin:function(n){var t=this;"univerify"===n.id&&(this.univerifyBtnLoading=!0),e.login({provider:n.id,success:function(){var r=p(o.default.mark((function r(i){return o.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:console.log("login success:",i),t.Toast({title:"登录成功"}),t.login(n.id),console.warn("如需获取openid请参考uni-id: https://uniapp.dcloud.net.cn/uniCloud/uni-id"),e.request({url:"https://97fca9f2-41f6-449f-a35e-3f135d4c3875.bspapp.com/http/user-center",method:"POST",data:{action:"loginByWeixin",params:{code:i.code,platform:"mp-weixin"}},success:function(n){console.log(n),0===n.data.code?e.setStorageSync("openid",n.data.openid):console.log("获取openid失败：",n.result.msg)},fail:function(e){console.log("获取openid失败：",e)}});case 5:case"end":return o.stop()}}),r)})));function i(e){return r.apply(this,arguments)}return i}(),fail:function(n){if(console.log("login fail:",n),"30002"==n.code)return e.closeAuthView(),void t.Toast({title:"其他登录方式"});1e3!=n.code?"30005"!=n.code?"30003"!=n.code&&e.showModal({showCancel:!1,title:"登录失败",content:JSON.stringify(n)}):e.showModal({showCancel:!1,title:"预登录失败",content:t.univerifyErrorMsg||n.errMsg}):e.showModal({title:"登录失败",content:"".concat(n.errMsg,"\n，错误码：").concat(n.code),confirmText:"开通指南",cancelText:"确定",success:function(e){e.confirm&&setTimeout((function(){plus.runtime.openWeb("https://ask.dcloud.net.cn/article/37965")}),500)}})},complete:function(){t.univerifyBtnLoading=!1}})},loginByUniverify:function(n,t){var o=this;this.setUniverifyLogin(!0),e.closeAuthView();var r=h({provider:n},t.authResult);this.getPhoneNumber(r).then((function(n){o.phoneNumber=n,e.setStorageSync(m,r)})).catch((function(n){e.showModal({showCancel:!1,title:"手机号获取失败",content:"".concat(n.errMsg,"\n，错误码：").concat(n.code)}),console.error(t)}))},loginByApple:function(n,t){return p(o.default.mark((function t(){var r,i,a,u,s;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getUserInfo({provider:n});case 2:r=t.sent,i=c(r,2),a=i[0],u=i[1],a&&(s=a.errMsg,~s.indexOf("uni.login")&&(s="请在登录页面完成登录操作"),e.showModal({title:"获取用户信息失败",content:"错误原因"+s,showCancel:!1})),e.request({url:"https://97fca9f2-41f6-449f-a35e-3f135d4c3875.bspapp.com/http/user-center",method:"POST",data:{action:"loginByApple",params:u.userInfo},success:function(n){console.log("uniId login success",n),0!==n.data.code?e.showModal({showCancel:!1,content:"苹果登录失败: ".concat(JSON.stringify(n.data.msg))}):(e.setStorageSync("openid",n.data.openid),e.setStorageSync("apple_nickname",n.data.userInfo.nickname))},fail:function(n){e.showModal({content:"苹果登录失败: ".concat(JSON.stringify(n)),showCancel:!1})}});case 8:case"end":return t.stop()}}),t)})))()}})};n.default=y}).call(this,t(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */1)["default"])},287:
  /*!***************************************************************************************************************************!*\
    !*** /Users/xueqingchen/Documents/5-uni/5-uni-xiao/5-uni-xiao/pages/API/login/login.vue?vue&type=style&index=0&lang=css& ***!
    \***************************************************************************************************************************/
  /*! no static exports found */function(e,n,t){"use strict";t.r(n);var o=t(/*! -!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--6-oneOf-1-3!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../../../../../Applications/cxq办公/移动端开发/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./login.vue?vue&type=style&index=0&lang=css& */288),r=t.n(o);for(var i in o)"default"!==i&&function(e){t.d(n,e,(function(){return o[e]}))}(i);n["default"]=r.a},288:
  /*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
    !*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!./node_modules/postcss-loader/src??ref--6-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!/Users/xueqingchen/Documents/5-uni/5-uni-xiao/5-uni-xiao/pages/API/login/login.vue?vue&type=style&index=0&lang=css& ***!
    \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  /*! no static exports found */function(e,n,t){}},[[281,"common/runtime","common/vendor"]]]);
  //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/API/login/login.js.map