mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
灰度白名单测试
This commit is contained in:
@@ -162,13 +162,13 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
|||||||
|
|
||||||
setCurIdentity(iden){
|
setCurIdentity(iden){
|
||||||
this.$store.dispatch('SetCurIdentity',iden);
|
this.$store.dispatch('SetCurIdentity',iden);
|
||||||
|
this.$router.push('/manager/index');
|
||||||
if(this.isTest){
|
// if(this.isTest){
|
||||||
//this.$router.push('/manage/learningpath');
|
// //this.$router.push('/manage/learningpath');
|
||||||
location.href='/manage/learningpath';
|
// location.href='/manage/learningpath';
|
||||||
}else{
|
// }else{
|
||||||
this.$router.push('/manager/index');
|
// this.$router.push('/manager/index');
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
jumrank(){
|
jumrank(){
|
||||||
this.$router.push('/user/ranking');
|
this.$router.push('/user/ranking');
|
||||||
|
|||||||
@@ -99,12 +99,12 @@
|
|||||||
<span><a href="/resource/index.html" target="_blank" style="color:#303133;">旧版管理员界面</a></span>
|
<span><a href="/resource/index.html" target="_blank" style="color:#303133;">旧版管理员界面</a></span>
|
||||||
</template>
|
</template>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<!-- <el-menu-item v-show="curIdentity == 3">
|
<el-menu-item v-show="curIdentity == 3 && isTest">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<svg-icon icon-class="administrator" style="font-size:17px"></svg-icon>
|
<svg-icon icon-class="administrator" style="font-size:17px"></svg-icon>
|
||||||
<span><a href="/manage/learningpath" target="_blank" style="color:#303133;">新版管理员界面</a></span>
|
<span><a href="/manage/learningpath" target="_blank" style="color:#303133;">新版管理员界面</a></span>
|
||||||
</template>
|
</template>
|
||||||
</el-menu-item> -->
|
</el-menu-item>
|
||||||
<el-menu-item v-show="curIdentity == 3">
|
<el-menu-item v-show="curIdentity == 3">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<svg-icon icon-class="management" style="font-size:16px"></svg-icon>
|
<svg-icon icon-class="management" style="font-size:16px"></svg-icon>
|
||||||
@@ -364,13 +364,14 @@ import { mapGetters } from 'vuex';
|
|||||||
import apiCourse from '../../api/modules/course.js';
|
import apiCourse from '../../api/modules/course.js';
|
||||||
import apicourseStudy from "../../api/modules/courseStudy.js"
|
import apicourseStudy from "../../api/modules/courseStudy.js"
|
||||||
import courseImage from "@/components/Course/courseImage.vue"
|
import courseImage from "@/components/Course/courseImage.vue"
|
||||||
|
import testUser from '@/utils/testUsers.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'UcMenu',
|
name: 'UcMenu',
|
||||||
components: {
|
components: {
|
||||||
courseImage,
|
courseImage,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['curIdentity', 'messagesBeReviewed', 'studyTaskCount']),
|
...mapGetters(['curIdentity', 'messagesBeReviewed', 'studyTaskCount','userInfo']),
|
||||||
activeMenu() {
|
activeMenu() {
|
||||||
const route = this.$route;
|
const route = this.$route;
|
||||||
const { meta, path } = route;
|
const { meta, path } = route;
|
||||||
@@ -385,6 +386,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isTest:false,
|
||||||
badge: 0,
|
badge: 0,
|
||||||
isCollapse: false,
|
isCollapse: false,
|
||||||
lastStudy:{},
|
lastStudy:{},
|
||||||
@@ -396,6 +398,12 @@ export default {
|
|||||||
this.$store.dispatch('refrashStudyTaskCount');
|
this.$store.dispatch('refrashStudyTaskCount');
|
||||||
this.getLastStudy();
|
this.getLastStudy();
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
console.log(this.userInfo.loginName,'this.userInfo.loginName')
|
||||||
|
if(testUser.isTest(this.userInfo.loginName)){
|
||||||
|
this.isTest=true;
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toCourseDetail(item){
|
toCourseDetail(item){
|
||||||
if(isNaN(item.courseType)){
|
if(isNaN(item.courseType)){
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const isTest=function(code){
|
|||||||
var testUser=false;
|
var testUser=false;
|
||||||
var mode=process.env.NODE_ENV;
|
var mode=process.env.NODE_ENV;
|
||||||
|
|
||||||
if(mode=='testing'){
|
if(mode=='testing' || mode=='development'){
|
||||||
userCodes.some(item=>{
|
userCodes.some(item=>{
|
||||||
if(item===code){
|
if(item===code){
|
||||||
testUser=true;
|
testUser=true;
|
||||||
@@ -32,7 +32,7 @@ const isTest=function(code){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return testUser;
|
return testUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user