zj #84

Merged
asd merged 2 commits from zj into master 2020-10-26 15:13:02 +08:00
4 changed files with 40 additions and 8 deletions

View File

@ -1,7 +1,9 @@
<template>
<div class="nav-bottom">
<div class="nav-container" :style="color">
<div v-for="(item, index) in navArray" :key="index" class="nav-item" @click="navto(item.route)">{{ item.name }}</div>
<div v-for="(item, index) in navArray" :key="index" class="nav-item" @click="navto(item.route)">
<div :class="item.route==nowroute?'active':''">{{ item.name }}</div>
</div>
</div>
<div class="copyright" :style="color">Beelink公司版权所有 20192022</div>
</div>
@ -9,7 +11,8 @@
<script lang="ts">
import router from '@/router';
import { defineComponent } from 'vue';
import { defineComponent, onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
export default defineComponent({
props:{
@ -20,6 +23,10 @@ export default defineComponent({
name: string;
route: string;
}
const routes=useRoute()
const nowroute=ref<string>(routes.path)
console.log(routes.path)
const navArray: Array<Nav> = [
{
name: "直播管理",
@ -39,12 +46,16 @@ export default defineComponent({
}
]
function navto(url: string){
nowroute.value=url
router.push(url)
}
return {
navArray,
navto
navto,
nowroute
}
}
})
@ -67,6 +78,7 @@ export default defineComponent({
.nav-item {
padding: 0 14px;
position: relative;
cursor: pointer;
&:not(:last-child)::after {
content: "";
position: absolute;
@ -78,6 +90,13 @@ export default defineComponent({
transform: translate(0, -50%);
}
}
.nav-item:hover{
color: #06C7AE;
}
.active{
color: #06C7AE;
}
}
.copyright {
font-size: 9px;

View File

@ -7,7 +7,7 @@
</div>
<div class="navigation">
<div class="item" v-for="(i,j) in nav" :key="j" @click="navto(j)">
{{i.name}}
<div :class="i.route==nowroute?'active':''">{{i.name}}</div>
</div>
</div>
<div style="width: 100%"></div>
@ -136,10 +136,17 @@
font-size: 11px;
color: #111;
font-weight: bold;
cursor: pointer;
&:last-child{
border-right: none;
}
}
.item:hover{
color: #06C7AE;
}
}
.active{
color: #06C7AE;
}
.setting{
display: flex;
@ -253,12 +260,14 @@ export default defineComponent({
const userinfo = computed(() => {
return store.state.userinfo;
})
const nowroute=ref<string>("")
function navto(index: number | string){
if(!store.state.islogin){
return ;
}
if(typeof index == "number"){
nowroute.value=nav[index].route
router.push({
path: nav[index].route
})
@ -272,6 +281,8 @@ export default defineComponent({
// console.log(zonelist.value)
currencylist.value=await getcurrencys()
languagelist.value=await getlanguages()
console.log(routes.path)
nowroute.value=routes.path
})
function zonechange(e?: any){
@ -296,7 +307,8 @@ export default defineComponent({
currencylist,
currencychange,
languagelist,
setlanguage
setlanguage,
nowroute
}
}
})

View File

@ -179,6 +179,8 @@ export default defineComponent({
}else{
message.error("用户不存在")
}
}else if(e==3){
if(uinfo.value.phone==""|| uinfo.value.code==""|| uinfo.value.password==""|| uinfo.value.repassword==""){
message.error("请先完善相关信息")
@ -195,12 +197,12 @@ export default defineComponent({
const res= await editpassword(toRaw(uinfo.value))
if(res.code==0){
stepnow.value=e
router.push("/")
}
}else{
message.error("验证码有误,请重新输入")
}
}
};

View File

@ -652,7 +652,6 @@ export default defineComponent({
// picinfo.url=res.video.url
formData.value.img = res.video.url;
}
currencyindex.value=userinfo.value.currencyValue
return {
modalNode,