lsc 1 天之前
父节点
当前提交
eee35f7e25

文件差异内容过多而无法显示
+ 0 - 0
dist/index.html


文件差异内容过多而无法显示
+ 1 - 1
dist/report.html


+ 0 - 1
dist/static/css/chunk-17e66bfc.c94776c5.css

@@ -1 +0,0 @@
-.loginBox[data-v-02bea5b8]{position:relative;width:100vw;height:100vh;overflow:hidden}.loginBox>iframe[data-v-02bea5b8]{width:100%;height:100%;border:0}

+ 1 - 0
dist/static/css/chunk-4c218bdc.36fc503b.css

@@ -0,0 +1 @@
+.loginBox[data-v-da11026c]{position:relative;width:100vw;height:100vh;overflow:hidden}.loginBox>iframe[data-v-da11026c]{width:100%;height:100%;border:0}

文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.fa5f5163.js


+ 0 - 1
dist/static/js/chunk-17e66bfc.e3092c2f.js

@@ -1 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-17e66bfc"],{2915:function(t,e,n){},"9ed6":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this;t._self._c;return t._m(0)},i=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"loginBox"},[e("iframe",{attrs:{src:"//edu.cocorobo.cn/course/login?type=2",frameborder:"0"}})])}],c=n("c7eb"),o=n("1da1"),u=n("5530"),s=(n("14d9"),n("2f62")),a={data:function(){return{redirect:void 0,timer:null}},watch:{$route:{handler:function(t){this.redirect=t.query&&t.query.redirect},immediate:!0}},methods:Object(u["a"])(Object(u["a"])({},Object(s["b"])({login:"user/login"})),{},{handleLogin:function(){this.$router.push({path:this.redirect||"/"})},getLogin:function(){var t=this;return Object(o["a"])(Object(c["a"])().mark((function e(){var n;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.login();case 2:n=e.sent,n&&t.$router.push({path:t.redirect||"/"});case 4:case"end":return e.stop()}}),e)})))()}}),beforeDestroy:function(){clearInterval(this.timer),this.timer=null},mounted:function(){var t=this;this.getLogin(),this.timer=setInterval((function(){t.getLogin()}),2e3)}},f=a,h=(n("9ff3"),n("2877")),l=Object(h["a"])(f,r,i,!1,null,"02bea5b8",null);e["default"]=l.exports},"9ff3":function(t,e,n){"use strict";n("2915")}}]);

+ 1 - 0
dist/static/js/chunk-4c218bdc.e91a2443.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4c218bdc"],{"8dfd":function(e,t,r){"use strict";r("f326")},"9ed6":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this;e._self._c;return e._m(0)},i=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"loginBox"},[t("iframe",{attrs:{src:"//edu.cocorobo.cn/course/login?type=2",frameborder:"0"}})])}],c=r("c7eb"),o=r("1da1"),a=r("5530"),u=(r("14d9"),r("2f62")),s=r("852e"),d=r.n(s),f={data:function(){return{redirect:void 0,timer:null}},watch:{$route:{handler:function(e){this.redirect=e.query&&e.query.redirect},immediate:!0}},methods:Object(a["a"])(Object(a["a"])({},Object(u["b"])({login:"user/login"})),{},{handleLogin:function(){this.$router.push({path:this.redirect||"/"})},getLogin:function(){var e=this;return Object(o["a"])(Object(c["a"])().mark((function t(){var r,n;return Object(c["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.login();case 2:r=t.sent,n=d.a.get("redirectUri"),n&&"undefined"!==n||(n=""),console.log(n),r&&(n?(d.a.remove("redirectUri"),window.location.href=n):e.$router.push({path:e.redirect||"/"}));case 7:case"end":return t.stop()}}),t)})))()}}),beforeDestroy:function(){clearInterval(this.timer),this.timer=null},mounted:function(){var e=this;this.getLogin(),this.timer=setInterval((function(){e.getLogin()}),2e3)}},l=f,h=(r("8dfd"),r("2877")),b=Object(h["a"])(l,n,i,!1,null,"da11026c",null);t["default"]=b.exports},f326:function(e,t,r){}}]);

+ 13 - 1
src/views/login/index.vue

@@ -7,6 +7,8 @@
 
 <script>
 import { mapActions } from 'vuex'
+import Cookies from 'js-cookie'
+
 export default {
   data() {
     return {
@@ -31,8 +33,18 @@ export default {
     },
     async getLogin() {
       const userid = await this.login()
+      let redirect_uri = Cookies.get('redirectUri')
+      if (!redirect_uri || redirect_uri === 'undefined') {
+        redirect_uri = ''
+      }
+      console.log(redirect_uri)
       if (userid) {
-        this.$router.push({ path: this.redirect || '/' })
+        if (redirect_uri) {
+          Cookies.remove('redirectUri')
+          window.location.href = redirect_uri
+        } else {
+          this.$router.push({ path: this.redirect || '/' })
+        }
       }
       // eduGet().then(res => {})
     }

部分文件因为文件数量过多而无法显示