|
@@ -31,7 +31,8 @@ export default {
|
|
|
src1: '../../static/images/mainLogo.png',
|
|
|
src2: '../../static/images/logo2.png',
|
|
|
index: true,
|
|
|
- apply: false
|
|
|
+ apply: false,
|
|
|
+ username:''
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -45,13 +46,22 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
goApply: function (route) {
|
|
|
- this.$router.push('/' + route)
|
|
|
if (route == 'apply') {
|
|
|
- this.apply = true
|
|
|
- this.index = false
|
|
|
- this.topchange = 'toptwo'
|
|
|
- this.scrolled = true
|
|
|
+ if(this.logined){
|
|
|
+ this.$router.push('/' + route)
|
|
|
+ this.apply = true
|
|
|
+ this.index = false
|
|
|
+ this.topchange = 'toptwo'
|
|
|
+ this.scrolled = true
|
|
|
+ }else{
|
|
|
+ this.$notify({
|
|
|
+ title: '提示',
|
|
|
+ message: '请先登录',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ }
|
|
|
} else {
|
|
|
+ this.$router.push('/' + route)
|
|
|
this.apply = false
|
|
|
this.index = true
|
|
|
}
|
|
@@ -86,6 +96,11 @@ export default {
|
|
|
this.apply = false
|
|
|
this.index = true
|
|
|
}
|
|
|
+ },
|
|
|
+ computed:{
|
|
|
+ logined(){
|
|
|
+ return this.$store.state.logined
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|