添加了部分路由

This commit is contained in:
luyuan 2020-10-05 16:31:06 +08:00
parent f4af1db7a5
commit 75ab941063
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
20 changed files with 63 additions and 47 deletions

View File

@ -11,7 +11,7 @@
<div v-for="(i,j) in list" :key="j" style="overflow: hidden;" @click="routeto(j)"> <div v-for="(i,j) in list" :key="j" style="overflow: hidden;" @click="routeto(j)">
<div class="item" :class="{'selitem': j == selnum, 'seltop': j == selnum - 1, 'selbottom': j == selnum + 1}"> <div class="item" :class="{'selitem': j == selnum, 'seltop': j == selnum - 1, 'selbottom': j == selnum + 1}">
<div class="route"> <div class="route">
<img src="" alt="" class="icon"> <img :src="i.icon" alt="" class="icon">
<div class="title">{{i.name}}</div> <div class="title">{{i.name}}</div>
</div> </div>
<img src="" alt="" class="right"> <img src="" alt="" class="right">
@ -79,7 +79,6 @@
.icon{ .icon{
width: 15px; width: 15px;
height: 15px; height: 15px;
background-color: #0f0;
} }
.title{ .title{
font-size: 13px; font-size: 13px;
@ -118,47 +117,54 @@
} }
</style> </style>
<script lang="ts"> <script lang="ts">
import router from '@/router';
import { defineComponent, ref } from 'vue'; import { defineComponent, ref } from 'vue';
export default defineComponent({ export default defineComponent({
setup(){ setup(){
interface MenuItem { interface MenuItem {
icon: string; icon: string;
sleicon: string;
name: string; name: string;
route: string; route: string;
} }
// //
const list: Array<MenuItem> = [ const list: Array<MenuItem> = [
{ {
icon: "", icon: "../static/images/wode1.ping",
sleicon:"",
name: "我的档案", name: "我的档案",
route: "" route: "/mine/archives"
}, },
{ {
icon: "", icon: "../static/images/xiayig.ping",
sleicon:"",
name: "发布直播", name: "发布直播",
route: "" route: "/mine/webcast"
}, },
{ {
icon: "", icon: "../static/images/shipin.png",
sleicon:"shipin.png",
name: "上传视频", name: "上传视频",
route: "" route: "/mine/video"
}, },
{ {
icon: "", icon: "/static/images/yinhangka.png",
sleicon:"",
name: "我的钱包", name: "我的钱包",
route: "" route: "/mine/wallet"
}, },
{ {
icon: "", icon: "../static/images/tongji.png",
sleicon:"",
name: "列表统计", name: "列表统计",
route: "" route: "/mine/liststatistic"
}, },
{ {
icon: "", icon: "../static/images/bangzhu@2x.png",
sleicon:"",
name: "关于Beelink", name: "关于Beelink",
route: "" route: "/mine/aboutus"
} }
] ]
// index // index
@ -170,6 +176,9 @@ export default defineComponent({
function routeto(index: number): void { function routeto(index: number): void {
console.log(index) console.log(index)
selnum.value = index; selnum.value = index;
router.push({
path: list[index].route
})
} }
return{ return{

View File

@ -2,33 +2,33 @@
<div class="nav"> <div class="nav">
<div class="logo" :style="{'background-color': types == 0 ? 'unset' : ''}"> <div class="logo" :style="{'background-color': types == 0 ? 'unset' : ''}">
<img src="" alt="" class="img"> <img src="@/static/images/logo.png" alt="" class="img">
<div class="title" :style="{'color': types == 0 ? '#07AD97' : ''}">Beelink</div> <div class="title" :style="{'color': types == 0 ? '#07AD97' : ''}">Beelink</div>
</div> </div>
<div class="navigation"> <div class="navigation">
<div class="item" v-for="(i,j) in nav" :key="j"> <div class="item" v-for="(i,j) in nav" :key="j" @click="navto(j)">
{{i.name}} {{i.name}}
</div> </div>
</div> </div>
<div style="width: 100%"></div> <div style="width: 100%"></div>
<div class="setting"> <div class="setting">
<div class="item"> <div class="item">
<img src="" alt="" class="icon"> <img src="@/static/images/shijian.png" alt="" class="icon">
<div class="name">北京 GMT +08:00</div> <div class="name">北京 GMT +08:00</div>
<img src="" alt="" class="down"> <img src="@/static/images/jiantou2.png" alt="" class="down">
</div> </div>
<div class="item"> <div class="item">
<img src="" alt="" class="icon"> <img src="@/static/images/qianbi.png" alt="" class="icon">
<div class="name">人民币</div> <div class="name">人民币</div>
<img src="" alt="" class="down"> <img src="@/static/images/jiantou2.png" alt="" class="down">
</div> </div>
<div class="item"> <div class="item">
<img src="" alt="" class="icon"> <img src="@/static/images/yuyan.png" alt="" class="icon">
<div class="name">中文</div> <div class="name">中文</div>
<img src="" alt="" class="down"> <img src="@/static/images/jiantou2.png" alt="" class="down">
</div> </div>
<div class="item"> <div class="item">
<img src="" alt="" class="icon"> <img src="@/static/images/rili.png" alt="" class="icon">
<div class="name">日历</div> <div class="name">日历</div>
</div> </div>
</div> </div>
@ -49,7 +49,6 @@
.img{ .img{
width: 38px; width: 38px;
height: 38px; height: 38px;
background-color: #0f0;
margin-left: 14px; margin-left: 14px;
border-radius: 50%; border-radius: 50%;
} }
@ -93,7 +92,6 @@
.icon{ .icon{
width: 16px; width: 16px;
height: 16px; height: 16px;
background-color: #0f0;
} }
.name{ .name{
margin-left: 6px; margin-left: 6px;
@ -105,13 +103,13 @@
width: 9px; width: 9px;
height: 5px; height: 5px;
margin-left: 20px; margin-left: 20px;
background-color: #0f0;
} }
} }
} }
} }
</style> </style>
<script lang="ts"> <script lang="ts">
import router from '@/router';
import { defineComponent, ref } from 'vue'; import { defineComponent, ref } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
@ -139,7 +137,7 @@ export default defineComponent({
}, },
{ {
name: "视频管理", name: "视频管理",
route: "" route: "/regime/video"
}, },
{ {
name: "订阅者管理", name: "订阅者管理",
@ -147,12 +145,18 @@ export default defineComponent({
}, },
{ {
name: "个人中心", name: "个人中心",
route: "" route: "/mine/archives"
} }
] ]
function navto(index: number){
router.push({
path: nav[index].route
})
}
return { return {
nav, nav,
types types,
navto
} }
} }
}) })

View File

@ -60,7 +60,7 @@
.reply{ .reply{
padding-top: 28px; padding-top: 28px;
border-top: 1px solid #ededed; border-top: 1px solid #ededed;
&::v-deep .ant-input{ ::v-deep .ant-input{
font-size: 11px; font-size: 11px;
} }
.send{ .send{

View File

@ -81,11 +81,6 @@ const routes: Array<RouteRecordRaw> = [
}, },
{ {
path: '/', path: '/',
name: 'Home',
component: () => import(/* webpackChunkName: "about" */ '../components/NavTop.vue')
},
{
path: '/login',
name: 'Login', name: 'Login',
component:Login component:Login
}, },
@ -99,11 +94,7 @@ const routes: Array<RouteRecordRaw> = [
name: 'Reset', name: 'Reset',
component: () => import('../views/login/Reset.vue') component: () => import('../views/login/Reset.vue')
}, },
{
path: '/about',
name: 'About',
component: () => import('../views/login/About.vue')
},
] ]
const router = createRouter({ const router = createRouter({

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/static/images/rili.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 B

BIN
src/static/images/wode1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

BIN
src/static/images/yuyan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -11,8 +11,8 @@
<div class="topinfo"> <div class="topinfo">
<div class="title">我的钱包</div> <div class="title">我的钱包</div>
<div class="topbtn">立即提现</div> <div class="topbtn" @click="navto(2)">立即提现</div>
<div class="topbtn topbtn1">提现记录</div> <div class="topbtn topbtn1" @click="navto(3)">提现记录</div>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="accounts"> <div class="accounts">
@ -38,7 +38,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="add"> <div class="add" @click="navto(1)">
<img src="@/static/images/walletadd.png" alt="" class="icon" /> <img src="@/static/images/walletadd.png" alt="" class="icon" />
<div>添加新的账户</div> <div>添加新的账户</div>
</div> </div>
@ -203,6 +203,7 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, ref } from "vue"; import { defineComponent, ref } from "vue";
import NavBottom from "@/components/NavBottom.vue"; import NavBottom from "@/components/NavBottom.vue";
import router from '@/router';
export default defineComponent({ export default defineComponent({
name: "Wallet", name: "Wallet",
components: { components: {
@ -211,9 +212,20 @@ export default defineComponent({
setup() { setup() {
const ifchina = false; const ifchina = false;
const ifmingxi = true; const ifmingxi = true;
function navto(index: number){
let url = "";
switch (index){
case 1: url = "/mine/addaccount"; break;
case 2: url = "/mine/cashout"; break;
}
router.push({
path: url
})
}
return { return {
ifchina, ifchina,
ifmingxi, ifmingxi,
navto
}; };
}, },
}); });

View File

@ -111,13 +111,13 @@
bottom: 114px; bottom: 114px;
display: flex; display: flex;
justify-content: center; justify-content: center;
&::v-deep .ant-pagination-next > .ant-pagination-item-link, &::v-deep .ant-pagination-prev > .ant-pagination-item-link, &::v-deep .ant-pagination-item, &::v-deep .ant-pagination-jump-next-custom-icon, &::v-deep .ant-pagination-jump-prev-custom-icon{ ::v-deep .ant-pagination-next > .ant-pagination-item-link, ::v-deep .ant-pagination-prev > .ant-pagination-item-link, ::v-deep .ant-pagination-item, ::v-deep .ant-pagination-jump-next-custom-icon, ::v-deep .ant-pagination-jump-prev-custom-icon{
border: 1px solid #08AE98; border: 1px solid #08AE98;
} }
&::v-deep .ant-pagination-item-active a{ ::v-deep .ant-pagination-item-active a{
color: #fff; color: #fff;
} }
&::v-deep .ant-pagination-item-active{ ::v-deep .ant-pagination-item-active{
background-color: #08AE98; background-color: #08AE98;
} }
} }