| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-entry-auth"],{"2e44":function(t,e,n){var o=n("3d62");"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var a=n("4f06").default;a("490a5b3c",o,!0,{sourceMap:!1,shadowMode:!1})},"3d62":function(t,e,n){var o=n("24fb");e=o(!1),e.push([t.i,".nav-bar[data-v-0f1c6b9c]{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-0f1c6b9c]{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},"99a4":function(t,e,n){"use strict";n.r(e);var o=n("f7a8"),a=n("9fab");for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);n("f0a6");var c,r=n("f0c5"),u=Object(r["a"])(a["default"],o["b"],o["c"],!1,null,"0f1c6b9c",null,!1,o["a"],c);e["default"]=u.exports},"9fab":function(t,e,n){"use strict";n.r(e);var o=n("af97"),a=n.n(o);for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=a.a},af97:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={data:function(){return{}},onLoad:function(t){uni.showLoading({title:"loading"}),sessionStorage.setItem("option",t),"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=sessionStorage.getItem("redirceUrl");n="undefined"!=typeof n&&"undefined"!=n?n:document.location.host+"/pages/index/index",this.$request.api("/api/auth",{code:t}).then((function(t){console.log(t),uni.hideLoading();var o="undefined"!=typeof t.access_token?t.access_token:"";1==t.success&&o?e.$store.commit("setToken",t):uni.showModal({title:"错误提示",content:o?"授权失败,点击确定重试或者取消返回":t.msg+",点击确定重试或者取消返回",success:function(t){t.confirm?uni.navigateTo({url:"/pages/entry/auth"}):t.cancel&&(location.href=n)}})})).catch((function(t){console.log(t)}))}}};e.default=o},f0a6:function(t,e,n){"use strict";var o=n("2e44"),a=n.n(o);a.a},f7a8:function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}));var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view")},i=[]}}]);
|