| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-entry-auth"],{"2a7a":function(t,e,n){var a=n("24fb");e=a(!1),e.push([t.i,".nav-bar[data-v-58efaab9]{padding-top:%?50?%;padding-bottom:%?10?%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center;background:-webkit-gradient(linear,left top,left bottom,from(#ff9865),to(#ff7a55));background:-webkit-linear-gradient(#ff9865,#ff7a55);background:linear-gradient(#ff9865,#ff7a55);height:%?125?%}.btn[data-v-58efaab9]{width:50%;height:%?80?%;line-height:%?80?%;margin:0 auto;background-color:#18b566;color:#fff;text-align:center;margin-top:50%;-webkit-border-radius:%?6?%;border-radius:%?6?%}",""]),t.exports=e},"32dd":function(t,e,n){"use strict";var a=n("e2ac"),o=n.n(a);o.a},"3bd5":function(t,e,n){"use strict";var a;n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return a}));var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view")},i=[]},"99a4":function(t,e,n){"use strict";n.r(e);var a=n("3bd5"),o=n("9fab");for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);n("32dd");var r,c=n("f0c5"),u=Object(c["a"])(o["default"],a["b"],a["c"],!1,null,"58efaab9",null,!1,a["a"],r);e["default"]=u.exports},"9fab":function(t,e,n){"use strict";n.r(e);var a=n("af97"),o=n.n(a);for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);e["default"]=o.a},af97:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={data:function(){return{}},onLoad:function(t){uni.showLoading({title:"loading"}),sessionStorage.setItem("option",t);var e=sessionStorage.getItem("code");e==t.code&&(t.code=""),"undefined"!=typeof t.code&&t.code?this.userAuth(t.code):(sessionStorage.setItem("redirceUrl",t.reback_url),this.getAuthUrl())},methods:{getAuthUrl:function(){this.$request.api("/api/auth/url",{url:document.location.protocol+"//"+document.location.host+"/pages/entry/auth"}).then((function(t){uni.hideLoading(),1==t.success?location.href=t.data:uni.showToast({title:t.msg,icon:"none"})})).catch((function(t){console.log(params)}))},userAuth:function(t){var e=this,n=/\/pages\/entry\/auth/,a=sessionStorage.getItem("redirceUrl");a="undefined"!=typeof a&&"undefined"!=a?a:document.location.host+"/pages/index/index",a&&n.test(a)&&(a=document.location.host+"/pages/index/index"),this.$request.api("/api/auth",{code:t}).then((function(t){console.log(t),uni.hideLoading();var n="undefined"!=typeof t.data.access_token?t.data.access_token:"";1==t.success&&n?(e.$store.commit("setToken",t.data),location.href=a):uni.showModal({title:"错误提示",content:n?"授权失败,点击确定重试或者取消返回":t.msg+",点击确定重试或者取消返回",success:function(t){t.confirm?uni.navigateTo({url:"/pages/entry/auth"}):t.cancel&&(location.href=a)}})})).catch((function(t){console.log(t)}))}}};e.default=a},e2ac:function(t,e,n){var a=n("2a7a");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=n("4f06").default;o("44f3c639",a,!0,{sourceMap:!1,shadowMode:!1})}}]);
|