pages-auth-login.f92b10b5.js 15 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-auth-login"],{"08c4":function(t,e,n){"use strict";n.r(e);var r=n("368f"),o=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=o.a},"0d67":function(t,e,n){"use strict";n.r(e);var r=n("c4e7"),o=n("08c4");for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);n("57e9");var a,c=n("f0c5"),u=Object(c["a"])(o["default"],r["b"],r["c"],!1,null,"2623dd14",null,!1,r["a"],a);e["default"]=u.exports},"1da1":function(t,e,n){"use strict";function r(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void n(s)}c.done?e(u):Promise.resolve(u).then(r,o)}function o(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)}))}}n("d3b7"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=o},"1fbc":function(t,e,n){var r=n("8717");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("4f06").default;o("90a1f166",r,!0,{sourceMap:!1,shadowMode:!1})},"368f":function(t,e,n){"use strict";(function(t){var r=n("4ea4");n("4d63"),n("ac1f"),n("25f0"),n("466d"),n("5319"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("96cf");var o=r(n("1da1")),i=n("9958"),a={data:function(){return{code:null,isAgreement:!0}},computed:{},onLoad:function(t){this.checkWeixin()?this.getWxCode():uni.showToast({icon:"none",title:"请在微信中打开"})},onUnload:function(){},mounted:function(){},methods:{checkWeixin:function(){var t=window.navigator.userAgent.toLowerCase();return"micromessenger"==t.match(/micromessenger/i)},getUrlCode:function(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.href)||[,""])[1].replace(/\+/g,"%20"))||null},getWxCode:function(){var t="wx40593595e62f61ad",e="http://h5.yjf.runtzh.com";window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+t+"&redirect_uri="+encodeURIComponent(e+"/#/pages/auth/wxLogin")+"&response_type=code&scope=snsapi_userinfo&state=JeffreySu-954&connect_redirect=1#wechat_redirect"},handleAgreement:function(){this.isAgreement=!this.isAgreement},openH5:function(t){var e=uni.getStorageSync("requestPath");uni.setStorageSync("url",e+t),uni.navigateTo({url:"../home/h5"})},getCode:function(){var e=this;this.utils.getProvider().then((function(n){t.log("当前的环境商",n),n||reject(),uni.login({provider:n,success:function(){var t=(0,o.default)(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.code=n.code;case 1:case"end":return t.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}()})})).catch((function(t){}))},phoneLogin:function(e){if(!this.isAgreement)return uni.showToast({icon:"none",title:"请先同意协议后再登录"}),!1;uni.showLoading({title:"处理中..."}),"getPhoneNumber:ok"==e.mp.detail.errMsg?this.utils.getProvider().then((function(n){t.log("当前的环境商",n),n||reject(),uni.login({provider:n,success:function(){var n=(0,o.default)(regeneratorRuntime.mark((function n(r){var o,a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:t.log(r),o=r.code,a=uni.getStorageSync("tuiUserId"),(0,i.loginByMiniApp)({encryptedData:e.mp.detail.encryptedData,iv:e.mp.detail.iv,code:o,tuiUserId:a}).then((function(t){200==t.code?(uni.hideLoading(),uni.showToast({icon:"none",title:"登录成功"}),uni.setStorageSync("AppToken",t.token),uni.setStorageSync("userInfo",JSON.stringify(t.user)),uni.hideLoading(),uni.$emit("refreshLogin"),uni.navigateBack({delta:1})):(uni.hideLoading(),uni.showToast({icon:"none",title:"授权登录失败,请重新登录"}))})).catch((function(e){t.log(e),uni.hideLoading(),uni.showToast({icon:"none",title:"登录接口调用失败"})}));case 4:case"end":return n.stop()}}),n)})));function r(t){return n.apply(this,arguments)}return r}()})})).catch((function(t){uni.showToast({icon:"none",title:t})})):uni.showToast({title:"已拒绝授权",icon:"none",duration:2e3})},back:function(){uni.navigateBack()}}};e.default=a}).call(this,n("5a52")["default"])},"57e9":function(t,e,n){"use strict";var r=n("1fbc"),o=n.n(r);o.a},8717:function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.container[data-v-2623dd14]{flex:1;display:flex;flex-direction:column;justify-content:flex-start;position:relative}.force-login-wrap[data-v-2623dd14]{width:100%;height:100%;overflow:hidden;z-index:11111;top:0}.force-login-wrap .force-login__content[data-v-2623dd14]{position:absolute;left:50%;top:40%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.force-login-wrap .force-login__content .user-avatar[data-v-2623dd14]{border:%?4?% solid #fff;box-shadow:0 5px 15px 2px rgba(0,0,0,.1);width:%?160?%;height:%?160?%;border-radius:50%;overflow:hidden;margin-bottom:%?40?%}.force-login-wrap .force-login__content .user-name[data-v-2623dd14]{font-size:%?35?%;font-family:PingFang SC;font-weight:700;color:#000;margin-bottom:%?30?%}.force-login-wrap .force-login__content .login-notice[data-v-2623dd14]{font-size:%?28?%;font-family:PingFang SC;font-weight:400;color:#000;line-height:%?44?%;width:%?500?%;text-align:center;margin-bottom:%?80?%}.force-login-wrap .force-login__content .author-btn[data-v-2623dd14]{width:%?630?%;height:%?80?%;background:linear-gradient(90deg,#2bc7b9 0,#2aa7b9);background:-moz-linear-gradient(to right,#2bc7b9 0,#2aa7b9 100%);border-radius:%?40?%;font-size:%?30?%;font-family:PingFang SC;font-weight:500;color:#fff}.force-login-wrap .force-login__content .close-btn[data-v-2623dd14]{width:%?630?%;height:%?80?%;margin-top:%?30?%;border-radius:%?40?%;border:%?2?% solid #2bc7b9;background:none;font-size:%?30?%;font-family:PingFang SC;font-weight:500;color:#2bc7b9}.tips[data-v-2623dd14]{margin-top:%?30?%;display:flex;justify-content:center;align-items:center;font-size:%?28?%;color:#000}.tips .btn[data-v-2623dd14]{color:#2bc7b9}.wx-login[data-v-2623dd14]{background:rgba(0,0,0,.7);z-index:99999;position:fixed;top:0;left:0;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.wx-login .form[data-v-2623dd14]{border-radius:%?20?%;padding:%?60?% %?30?%;width:%?500?%;height:%?300?%;background-color:#fff}.wx-login .form .title[data-v-2623dd14]{font-size:%?32?%;font-family:PingFang SC;font-weight:700}.wx-login .form .desc[data-v-2623dd14]{font-size:%?28?%;margin:%?60?% %?0?% %?60?% %?0?%;font-family:PingFang SC;font-weight:500}.wx-login .form .btn-box[data-v-2623dd14]{margin-top:%?30?%;width:100%;display:flex;align-items:center;justify-content:center}.wx-login .form .btn-box .btn[data-v-2623dd14]{display:flex;align-items:center;justify-content:center;margin-left:%?10?%;width:50%;height:%?80?%;border-radius:%?5?%;background-color:#2bc7b9;font-size:%?30?%;font-family:PingFang SC;font-weight:500;color:#fff;position:relative}.wx-login .form .btn-box .btn-close[data-v-2623dd14]{margin-right:%?10?%;width:50%;height:%?80?%;border-radius:%?5?%;border:%?2?% solid #2bc7b9;background:none;font-size:%?30?%;font-family:PingFang SC;font-weight:500;color:#2bc7b9}.auth_btn[data-v-2623dd14]{width:100%;height:100%;top:%?0?%;position:absolute;opacity:0}',""]),t.exports=e},"96cf":function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag",s="object"===typeof t,f=e.regeneratorRuntime;if(f)s&&(t.exports=f);else{f=e.regeneratorRuntime=s?t.exports:{},f.wrap=b;var l="suspendedStart",d="suspendedYield",h="executing",g="completed",p={},v={};v[a]=function(){return this};var m=Object.getPrototypeOf,y=m&&m(m(T([])));y&&y!==r&&o.call(y,a)&&(v=y);var w=k.prototype=_.prototype=Object.create(v);L.prototype=w.constructor=k,k.constructor=L,k[u]=L.displayName="GeneratorFunction",f.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===L||"GeneratorFunction"===(e.displayName||e.name))},f.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(w),t},f.awrap=function(t){return{__await:t}},S(E.prototype),E.prototype[c]=function(){return this},f.AsyncIterator=E,f.async=function(t,e,n,r){var o=new E(b(t,e,n,r));return f.isGeneratorFunction(e)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},S(w),w[u]="Generator",w[a]=function(){return this},w.toString=function(){return"[object Generator]"},f.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){while(e.length){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},f.values=T,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(F),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return c.type="throw",c.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),F(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;F(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),p}}}function b(t,e,n,r){var o=e&&e.prototype instanceof _?e:_,i=Object.create(o.prototype),a=new O(r||[]);return i._invoke=j(t,n,a),i}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(r){return{type:"throw",arg:r}}}function _(){}function L(){}function k(){}function S(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function E(t){function e(n,r,i,a){var c=x(t[n],t,r);if("throw"!==c.type){var u=c.arg,s=u.value;return s&&"object"===typeof s&&o.call(s,"__await")?Promise.resolve(s.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return e("throw",t,i,a)}))}a(c.arg)}var n;function r(t,r){function o(){return new Promise((function(n,o){e(t,r,n,o)}))}return n=n?n.then(o,o):o()}this._invoke=r}function j(t,e,n){var r=l;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===g){if("throw"===o)throw i;return z()}n.method=o,n.arg=i;while(1){var a=n.delegate;if(a){var c=P(a,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=x(t,e,n);if("normal"===u.type){if(r=n.done?g:d,u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=g,n.method="throw",n.arg=u.arg)}}}function P(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,P(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=x(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){while(++r<t.length)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return i.next=i}}return{next:z}}function z(){return{value:n,done:!0}}}(function(){return this||"object"===typeof self&&self}()||Function("return this")())},c4e7:function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}));var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"container"})},i=[]}}]);