志愿测评

master
tangyi 2022-03-03 17:52:50 +08:00
commit e084fc1612
8 changed files with 51 additions and 91 deletions

View File

@ -1,58 +0,0 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

View File

@ -13,8 +13,8 @@
<span><img src="../assets/images/home/main/evaluation.png" alt=""></span>
<p>测评</p>
</li>
<li :class="{my:true, active:myStyle}" @click="goPage('/my')">
<span><img src="../../../assets/images/home/main/my.png" alt=""></span>
<li :class="{my:true, active:myStyle}" @click="goPage('/ucenter')">
<span><img src="../assets/images/home/main/my.png" alt=""></span>
<p>我的</p>
</li>
</ul>
@ -23,52 +23,50 @@
<script>
export default {
name: "home",
name: "tabbar",
props: ['current'],
data() {
return {
homeStyle: true,
expertStyle: false,
evaluationStyle: false,
myStyle: false,
isLogin: false
isLogin: false,
}
},
created() {
this.changeStyleNav(this.current);
},
beforeRouteUpdate(to, from, next) {
// console.log(to);
document.title = to.meta.title;
this.changeStyleNav(to.name);
this.changeStyleNav(this.current);
next();
},
activated() {
document.title = this.$route.meta.title;
this.changeStyleNav(this.$route.name);
this.changeStyleNav(this.current);
},
methods: {
//
changeStyleNav(name) {
switch (name) {
case "index":
changeStyleNav(number) {
switch (number) {
case 1:
this.homeStyle = true;
this.expertStyle = false;
this.evaluationStyle = false;
this.myStyle = false;
break;
case "expert":
case 2:
this.homeStyle = false;
this.expertStyle = true;
this.evaluationStyle = false;
this.myStyle = false;
break;
case "evaluation":
case 3:
this.homeStyle = false;
this.expertStyle = false;
this.evaluationStyle = true;
this.myStyle = false;
break;
case "my":
case 4:
this.homeStyle = false;
this.expertStyle = false;
this.evaluationStyle = false;

View File

@ -2,7 +2,7 @@ import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../views/login.vue' //登录
import index from '../views/index/index.vue' //登录
import index from '../views/index/index.vue' //首页
import verification from '../views/login/verification.vue' //手机验证
import start from '../views/home/start/index.vue' //开屏
@ -30,12 +30,13 @@ import editdetail from '../views/consultant/detail.vue' //预览详情
Vue.use(VueRouter)
const routes = [{
const routes = [
{
path: '/',
name: 'login',
component: login
},
{
{
path: '/index',
name: 'index',
component: index

View File

@ -91,12 +91,17 @@
</ul>
<div class="tips-btn" @click="noTips()"></div>
</div>
<tabbar :current="3"></tabbar>
</div>
</template>
<script>
import tabbar from '../../../components/tabbar.vue'
export default {
name: "evaluation",
components: {
tabbar
},
data(){
return {
isScrollTop: false,

View File

@ -75,12 +75,17 @@
<span @click="closeEV()"></span>
</div>
</div>
<tabbar :current="2"></tabbar>
</div>
</template>
<script>
import tabbar from '../../../components/tabbar.vue'
export default {
name: "expert",
components: {
tabbar
},
data(){
return {
isScrollTop: false,

View File

@ -34,7 +34,7 @@
<ul class="index-expert-list">
<li v-for="(item, index) in expertData" :key="index">
<div class="expert-img">
<img :src="item.avatar" alt="" />
<img :src="host + item.avatar" alt="" />
</div>
<div class="expert-name">
{{ item.name }}<span>{{ item.keywords_list[1] }}</span>
@ -102,12 +102,17 @@
</li>
</ul>
</div>
<tabbar :current="1"></tabbar>
</div>
</template>
<script>
import tabbar from "../../components/tabbar.vue";
export default {
name: "index",
components: {
tabbar,
},
data() {
return {
isScrollTop: false,
@ -176,10 +181,10 @@ export default {
computed: {},
methods: {
cpUrl() {
this.$router.push({
path: "/evaluation",
});
},
this.$router.push({
path: "/evaluation",
});
},
getBanner() {
let that = this;
this.axios

View File

@ -92,12 +92,17 @@
</li>
</ul>
<div class="feedback-btn">退出登录</div>
</div>
<tabbar :current="4"></tabbar>
</div>
</template>
<script>
export default {
name: "expert",
import tabbar from '../../../components/tabbar.vue'
export default {
name: "expert",
components: {
tabbar
},
data() {
return {
isScrollTop: false,
@ -191,8 +196,8 @@ export default {
</script>
<style scoped>
.banner,
.banner img {
width: 100%;
}
</style>
.banner,
.banner img {
width: 100%;
}
</style>

View File

@ -1,7 +1,6 @@
module.exports = {
devServer: {
proxy: {
'/api': {
target: 'https://ypzy.emingren.com', // 你请求的第三方接口
changeOrigin: true, // 在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题