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){
|
||||
this.$store.dispatch('SetCurIdentity',iden);
|
||||
|
||||
if(this.isTest){
|
||||
//this.$router.push('/manage/learningpath');
|
||||
location.href='/manage/learningpath';
|
||||
}else{
|
||||
this.$router.push('/manager/index');
|
||||
}
|
||||
this.$router.push('/manager/index');
|
||||
// if(this.isTest){
|
||||
// //this.$router.push('/manage/learningpath');
|
||||
// location.href='/manage/learningpath';
|
||||
// }else{
|
||||
// this.$router.push('/manager/index');
|
||||
// }
|
||||
},
|
||||
jumrank(){
|
||||
this.$router.push('/user/ranking');
|
||||
|
||||
@@ -99,12 +99,12 @@
|
||||
<span><a href="/resource/index.html" target="_blank" style="color:#303133;">旧版管理员界面</a></span>
|
||||
</template>
|
||||
</el-menu-item>
|
||||
<!-- <el-menu-item v-show="curIdentity == 3">
|
||||
<el-menu-item v-show="curIdentity == 3 && isTest">
|
||||
<template slot="title">
|
||||
<svg-icon icon-class="administrator" style="font-size:17px"></svg-icon>
|
||||
<span><a href="/manage/learningpath" target="_blank" style="color:#303133;">新版管理员界面</a></span>
|
||||
</template>
|
||||
</el-menu-item> -->
|
||||
</el-menu-item>
|
||||
<el-menu-item v-show="curIdentity == 3">
|
||||
<template slot="title">
|
||||
<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 apicourseStudy from "../../api/modules/courseStudy.js"
|
||||
import courseImage from "@/components/Course/courseImage.vue"
|
||||
import testUser from '@/utils/testUsers.js'
|
||||
export default {
|
||||
name: 'UcMenu',
|
||||
components: {
|
||||
courseImage,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['curIdentity', 'messagesBeReviewed', 'studyTaskCount']),
|
||||
...mapGetters(['curIdentity', 'messagesBeReviewed', 'studyTaskCount','userInfo']),
|
||||
activeMenu() {
|
||||
const route = this.$route;
|
||||
const { meta, path } = route;
|
||||
@@ -385,6 +386,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isTest:false,
|
||||
badge: 0,
|
||||
isCollapse: false,
|
||||
lastStudy:{},
|
||||
@@ -396,6 +398,12 @@ export default {
|
||||
this.$store.dispatch('refrashStudyTaskCount');
|
||||
this.getLastStudy();
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.userInfo.loginName,'this.userInfo.loginName')
|
||||
if(testUser.isTest(this.userInfo.loginName)){
|
||||
this.isTest=true;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toCourseDetail(item){
|
||||
if(isNaN(item.courseType)){
|
||||
|
||||
@@ -13,7 +13,7 @@ const isTest=function(code){
|
||||
var testUser=false;
|
||||
var mode=process.env.NODE_ENV;
|
||||
|
||||
if(mode=='testing'){
|
||||
if(mode=='testing' || mode=='development'){
|
||||
userCodes.some(item=>{
|
||||
if(item===code){
|
||||
testUser=true;
|
||||
@@ -32,7 +32,7 @@ const isTest=function(code){
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return testUser;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user