添加跳转

chengdu
yujialong 4 years ago
parent 8dcbcf6f88
commit 948e371bf0
  1. 22
      src/components/page/Index.vue
  2. 21
      src/components/page/ProjectIntro.vue
  3. 10
      src/components/page/ProjectPattern.vue
  4. 10
      src/router/index.js
  5. 10
      src/utils/core.js

@ -1,14 +1,32 @@
<template>
<div class="wrap">
<div class="button_wrap">
<div class="button_item"><i class="iconfont icon-arrowRight"></i></div>
<div class="button_item"><i class="iconfont icon-arrowRight"></i></div>
<div class="button_item" @click="toNext"><i class="iconfont icon-arrowRight"></i></div>
<div class="button_item" @click="toNext"><i class="iconfont icon-arrowRight"></i></div>
</div>
<div class="notice">
期货交易虚拟仿真实验已经通过2019年四川省级虚拟仿真实验认定
</div>
</div>
</template>
<script>
export default {
name: 'project',
data() {
return {
};
},
mounted() {
},
methods: {
toNext() {
this.$router.push('ProjectIntro')
},
}
};
</script>
<style lang="scss" scoped>
.wrap{
width: 100%;

@ -3,23 +3,23 @@
<!-- 项目介绍+课前预习 -->
<div class="nav_wrap">
<div class="introduce">项目介绍</div>
<div>课前预习</div>
<div @click="toCourse">课前预习</div>
</div>
<!-- 项目介绍文字 -->
<div class="project_wrap">
<div class="project_title">{{title}}</div>
<div class="peoject_content">
<div class="content_text">{{contentText}}</div>
<div class="back_index"><i class="iconfont icon-home"></i></div>
<div class="back_index" @click="toIndex"><i class="iconfont icon-home"></i></div>
</div>
</div>
<!-- 选择期权模式基础+挑战 -->
<div class="select_wrap">
<div class="select_item">
<div class="select_item" @click="toNext(0)">
<div class="icon_one icon_wrap"><i class="iconfont icon-arrowRight"></i></div>
<div class="select_title one_title">期权套期保值实验</div>
</div>
<div class="select_item">
<div class="select_item" @click="toNext(1)">
<div class="icon_two icon_wrap"><i class="iconfont icon-arrowRight"></i></div>
<div class="select_title two_title">期权组合保险实验</div>
</div>
@ -39,7 +39,15 @@ export default {
},
methods: {
toIndex() {
this.$router.push('dashboard')
},
toCourse() {
this.$router.push('dashboard#1')
},
toNext(index) {
this.$router.push(`ProjectPattern?type=${index}`)
},
},
};
</script>
@ -66,7 +74,7 @@ export default {
line-height: 50px;
text-align: center;
font-size: 26px;
cursor: pointer;
}
}
.project_wrap{
@ -127,6 +135,7 @@ export default {
.select_item{
width: 350px;
display: flex;
cursor: pointer;
.icon_wrap{
width: 60px;
height: 60px;

@ -25,15 +25,15 @@
</div>
</div>
<div class="pattern_wrap">
<div class="img_wrap">
<div class="img_wrap" @click="core.toSubSystem('')">
<div><img src="../../assets/img/buttonOne.png" alt=""></div>
<div>练习模式</div>
</div>
<div class="img_wrap">
<div class="img_wrap" @click="toNext(4)">
<div><img src="../../assets/img/buttonTwo.png" alt=""></div>
<div>考核模式</div>
</div>
<div class="img_wrap">
<div class="img_wrap" @click="toNext(5)">
<div><img src="../../assets/img/buttonThree.png" alt=""></div>
<div>实验记录</div>
</div>
@ -65,7 +65,9 @@ export default {
},
methods: {
toNext(index) {
this.$router.push(`dashboard#${index}`)
},
},
};
</script>

@ -32,6 +32,16 @@ export default new Router({
component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
meta: { title: '管理员' }
},
{
path: '/ProjectIntro',
component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/ProjectIntro.vue'),
meta: { title: '管理员' }
},
{
path: '/ProjectPattern',
component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/ProjectPattern.vue'),
meta: { title: '管理员' }
},
{
path: '/showExperiment',
component: () => import(/* webpackChunkName: "403" */ '../components/page/ShowExperiment.vue')

@ -160,8 +160,14 @@ function getCaption(obj){
}
function toSubSystem(className = '',id = '',classId = ''){
let href = `${config.subSystem}?auth=${btoa(store.state.token)}&userName=${store.state.userName}&class=${className}&id=${id}&classId=${classId}`
location.href = href
sessionStorage.setItem("token",store.state.token);//token
sessionStorage.setItem("userName",store.state.userName);//用户名
sessionStorage.setItem("class",className);//班级名
sessionStorage.setItem("id",id);//考核或者竞赛id,且是否为练习模式,空为练习,不是空即为考核或者竞赛,后面会调用方法,基于考核或者竞赛id查询项目id,且做覆盖
sessionStorage.setItem("tmsTeachId",id);//考核id
sessionStorage.setItem("kdAssessmentId",id);//竞赛id
sessionStorage.setItem("classId",classId);//班级id
location.href = config.subSystem
}
function encodeString(str) {

Loading…
Cancel
Save