lsc 1 年之前
父節點
當前提交
244897f9b5

+ 1 - 1
dist/index.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><link rel=icon href=favicon.ico><title>cocorobo</title></head><body><noscript><strong>We're sorry but cocorobo doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=static/js/chunk-vendors.afa493c3.js></script><script src=static/js/app.a799d1c4.js></script></body></html><script>document.domain = "cocorobo.hk"</script>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><link rel=icon href=favicon.ico><title>cocorobo</title></head><body><noscript><strong>We're sorry but cocorobo doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=static/js/chunk-vendors.0b34b779.js></script><script src=static/js/app.6fc74acf.js></script></body></html><script>document.domain = "cocorobo.hk"</script>

文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.6fc74acf.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.a799d1c4.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-29837528.c5391ec3.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-30cee9c5.ba6d9019.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-36e9292c.7df3658c.js


+ 1 - 0
dist/static/js/chunk-3cba2aa3.bbb6bd37.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3cba2aa3"],{"18f3":function(e,t,r){var n=r("ce2c");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=r("499e").default;i("0d575ed8",n,!0,{sourceMap:!1,shadowMode:!1})},"4abd":function(e,t,r){"use strict";var n=r("18f3"),i=r.n(n);i.a},"9ed6":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},i=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"loginBox"},[r("iframe",{attrs:{src:"//edu.cocorobo.hk/LoginIframe?type=2",frameborder:"0"}})])}],o=(r("96cf"),r("1da1")),a=r("5530"),c=r("2f62"),s={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(c["b"])({login:"user/login"})),{},{handleLogin:function(){this.$router.push({path:this.redirect||"/"})},getLogin:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.login();case 2:r=t.sent,r&&e.$router.push({path:e.redirect||"/"});case 4: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)}},u=s,d=(r("4abd"),r("2877")),f=Object(d["a"])(u,n,i,!1,null,"5497deef",null);t["default"]=f.exports},ce2c:function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".loginBox[data-v-5497deef]{position:relative;width:100vw;height:100vh;overflow:hidden}.loginBox>iframe[data-v-5497deef]{width:100%;height:100%;border:0}",""]),e.exports=t}}]);

文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-461a532f.0c7c79a2.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-65749586.3f72f7e4.js


+ 0 - 1
dist/static/js/chunk-67506280.890594d1.js

@@ -1 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-67506280"],{"6dbf":function(e,t,r){var i=r("d4c4");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=r("499e").default;n("5c0397a2",i,!0,{sourceMap:!1,shadowMode:!1})},"9db5":function(e,t,r){"use strict";r("6dbf")},"9ed6":function(e,t,r){"use strict";r.r(t);var i=function(){var e=this;e._self._c;return e._m(0)},n=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"loginBox"},[t("iframe",{attrs:{src:"//edu.cocorobo.hk/LoginIframe?type=2",frameborder:"0"}})])}],o=r("c7eb"),a=r("1da1"),c=r("5530"),s=(r("14d9"),r("2f62")),u={data:function(){return{redirect:void 0,timer:null}},watch:{$route:{handler:function(e){this.redirect=e.query&&e.query.redirect},immediate:!0}},methods:Object(c["a"])(Object(c["a"])({},Object(s["b"])({login:"user/login"})),{},{handleLogin:function(){this.$router.push({path:this.redirect||"/"})},getLogin:function(){var e=this;return Object(a["a"])(Object(o["a"])().mark((function t(){var r;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.login();case 2:r=t.sent,r&&e.$router.push({path:e.redirect||"/"});case 4: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)}},d=u,f=(r("9db5"),r("2877")),h=Object(f["a"])(d,i,n,!1,null,"0ecfac33",null);t["default"]=h.exports},d4c4:function(e,t,r){var i=r("24fb");t=i(!1),t.push([e.i,".loginBox[data-v-0ecfac33]{position:relative;width:100vw;height:100vh;overflow:hidden}.loginBox>iframe[data-v-0ecfac33]{width:100%;height:100%;border:0}",""]),e.exports=t}}]);

文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-7181d027.98ce394b.js


+ 1 - 0
dist/static/js/chunk-85fdb5d0.c4c7f7ef.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-85fdb5d0"],{"5c5d":function(e,t,i){"use strict";var o=i("afca"),r=i.n(o);r.a},"688a":function(e,t,i){var o=i("24fb");t=o(!1),t.push([e.i,".loginBox[data-v-627fa1d9]{position:relative;width:100vw;height:100vh;overflow:hidden}.loginBox>iframe[data-v-627fa1d9]{width:100%;height:100%;border:0}",""]),e.exports=t},"89ef":function(e,t,i){"use strict";i.r(t);var o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"loginBox"},[i("iframe",{attrs:{allow:"camera *; microphone *;display-capture;midi;encrypted-media;",src:e.iframe,frameborder:"0"}})])},r=[],a=(i("99af"),i("5530")),c=i("2f62"),n={data:function(){return{redirect:void 0,timer:null,iframe:"https://cloud.cocorobo.hk/aigpt/"}},computed:Object(a["a"])({},Object(c["c"])(["userinfo"])),watch:{$route:{handler:function(e){this.redirect=e.query&&e.query.redirect},immediate:!0}},methods:{},beforeDestroy:function(){clearInterval(this.timer),this.timer=null},mounted:function(){this.iframe="https://cloud.cocorobo.hk/aigpt/?userid=".concat(this.userinfo.userid,"&oid=").concat(this.userinfo.organizeid,"&org=").concat(this.userinfo.org,"&role=").concat(this.userinfo.role)}},s=n,d=(i("5c5d"),i("2877")),u=Object(d["a"])(s,o,r,!1,null,"627fa1d9",null);t["default"]=u.exports},afca:function(e,t,i){var o=i("688a");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var r=i("499e").default;r("49445bbe",o,!0,{sourceMap:!1,shadowMode:!1})}}]);

文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-9e56507a.771be704.js


+ 0 - 1
dist/static/js/chunk-a7c5ff58.a6f31dc7.js

@@ -1 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a7c5ff58"],{"7eb3":function(e,t,o){var i=o("24fb");t=i(!1),t.push([e.i,".loginBox[data-v-0240dbc3]{position:relative;width:100vw;height:100vh;overflow:hidden}.loginBox>iframe[data-v-0240dbc3]{width:100%;height:100%;border:0}",""]),e.exports=t},"89ef":function(e,t,o){"use strict";o.r(t);var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"loginBox"},[t("iframe",{attrs:{allow:"camera *; microphone *;display-capture;midi;encrypted-media;",src:e.iframe,frameborder:"0"}})])},r=[],a=o("5530"),c=(o("99af"),o("2f62")),n={data:function(){return{redirect:void 0,timer:null,iframe:"https://cloud.cocorobo.hk/aigpt/"}},computed:Object(a["a"])({},Object(c["c"])(["userinfo"])),watch:{$route:{handler:function(e){this.redirect=e.query&&e.query.redirect},immediate:!0}},methods:{},beforeDestroy:function(){clearInterval(this.timer),this.timer=null},mounted:function(){this.iframe="https://cloud.cocorobo.hk/aigpt/?userid=".concat(this.userinfo.userid,"&oid=").concat(this.userinfo.organizeid,"&org=").concat(this.userinfo.org,"&role=").concat(this.userinfo.role)}},s=n,d=(o("ba2b"),o("2877")),u=Object(d["a"])(s,i,r,!1,null,"0240dbc3",null);t["default"]=u.exports},ba2b:function(e,t,o){"use strict";o("c34a")},c34a:function(e,t,o){var i=o("7eb3");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var r=o("499e").default;r("e38af9e4",i,!0,{sourceMap:!1,shadowMode:!1})}}]);

文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-ee01c49a.a9f473bb.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-vendors.0b34b779.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-vendors.afa493c3.js


+ 50 - 53
src/router/router.config.js

@@ -2,57 +2,54 @@
  * 基础路由
  * @type { *[] }
  */
-export const constantRouterMap = [{
-        path: '/',
-        redirect: '/home'
-    },
-    {
-        path: '/login',
-        component: () =>
-            import ('@/views/login/index'),
-        meta: {
-            title: '登录',
-            keepAlive: false
-        }
-    },
-    {
-        path: '/course',
-        component: () =>
-            import ('@/views/course/index'),
-        meta: {
-            title: '课程',
-            keepAlive: false
-        }
-    },
-    {
-        path: '/',
-        component: () =>
-            import ('@/views/layouts'),
-        meta: { title: '课程中心', keepAlive: false },
-        children: [{
-            path: 'home',
-            name: 'home',
-            component: () =>
-                import ('@/views/home/index'),
-            meta: { title: '课程中心', keepAlive: false }
-        }]
-    },
-    {
-        path: '/courseDetail',
-        component: () =>
-            import ('@/views/courseDetail/index'),
-        meta: {
-            title: '课程详情',
-            keepAlive: false
-        }
-    },
-    {
-        path: '/cocoAI',
-        component: () =>
-            import ('@/views/aigpt/index'),
-        meta: {
-            title: 'CocoAI',
-            keepAlive: false
-        }
+export const constantRouterMap = [
+  {
+    path: '/',
+    redirect: '/home'
+  },
+  {
+    path: '/login',
+    component: () => import('@/views/login/index'),
+    meta: {
+      title: '登录',
+      keepAlive: false
     }
-]
+  },
+  {
+    path: '/course',
+    component: () => import('@/views/course/index'),
+    meta: {
+      title: '课程',
+      keepAlive: false
+    }
+  },
+  {
+    path: '/',
+    component: () => import('@/views/layouts'),
+    meta: { title: '课程中心', keepAlive: false },
+    children: [
+      {
+        path: 'home',
+        name: 'home',
+        component: () => import('@/views/home/index'),
+        meta: { title: '课程中心', keepAlive: false }
+      }
+    ]
+  },
+  {
+    path: '/courseDetail',
+    component: () => import('@/views/courseDetail/index'),
+    meta: {
+      title: '课程详情',
+      keepAlive: false
+    }
+  },
+  {
+    path: '/cocoai',
+    component: () => import('@/views/aigpt/index'),
+    meta: {
+      title: 'CocoAI',
+      keepAlive: false
+    }
+  }
+]

+ 72 - 0
src/views/cocoai/index.vue

@@ -0,0 +1,72 @@
+<template>
+  <div class="loginBox">
+    <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;" :src="iframe" frameborder="0"></iframe>
+    <!-- <button @click="handleLogin">登录</button> -->
+  </div>
+</template>
+
+<script>
+// import { mapActions } from 'vuex'
+import { mapGetters } from 'vuex'
+export default {
+  data() {
+    return {
+      redirect: undefined,
+      timer: null,
+      iframe: 'https://cloud.cocorobo.hk/aigpt/'
+    }
+  },
+  computed: {
+    ...mapGetters(['userinfo'])
+  },
+  watch: {
+    $route: {
+      handler: function(route) {
+        this.redirect = route.query && route.query.redirect
+      },
+      immediate: true
+    }
+  },
+  methods: {
+    // ...mapActions({
+    //   login: 'user/login'
+    // }),
+    // handleLogin() {
+    //   this.$router.push({ path: this.redirect || '/' })
+    // },
+    // async getLogin() {
+    //   const userid = await this.login()
+    //   if (userid) {
+    //     this.$router.push({ path: this.redirect || '/' })
+    //   }
+    //   // eduGet().then(res => {})
+    // }
+  },
+  beforeDestroy() {
+    clearInterval(this.timer)
+    this.timer = null
+  },
+  mounted() {
+    // this.getLogin()
+    // this.timer = setInterval(() => {
+    //   this.getLogin()
+    // }, 2000)
+    this.iframe = `https://cloud.cocorobo.hk/aigpt/?userid=${this.userinfo.userid}&oid=${this.userinfo.organizeid}&org=${this.userinfo.org}&role=${this.userinfo.role}`
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.loginBox {
+  position: relative;
+  width: 100vw;
+  height: 100vh;
+  overflow: hidden;
+
+  > iframe {
+    width: 100%;
+    height: 100%;
+    border: 0;
+  }
+}
+</style>

部分文件因文件數量過多而無法顯示