2020-09-25 07:46:03 +00:00
|
|
|
<template>
|
|
|
|
<div class="nav">
|
2020-09-29 10:58:51 +00:00
|
|
|
<div class="logo" :style="{'background-color': types == 0 ? 'unset' : ''}">
|
|
|
|
|
2020-10-05 08:31:06 +00:00
|
|
|
<img src="@/static/images/logo.png" alt="" class="img">
|
2020-09-29 10:58:51 +00:00
|
|
|
<div class="title" :style="{'color': types == 0 ? '#07AD97' : ''}">Beelink</div>
|
2020-09-25 07:46:03 +00:00
|
|
|
</div>
|
|
|
|
<div class="navigation">
|
2020-10-05 08:31:06 +00:00
|
|
|
<div class="item" v-for="(i,j) in nav" :key="j" @click="navto(j)">
|
2020-09-25 07:46:03 +00:00
|
|
|
{{i.name}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div style="width: 100%"></div>
|
|
|
|
<div class="setting">
|
2020-10-14 03:12:03 +00:00
|
|
|
<a-dropdown :trigger="['click']" :getPopupContainer="triggerNode => triggerNode.parentNode">
|
|
|
|
<div class="item" @click="e => e.preventDefault()">
|
|
|
|
<img src="@/static/images/shijian.png" alt="" class="icon">
|
|
|
|
<div class="name">{{userinfo.zoneStr}}</div>
|
|
|
|
<img src="@/static/images/jiantou2.png" alt="" class="down">
|
|
|
|
</div>
|
|
|
|
<template v-slot:overlay>
|
|
|
|
<a-menu>
|
2020-10-22 03:13:54 +00:00
|
|
|
<!-- 时区 -->
|
|
|
|
<a-menu-item v-for="(i,j) in zonelist" :key="j" @click="zonechange(i.zoneid)">
|
2020-10-14 03:12:03 +00:00
|
|
|
<div class="selitem">
|
2020-10-22 03:13:54 +00:00
|
|
|
<span>{{i.city}}{{i.gmt}}</span>
|
2020-10-14 03:12:03 +00:00
|
|
|
</div>
|
|
|
|
</a-menu-item>
|
2020-10-22 03:13:54 +00:00
|
|
|
<!-- <a-menu-item key="1">
|
2020-10-14 03:12:03 +00:00
|
|
|
<div class="selitem">
|
2020-10-22 03:13:54 +00:00
|
|
|
<span>时区2a</span>
|
2020-10-14 03:12:03 +00:00
|
|
|
</div>
|
|
|
|
</a-menu-item>
|
|
|
|
<a-menu-item key="3">
|
|
|
|
<div class="selitem">
|
2020-10-22 03:13:54 +00:00
|
|
|
<span>时区3a</span>
|
2020-10-14 03:12:03 +00:00
|
|
|
</div>
|
2020-10-22 03:13:54 +00:00
|
|
|
</a-menu-item> -->
|
2020-10-14 03:12:03 +00:00
|
|
|
</a-menu>
|
|
|
|
</template>
|
|
|
|
</a-dropdown>
|
|
|
|
|
|
|
|
<a-dropdown :trigger="['click']" :getPopupContainer="triggerNode => triggerNode.parentNode">
|
|
|
|
<div class="item" @click="e => e.preventDefault()">
|
|
|
|
<img src="@/static/images/qianbi.png" alt="" class="icon">
|
|
|
|
<div class="name">{{userinfo.currency}}</div>
|
|
|
|
<img src="@/static/images/jiantou2.png" alt="" class="down">
|
|
|
|
</div>
|
|
|
|
<template v-slot:overlay>
|
|
|
|
<a-menu>
|
2020-10-22 03:13:54 +00:00
|
|
|
<!-- 货币 -->
|
2020-10-14 03:12:03 +00:00
|
|
|
<a-menu-item key="0">
|
|
|
|
<div class="selitem">
|
2020-10-22 03:13:54 +00:00
|
|
|
<span>时区1b</span>
|
2020-10-14 03:12:03 +00:00
|
|
|
</div>
|
|
|
|
</a-menu-item>
|
|
|
|
<a-menu-item key="1">
|
|
|
|
<div class="selitem">
|
2020-10-22 03:13:54 +00:00
|
|
|
<span>时区2b</span>
|
2020-10-14 03:12:03 +00:00
|
|
|
</div>
|
|
|
|
</a-menu-item>
|
|
|
|
<a-menu-item key="3">
|
|
|
|
<div class="selitem">
|
2020-10-22 03:13:54 +00:00
|
|
|
<span>时区3b</span>
|
2020-10-14 03:12:03 +00:00
|
|
|
</div>
|
|
|
|
</a-menu-item>
|
|
|
|
</a-menu>
|
|
|
|
</template>
|
|
|
|
</a-dropdown>
|
|
|
|
<a-dropdown :trigger="['click']" :getPopupContainer="triggerNode => triggerNode.parentNode">
|
|
|
|
<div class="item" @click="e => e.preventDefault()">
|
|
|
|
<img src="@/static/images/yuyan.png" alt="" class="icon">
|
|
|
|
<div class="name">{{userinfo.language}}</div>
|
|
|
|
<img src="@/static/images/jiantou2.png" alt="" class="down">
|
|
|
|
</div>
|
|
|
|
<template v-slot:overlay>
|
|
|
|
<a-menu>
|
2020-10-22 03:13:54 +00:00
|
|
|
<!-- 语言 -->
|
2020-10-14 03:12:03 +00:00
|
|
|
<a-menu-item key="0">
|
|
|
|
<div class="selitem">
|
2020-10-22 03:13:54 +00:00
|
|
|
<span>时区1c</span>
|
2020-10-14 03:12:03 +00:00
|
|
|
</div>
|
|
|
|
</a-menu-item>
|
|
|
|
<a-menu-item key="1">
|
|
|
|
<div class="selitem">
|
2020-10-22 03:13:54 +00:00
|
|
|
<span>时区2cc</span>
|
2020-10-14 03:12:03 +00:00
|
|
|
</div>
|
|
|
|
</a-menu-item>
|
|
|
|
<a-menu-item key="3">
|
|
|
|
<div class="selitem">
|
2020-10-22 03:13:54 +00:00
|
|
|
<span>时区3c</span>
|
2020-10-14 03:12:03 +00:00
|
|
|
</div>
|
|
|
|
</a-menu-item>
|
|
|
|
</a-menu>
|
|
|
|
</template>
|
|
|
|
</a-dropdown>
|
2020-10-15 11:33:11 +00:00
|
|
|
<div class="item" style="border-right: none;" @click="navto('/regime/date')">
|
2020-10-05 08:31:06 +00:00
|
|
|
<img src="@/static/images/rili.png" alt="" class="icon">
|
2020-09-25 07:46:03 +00:00
|
|
|
<div class="name">日历</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.nav{
|
|
|
|
display: flex;
|
2020-09-27 00:58:04 +00:00
|
|
|
user-select: none;
|
2020-09-25 07:46:03 +00:00
|
|
|
.logo{
|
|
|
|
width: 171px;
|
|
|
|
height: 57px;
|
|
|
|
background-color: #06C7AE;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
flex-shrink: 0;
|
|
|
|
.img{
|
|
|
|
width: 38px;
|
|
|
|
height: 38px;
|
|
|
|
margin-left: 14px;
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
.title{
|
|
|
|
margin-left: 9px;
|
|
|
|
font-size: 17px;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.navigation{
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
flex-shrink: 0;
|
|
|
|
margin-left: 28px;
|
|
|
|
.item{
|
|
|
|
padding: 0 28px;
|
|
|
|
height: 18px;
|
|
|
|
border-right: 1px solid #eee;
|
|
|
|
font-size: 11px;
|
|
|
|
color: #111;
|
|
|
|
font-weight: bold;
|
|
|
|
&:last-child{
|
|
|
|
border-right: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.setting{
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
flex-shrink: 0;
|
|
|
|
padding: 0 16px;
|
2020-10-14 03:12:03 +00:00
|
|
|
.selitem{
|
|
|
|
text-align: center;
|
|
|
|
font-size: 11px;
|
|
|
|
color: #111;
|
|
|
|
}
|
2020-09-25 07:46:03 +00:00
|
|
|
.item{
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
border-right: 1px solid #eee;
|
|
|
|
padding: 0 23px;
|
|
|
|
height: 18rpx;
|
|
|
|
.icon{
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
}
|
|
|
|
.name{
|
|
|
|
margin-left: 6px;
|
|
|
|
font-size: 11px;
|
|
|
|
color: #111;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
.down{
|
|
|
|
width: 9px;
|
|
|
|
height: 5px;
|
|
|
|
margin-left: 20px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script lang="ts">
|
2020-10-22 03:13:54 +00:00
|
|
|
import { editsystemsetting, getzonelist } from '@/api';
|
2020-10-05 08:31:06 +00:00
|
|
|
import router from '@/router';
|
2020-10-10 02:57:00 +00:00
|
|
|
import store from '@/store';
|
2020-10-22 03:13:54 +00:00
|
|
|
import { computed, defineComponent, onMounted, ref } from 'vue';
|
2020-09-27 00:58:04 +00:00
|
|
|
import { useRoute } from 'vue-router';
|
2020-09-25 07:46:03 +00:00
|
|
|
|
|
|
|
export default defineComponent({
|
2020-09-29 10:58:51 +00:00
|
|
|
props:{
|
|
|
|
type: {
|
|
|
|
type: Number,
|
|
|
|
default:0
|
|
|
|
}
|
|
|
|
},
|
|
|
|
setup(props){
|
2020-09-27 00:58:04 +00:00
|
|
|
// console.log(useRoute().currentRoute.value.name)
|
|
|
|
const routes = useRoute();
|
|
|
|
console.log(routes.path);
|
2020-09-29 10:58:51 +00:00
|
|
|
const types = ref(props.type)
|
2020-10-22 03:13:54 +00:00
|
|
|
const zonelist=ref<any>([{
|
|
|
|
city: "中途岛",
|
|
|
|
gmt: "GMT-11:00",
|
|
|
|
id: "Pacific/Midway",
|
|
|
|
zoneid: 1
|
|
|
|
|
|
|
|
}])
|
|
|
|
const selectedzone=ref([])
|
|
|
|
const currencylist=ref([])
|
2020-09-29 10:58:51 +00:00
|
|
|
console.log(types.value)
|
2020-09-25 07:46:03 +00:00
|
|
|
interface Nav{
|
|
|
|
name: string;
|
|
|
|
route: string;
|
|
|
|
}
|
|
|
|
const nav: Array<Nav> = [
|
|
|
|
{
|
|
|
|
name: "直播管理",
|
2020-10-10 06:34:23 +00:00
|
|
|
route: "/regime/live"
|
2020-09-25 07:46:03 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "视频管理",
|
2020-10-05 08:31:06 +00:00
|
|
|
route: "/regime/video"
|
2020-09-25 07:46:03 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "订阅者管理",
|
2020-10-10 06:34:23 +00:00
|
|
|
route: "/regime/subscriber"
|
2020-09-25 07:46:03 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "个人中心",
|
2020-10-05 08:31:06 +00:00
|
|
|
route: "/mine/archives"
|
2020-09-25 07:46:03 +00:00
|
|
|
}
|
|
|
|
]
|
2020-10-10 02:57:00 +00:00
|
|
|
const userinfo = computed(() => {
|
|
|
|
return store.state.userinfo;
|
|
|
|
})
|
|
|
|
|
2020-10-15 11:33:11 +00:00
|
|
|
function navto(index: number | string){
|
|
|
|
if(typeof index == "number"){
|
|
|
|
router.push({
|
|
|
|
path: nav[index].route
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
router.push(index)
|
|
|
|
}
|
|
|
|
|
2020-10-05 08:31:06 +00:00
|
|
|
}
|
2020-10-22 03:13:54 +00:00
|
|
|
onMounted(async () => {
|
|
|
|
zonelist.value=await getzonelist()
|
|
|
|
// console.log(zonelist.value)
|
|
|
|
// currencylist.value=await getcurrencys()
|
|
|
|
})
|
|
|
|
|
|
|
|
function zonechange(e?: any){
|
|
|
|
// console.log(e,1002)
|
|
|
|
editsystemsetting({zoneid:e})
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-09-25 07:46:03 +00:00
|
|
|
return {
|
2020-09-29 10:58:51 +00:00
|
|
|
nav,
|
2020-10-05 08:31:06 +00:00
|
|
|
types,
|
2020-10-10 02:57:00 +00:00
|
|
|
navto,
|
2020-10-22 03:13:54 +00:00
|
|
|
userinfo,
|
|
|
|
zonelist,
|
|
|
|
zonechange,
|
|
|
|
selectedzone,
|
|
|
|
currencylist
|
2020-09-25 07:46:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
</script>
|