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

View File

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

View File

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

View File

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