Browse Source

feat:支持cas

pull/1/head
Wangwei 2 years ago
parent
commit
7ad172eac7
  1. 2
      .env.development
  2. 2
      src/components/msgLogin.vue
  3. 5
      src/mixins/mixins.js
  4. 2
      src/router.js
  5. 2
      src/views/class/indexClass.vue
  6. 2
      src/views/class/play-old.vue
  7. 2
      src/views/class/play.vue
  8. 2
      src/views/live/live_play.vue
  9. 2
      src/views/live/live_view.vue
  10. 4
      src/views/play.vue
  11. 2
      src/views/video/guide/finebi.vue
  12. 2
      src/views/video/guide/finereport.vue
  13. 2
      src/views/video/guide/jiandaoyun.vue
  14. 2
      src/views/video/play.vue
  15. 3
      src/views/video/video_course.vue

2
.env.development

@ -9,6 +9,6 @@ VUE_APP_SHEQU_URL = https://frbbs
VUE_APP_ID_URL = https://id VUE_APP_ID_URL = https://id
#VUE_APP_ID_URL = https://passport.fanruan.com #VUE_APP_ID_URL = https://passport.fanruan.com
#VUE_APP_CIDAPI_URL = https://cid.fanruan.com/api #VUE_APP_CIDAPI_URL = https://cid.fanruan.com/api
VUE_APP_CIDAPI_URL = https://test-cid/api VUE_APP_CIDAPI_URL = https://cid/api
VUE_APP_PASS_URL = http://localhost:8080 VUE_APP_PASS_URL = http://localhost:8080
VUE_APP_CERT_URL = https://admin.shequ.fanruan.com VUE_APP_CERT_URL = https://admin.shequ.fanruan.com

2
src/components/msgLogin.vue

@ -2,7 +2,7 @@
<div v-if="!com_user_token" class="msg-box"> <div v-if="!com_user_token" class="msg-box">
<el-alert type="warning" center show-icon close-text=" " style="height: 80px"> <el-alert type="warning" center show-icon close-text=" " style="height: 80px">
<div class="f16" style="padding: 6px 0 12px"> <div class="f16" style="padding: 6px 0 12px">
无权限查看,当前页面需要 <a :href="com_id_url+'/signin/'+'?referrer='+com_edu_url+$route.path" >登录</a> 无权限查看,当前页面需要 <a :href="com_login_url" >登录</a>
</div> </div>
</el-alert> </el-alert>
</div> </div>

5
src/mixins/mixins.js

@ -7,6 +7,8 @@
*/ */
//import { getToken } from "@/utils/cookie"; //import { getToken } from "@/utils/cookie";
import store from '@/store' import store from '@/store'
// import { useRoute } from 'vue-router'
export const mixins = { export const mixins = {
data() { data() {
return { return {
@ -17,7 +19,8 @@ export const mixins = {
com_node_env: process.env.VUE_APP_ENV || 'production', com_node_env: process.env.VUE_APP_ENV || 'production',
com_pass_url: process.env.VUE_APP_PASS_URL || 'https://fanruanclub.com', com_pass_url: process.env.VUE_APP_PASS_URL || 'https://fanruanclub.com',
com_cert_url:process.env.VUE_APP_CERT_URL || 'https://cert.fanruan.com', com_cert_url:process.env.VUE_APP_CERT_URL || 'https://cert.fanruan.com',
com_jump_url:encodeURIComponent(window.location.href) com_jump_url:encodeURIComponent(window.location.href),
com_login_url:process.env.VUE_APP_ID_URL+'/signin/'+'?app=edu&protocol=cas&referrer='+window.location.href
} }
}, },
created() { created() {

2
src/router.js

@ -352,7 +352,7 @@ router.beforeEach((to, from, next) => {
// ticket空执行删除 // ticket空执行删除
const is_ticket_null = new URL(window.location); const is_ticket_null = new URL(window.location);
if(is_ticket_null.searchParams.has("ticket")){ if(is_ticket_null.searchParams.has("ticket")){
if(get_ticket===0){ if(get_ticket===0 || get_ticket=='null'){
console.log('ticket空'); console.log('ticket空');
parent.window.location.replace(process.env.VUE_APP_ID_URL+'/login/token/logout?referrer='+encodeURIComponent(process.env.VUE_APP_EDU_URL)); parent.window.location.replace(process.env.VUE_APP_ID_URL+'/login/token/logout?referrer='+encodeURIComponent(process.env.VUE_APP_EDU_URL));
} }

2
src/views/class/indexClass.vue

@ -18,7 +18,7 @@
<div v-if="!com_user_token" style=" background-color: #fff; border-radius: 8px"> <div v-if="!com_user_token" style=" background-color: #fff; border-radius: 8px">
<el-empty :image-size="150" description=" "> <el-empty :image-size="150" description=" ">
<div class="col617">登录后才能查看您参加的学习班哦 <div class="col617">登录后才能查看您参加的学习班哦
<a :href="com_id_url+'/signin/'+'?referrer='+com_edu_url+$route.path" class="col008">马上登录</a> <a :href="com_login_url" class="col008">马上登录</a>
</div> </div>
</el-empty> </el-empty>
</div> </div>

2
src/views/class/play-old.vue

@ -3,7 +3,7 @@
<appHeader /> <appHeader />
<div v-if="!com_user_token"> <div v-if="!com_user_token">
<el-empty :image-size="200" description=" ">无权限查看当前页面需要 <a <el-empty :image-size="200" description=" ">无权限查看当前页面需要 <a
:href="com_id_url+'/signin/'+'?referrer='+com_edu_url+$route.path" class="col008">登录</a></el-empty> :href="com_login_url" class="col008">登录</a></el-empty>
</div> </div>
<div v-if="isAuth"> <div v-if="isAuth">
<div class="main"> <div class="main">

2
src/views/class/play.vue

@ -3,7 +3,7 @@
<appHeader /> <appHeader />
<div v-if="!com_user_token"> <div v-if="!com_user_token">
<el-empty :image-size="200" description=" ">无权限查看当前页面需要 <a <el-empty :image-size="200" description=" ">无权限查看当前页面需要 <a
:href="com_id_url+'/signin/'+'?referrer='+com_edu_url+$route.path" class="col008">登录</a></el-empty> :href="com_login_url" class="col008">登录</a></el-empty>
</div> </div>
<div v-if="isAuth"> <div v-if="isAuth">
<div class="main"> <div class="main">

2
src/views/live/live_play.vue

@ -5,7 +5,7 @@
<div v-if="!com_user_token"> <div v-if="!com_user_token">
<el-empty :image-size="200" description=" ">无权限查看当前页面需要登录</el-empty> <el-empty :image-size="200" description=" ">无权限查看当前页面需要登录</el-empty>
<div style="text-align: center"> <div style="text-align: center">
<a :href="com_id_url+'/signin/'+'?isfridapp=yes&referrer='+com_edu_url+$route.path" class="el-btn medium ff18">马上登录</a> <a :href="com_login_url" class="el-btn medium ff18">马上登录</a>
</div> </div>
</div> </div>

2
src/views/live/live_view.vue

@ -133,7 +133,7 @@
<el-popover placement="top" :width="300" trigger="click"> <el-popover placement="top" :width="300" trigger="click">
<p style="padding: 12px 0 16px; text-align: center;" class="f14">您还未登录哦~~登录后再报名吧</p> <p style="padding: 12px 0 16px; text-align: center;" class="f14">您还未登录哦~~登录后再报名吧</p>
<div style="text-align: center; padding: 14px 0;"> <div style="text-align: center; padding: 14px 0;">
<a :href="com_id_url+'/signin/'+'?isfridapp=yes&referrer='+com_edu_url+$route.path" <a :href="com_login_url"
class="el-btn medium">立即登录</a> class="el-btn medium">立即登录</a>
</div> </div>
<template #reference> <template #reference>

4
src/views/play.vue

@ -16,8 +16,8 @@
</div> </div>
<div class="nullData flex-4" v-if="!com_user_token"> <div class="nullData flex-4" v-if="!com_user_token">
<span>抱歉本站注册会员可以看课程</span> <span>抱歉本站注册用户可以看课程</span>
<a :href="com_id_url+'/signin/'+'?referrer='+com_edu_url+$route.path" class="el-btn medium ff18">会员登录</a> <a :href="com_login_url" class="el-btn medium ff18">马上登录</a>
</div> </div>

2
src/views/video/guide/finebi.vue

@ -3,7 +3,7 @@
<el-dialog title="抱歉,当前页面需要登录" model-value="1" width="300px" :show-close="false" :close-on-press-escape="false" <el-dialog title="抱歉,当前页面需要登录" model-value="1" width="300px" :show-close="false" :close-on-press-escape="false"
:close-on-click-modal="false"> :close-on-click-modal="false">
<div class="f16" style="padding: 14px 0 12px"> <div class="f16" style="padding: 14px 0 12px">
<a class="fr-btn big" :href="com_id_url+'/signin/'+'?referrer='+com_edu_url+$route.path">马上登录</a> <a class="fr-btn big" :href="com_login_url">马上登录</a>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>

2
src/views/video/guide/finereport.vue

@ -3,7 +3,7 @@
<el-dialog title="抱歉,当前页面需要登录" model-value="1" width="300px" :show-close="false" :close-on-press-escape="false" <el-dialog title="抱歉,当前页面需要登录" model-value="1" width="300px" :show-close="false" :close-on-press-escape="false"
:close-on-click-modal="false"> :close-on-click-modal="false">
<div class="f16" style="padding: 14px 0 12px"> <div class="f16" style="padding: 14px 0 12px">
<a class="fr-btn big" :href="com_id_url+'/signin/'+'?referrer='+com_edu_url+$route.path">马上登录</a> <a class="fr-btn big" :href="com_login_url">马上登录</a>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>

2
src/views/video/guide/jiandaoyun.vue

@ -3,7 +3,7 @@
<el-dialog title="抱歉,当前页面需要登录" model-value="1" width="300px" :show-close="false" :close-on-press-escape="false" <el-dialog title="抱歉,当前页面需要登录" model-value="1" width="300px" :show-close="false" :close-on-press-escape="false"
:close-on-click-modal="false"> :close-on-click-modal="false">
<div class="f16" style="padding: 14px 0 12px"> <div class="f16" style="padding: 14px 0 12px">
<a class="fr-btn big" :href="com_id_url+'/signin/'+'?referrer='+com_edu_url+$route.path">马上登录</a> <a class="fr-btn big" :href="com_login_url">马上登录</a>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>

2
src/views/video/play.vue

@ -18,7 +18,7 @@
<div class="nullData flex-4" v-if="!com_user_token"> <div class="nullData flex-4" v-if="!com_user_token">
<span>抱歉需登录后观看课程</span> <span>抱歉需登录后观看课程</span>
<a :href="com_id_url+'/signin/?referrer='+com_jump_url" class="el-btn medium ff18">马上登录</a> <a :href="com_login_url" class="el-btn medium ff18">马上登录</a>
</div> </div>
<div class="autotime" v-show="showAutoBox"> <div class="autotime" v-show="showAutoBox">

3
src/views/video/video_course.vue

@ -104,8 +104,7 @@
<el-popover placement="top" :width="300" trigger="click"> <el-popover placement="top" :width="300" trigger="click">
<p style="padding: 12px 0 16px; text-align: center;" class="f14">您还未登录哦~~登录后再购买吧</p> <p style="padding: 12px 0 16px; text-align: center;" class="f14">您还未登录哦~~登录后再购买吧</p>
<div style="text-align: center; padding: 14px 0;"> <div style="text-align: center; padding: 14px 0;">
<a :href="com_id_url+'/signin/'+'?isfridapp=yes&referrer='+com_edu_url+$route.path" <a :href="com_login_url" class="el-btn medium">立即登录</a>
class="el-btn medium">立即登录</a>
</div> </div>
<template #reference> <template #reference>

Loading…
Cancel
Save