11
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
NODE_ENV = production
|
||||
NODE_ENV = staging
|
||||
|
||||
# 测试环境配置
|
||||
ENV = 'staging'
|
||||
|
||||
# EBTS/测试环境
|
||||
#VUE_APP_BASE_API = '/dev-api'
|
||||
#VUE_APP_BASE_API = 'https://api.ebts.top/dev-api'
|
||||
VUE_APP_BASE_API = 'http://tapi.ebts.top/dev-api'
|
||||
VUE_APP_BASE_API = 'http://sistapi.hchyun.cn/dev-api'
|
||||
|
||||
1616
package-lock.json
generated
1616
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "lab_web",
|
||||
"name": "sist_web",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@@ -16,6 +16,7 @@
|
||||
"dependencies": {
|
||||
"core-js": "^3.6.5",
|
||||
"element-ui": "^2.15.6",
|
||||
"less-loader": "^5.0.0",
|
||||
"script-ext-html-webpack-plugin": "^2.1.5",
|
||||
"vue": "^2.6.11",
|
||||
"vue-i18n": "^8.26.7",
|
||||
@@ -31,6 +32,8 @@
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"node-sass": "^4.14.1",
|
||||
"sass-loader": "8.0.2",
|
||||
"vue-template-compiler": "^2.6.11",
|
||||
"vuex": "^3.6.2"
|
||||
},
|
||||
|
||||
@@ -6,6 +6,24 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
<script>
|
||||
fnResize();
|
||||
window.onresize = function() {
|
||||
fnResize();
|
||||
}
|
||||
|
||||
function fnResize() {
|
||||
var deviceWidth = document.documentElement.clientWidth || window.innerWidth;
|
||||
if (deviceWidth >= 750) {
|
||||
deviceWidth = 750;
|
||||
}
|
||||
if (deviceWidth <= 320) {
|
||||
deviceWidth = 320;
|
||||
}
|
||||
document.documentElement.style.fontSize = (deviceWidth / 75) + 'px';
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
||||
96
src/App.vue
96
src/App.vue
@@ -1,33 +1,81 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<div id="nav">
|
||||
<router-link to="/">Home</router-link> |
|
||||
<router-link to="/about">About</router-link>
|
||||
<div v-show="iftop" class="totop flexCenter" @click="backTop">
|
||||
<i class="el-icon-top" style="color: #409eff"></i>
|
||||
</div>
|
||||
<div> {{$t('message.hello')}} </div>
|
||||
<router-view/>
|
||||
<div class="headers">
|
||||
<headers/>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col></el-col>
|
||||
<el-col style="height: 500rem;width: 100%; background-color:red;">
|
||||
<router-view/>
|
||||
</el-col>
|
||||
<el-col></el-col>
|
||||
</el-row>
|
||||
<footers/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import headers from './views/header/index'
|
||||
import footers from './views/footer/index'
|
||||
export default {
|
||||
name:'App',
|
||||
components:{
|
||||
headers,
|
||||
footers
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
iftop: false
|
||||
}
|
||||
},
|
||||
mounted() { //监听scroll方法
|
||||
window.addEventListener('scroll', this.handleScroll)
|
||||
},
|
||||
beforeDestroy() { //及时释放
|
||||
window.removeEventListener('scroll', this.handleScroll)
|
||||
},
|
||||
methods: {
|
||||
handleScroll() {
|
||||
this.iftop = window.pageYOffset > 400
|
||||
},
|
||||
backTop() {
|
||||
window.scrollTo({top: 0, behavior: 'smooth',})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.headers{
|
||||
width: 100%;
|
||||
z-index: 9999;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.totop {
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
}
|
||||
|
||||
#nav {
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
#nav a {
|
||||
font-weight: bold;
|
||||
color: #2c3e50;
|
||||
}
|
||||
|
||||
#nav a.router-link-exact-active {
|
||||
color: #42b983;
|
||||
position: fixed;
|
||||
bottom: 100px;
|
||||
right: 40px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
font-size: 24px;
|
||||
line-height: 40px;
|
||||
font-weight: 600;
|
||||
color: #1989fa;
|
||||
background-color: #fff;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 6px rgba(0, 0, 0, .12);
|
||||
cursor: pointer;
|
||||
z-index: 5;
|
||||
}
|
||||
</style>
|
||||
|
||||
BIN
src/assets/header/sy_logo1.png
Normal file
BIN
src/assets/header/sy_logo1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
BIN
src/assets/header/sy_logo1@2x.png
Normal file
BIN
src/assets/header/sy_logo1@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
src/assets/header/sy_logo2.png
Normal file
BIN
src/assets/header/sy_logo2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/assets/header/sy_logo2@2x.png
Normal file
BIN
src/assets/header/sy_logo2@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.8 KiB |
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<p>{{label}}</p>
|
||||
<button @click="switchLang">切换</button>
|
||||
<div> {{$t('message.hello')}} </div>
|
||||
<button @click="switchLang">{{$t('message.switch')}}</button>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import {test} from '@/api/test'
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
components: {
|
||||
@@ -15,24 +15,24 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['lang']),
|
||||
label () {
|
||||
return this.$t('message.hello')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
switchLang () {
|
||||
test().then(res =>{
|
||||
console.log(res)
|
||||
})
|
||||
let lang = ''
|
||||
if (this.lang === 'en') {
|
||||
if (this.$i18n.locale === 'en') {
|
||||
lang = 'cn'
|
||||
} else {
|
||||
lang = 'en'
|
||||
}
|
||||
this.$store.commit('switchLang', lang)
|
||||
this.$i18n.locale = lang;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
h1,
|
||||
h2 {
|
||||
|
||||
@@ -5,7 +5,12 @@ const cn = {
|
||||
message: {
|
||||
'hello': '你好,世界',
|
||||
'switch': 'English',
|
||||
'test':'测试'
|
||||
'test':'测试',
|
||||
'student':'学生',
|
||||
'staff':'教职工',
|
||||
'alumni':'校友',
|
||||
'examine':'考生',
|
||||
'Services portal':'服务门户',
|
||||
},
|
||||
...zhLocale
|
||||
}
|
||||
|
||||
@@ -5,7 +5,12 @@ const en = {
|
||||
message: {
|
||||
'hello': 'hello, world',
|
||||
'switch': '简体中文',
|
||||
'test':'test'
|
||||
'test':'test',
|
||||
'student':'student',
|
||||
'staff':'staff',
|
||||
'alumni':'alumni',
|
||||
'examine':'examine',
|
||||
'Services portal':'Services portal',
|
||||
},
|
||||
...enLocale
|
||||
}
|
||||
|
||||
@@ -1,26 +1,33 @@
|
||||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import Home from '../views/Home.vue'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
component: Home
|
||||
name: 'index',
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/index/index')
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: 'About',
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
|
||||
}
|
||||
path: '/sp',
|
||||
name: 'SchoolProfile',
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/school_profile/index')
|
||||
},
|
||||
{
|
||||
path: '/ts',
|
||||
name: 'TeachingStaff',
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/teaching_staff/index')
|
||||
},
|
||||
{
|
||||
path: '/et',
|
||||
name: 'EduTeach',
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/edu_teach/index')
|
||||
},
|
||||
]
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
routes
|
||||
})
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<template>
|
||||
<div class="about">
|
||||
{{$t("message.test")}}
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,59 +0,0 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<p>{{$t('message.hello')}}</p>
|
||||
<button @click="switchLang">{{$t('message.switch')}}</button>
|
||||
<div>
|
||||
<About/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {test} from '@/api/test'
|
||||
import About from './About'
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
components: {
|
||||
About
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
label () {
|
||||
return this.$t('message.hello')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
switchLang () {
|
||||
test().then(res =>{
|
||||
console.log(res)
|
||||
})
|
||||
let lang = ''
|
||||
if (this.$i18n.locale === 'en') {
|
||||
lang = 'cn'
|
||||
} else {
|
||||
lang = 'en'
|
||||
}
|
||||
this.$i18n.locale = lang;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
h1,
|
||||
h2 {
|
||||
font-weight: normal;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
||||
13
src/views/edu_teach/index.vue
Normal file
13
src/views/edu_teach/index.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "index"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
18
src/views/footer/index.vue
Normal file
18
src/views/footer/index.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<div class="footer">
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "index"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.footer{
|
||||
height: 26.7rem;
|
||||
background-color: rgb(107 109 108);
|
||||
}
|
||||
</style>
|
||||
155
src/views/header/index.vue
Normal file
155
src/views/header/index.vue
Normal file
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<el-row>
|
||||
<el-col :offset="3" :span="18">
|
||||
<div class="header">
|
||||
<!--头部部分-->
|
||||
<div class="top">
|
||||
<el-row>
|
||||
<el-col :span="2">
|
||||
<div class="link">
|
||||
{{ $t('message.student') }}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div class="link">
|
||||
{{ $t('message.staff') }}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div class="link">
|
||||
{{ $t('message.alumni') }}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div class="link">
|
||||
{{ $t('message.examine') }}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div class="link">
|
||||
{{ $t('message.Services portal') }}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :offset="12" :span="2">
|
||||
<div class="switchLang" @click="switchLang">{{ $t('message.switch') }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<!--导航部分-->
|
||||
<div class="bottom">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<div class="icon">
|
||||
<div class="icont"><img src="@/assets/header/sy_logo1@2x.png" alt=""></div>
|
||||
<div class="iconb"><img src="@/assets/header/sy_logo2@2x.png" alt=""></div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :offset="1" :span="19">
|
||||
<div class="banner">
|
||||
<div>学院首页</div>
|
||||
<div>学院概况</div>
|
||||
<div>党群工作</div>
|
||||
<div>师资队伍</div>
|
||||
<div>教育教学</div>
|
||||
<div>科学研究</div>
|
||||
<div>学科建设</div>
|
||||
<div>学生工作</div>
|
||||
<div>校友工作</div>
|
||||
<div>国际化</div>
|
||||
<div>资料下载</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "index",
|
||||
methods: {
|
||||
switchLang() {
|
||||
let lang = ''
|
||||
if (this.$i18n.locale === 'en') {
|
||||
lang = 'cn'
|
||||
} else {
|
||||
lang = 'en'
|
||||
}
|
||||
this.$i18n.locale = lang;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.header {
|
||||
.top {
|
||||
font-size: 1.2rem;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 3rem;
|
||||
width: 100%;
|
||||
height: 3rem;
|
||||
background: #1956BC;
|
||||
|
||||
.switchLang {
|
||||
cursor: pointer;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
.link:hover{
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.bottom {
|
||||
height: 8rem;
|
||||
background: rgba(25, 86, 188, 0.6);
|
||||
border-radius: 0rem 0rem 2rem 2rem;
|
||||
.icon{
|
||||
margin-left: 20%;
|
||||
div{
|
||||
margin-top: 1rem;
|
||||
}
|
||||
.icont{
|
||||
img{
|
||||
width: 18.3rem;
|
||||
}
|
||||
}
|
||||
.iconb{
|
||||
img{
|
||||
width: 8.9rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.banner{
|
||||
width: 100%;
|
||||
height: 8rem;
|
||||
clear: left;
|
||||
div{
|
||||
width: 9%;
|
||||
height: 100%;
|
||||
line-height: 8rem;
|
||||
text-align: center;
|
||||
float: left;
|
||||
font-size: 1.4rem;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
cursor:pointer;
|
||||
}
|
||||
div:hover{
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
13
src/views/index/index.vue
Normal file
13
src/views/index/index.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "index"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
13
src/views/school_profile/index.vue
Normal file
13
src/views/school_profile/index.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "index"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
13
src/views/teaching_staff/index.vue
Normal file
13
src/views/teaching_staff/index.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "index"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user