mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-17 16:13:48 +08:00
更改首页
This commit is contained in:
@@ -41,10 +41,14 @@
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="userlogin/login" class="rc-md-up rc-btn rc-btn--icon rc-icon ts-login--xs rc-iconography rc-interactive" aria-label="login">
|
||||
<a class="rc-md-up rc-btn rc-btn--icon rc-icon ts-login--xs rc-iconography rc-interactive" aria-label="login" @click="turnlogin">
|
||||
<span class="rc-screen-reader-text">
|
||||
登录
|
||||
</span>
|
||||
<em class="rc-screen-reader" v-show="loginornot">
|
||||
|
||||
</em>
|
||||
|
||||
</a>
|
||||
|
||||
<!--
|
||||
@@ -59,7 +63,7 @@
|
||||
translations.feature.headerbar.pin
|
||||
</span>
|
||||
</a>
|
||||
<button data-js-trigger="search-bar" onclick='bindTracking(this)' evt-name='页内弹窗' evt-cat='headerBtnClick' evt-val='全文搜索' class="rc-btn rc-btn--icon rc-icon rc-search--xs rc-iconography rc-interactive" aria-label="Search" role="menuitem" data-click-modifier=".rc-hidden">
|
||||
<button data-js-trigger="search-bar" @click='searchturn' evt-name='页内弹窗' evt-cat='headerBtnClick' evt-val='全文搜索' class="rc-btn rc-btn--icon rc-icon rc-search--xs rc-iconography rc-interactive" aria-label="Search" role="menuitem" data-click-modifier=".rc-hidden">
|
||||
<span class="rc-screen-reader-text">translations.feature.headerbar.search</span>
|
||||
</button>
|
||||
</li>
|
||||
@@ -375,22 +379,62 @@
|
||||
</template>
|
||||
<script>
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
headerScroll:false
|
||||
headerScroll:false,
|
||||
loginornot:true,//用户是否登录提示点
|
||||
usermessage:null,//存储用户信息
|
||||
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
//判断用户有无登录显示红点
|
||||
let usernot=JSON.parse(localStorage.getItem("userInfo"));
|
||||
console.log(usernot);
|
||||
if(usernot==null ||usernot==undefined){
|
||||
console.log(usernot);
|
||||
this.loginornot=true
|
||||
}else{
|
||||
this.loginornot=false
|
||||
this.usermessage=usernot;
|
||||
}
|
||||
console.log(this.loginornot);
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
bindTracking: function(){
|
||||
console.log('bindTracking');
|
||||
},
|
||||
|
||||
//
|
||||
//跳转搜索
|
||||
searchturn(){
|
||||
this.$router.push({ name: "usersearch-search",
|
||||
|
||||
})
|
||||
},
|
||||
//判断有无登录跳转不同页面
|
||||
turnlogin(){
|
||||
if(this.usermessage==null||this.usermessage==undefined){
|
||||
this.$router.push({ name: "userlogin-login",
|
||||
params:{id:12,key:'222'}
|
||||
})
|
||||
}else{
|
||||
this.$router.push({ name: "personal-mypersonal",
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
@import url("../assets/css/global.less");
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user