Files
我是个攻城狮 c3f5f13bb3 all
2026-05-27 16:01:15 +08:00

309 lines
5.4 KiB
JavaScript

import Vue from 'vue'
//这里仅示范npm安装方式的引入,其它方式引入请看最上面【安装】部分
import Router from '../js_sdk/hhyang-uni-simple-router/index.js'
Vue.use(Router)
//初始化
const router = new Router({
encodeURI: false,
h5: {
useUniConfig: true, //采用在pages.json下的所有页面配置信息,默认为true
vueRouterDev: false, //完全使用vue-router开发 默认 false
},
routes: [{
//注意:path必须跟pages.json中的地址对应,最前面别忘了加'/'哦
path: '/pages/index',
aliasPath: '/', //对于h5端你必须在首页加上aliasPath并设置为/
name: 'home',
meta: {
title: '首页',
}
},
{
path: '/pages/game',
aliasPath: '/game',
name: 'game',
meta: {
title: '资产中心',
},
},
{
path: '/pages/invest',
aliasPath: '/invest',
name: 'invest',
meta: {
title: '我要资金',
},
},
{
path: '/pages/expert',
aliasPath: '/expert',
name: 'expert',
meta: {
title: '专家库',
},
},
{
path: '/pages/news',
aliasPath: '/news',
name: 'news',
meta: {
title: '关于我们',
},
},
{
path: '/pages/apply',
aliasPath: '/apply',
name: 'apply',
meta: {
title: '立即申请',
keepAlive: false
},
},
{
path: '/pages/development',
aliasPath: '/development',
name: 'development',
meta: {
title: '我要技术',
keepAlive: false
},
},
{
path: '/pages/expo',
aliasPath: '/expo',
name: 'expo',
meta: {
title: '我要参展',
keepAlive: false
},
},
{
path: '/pages/subsidy',
aliasPath: '/subsidy',
name: 'subsidy',
meta: {
title: '我要补贴',
keepAlive: false
},
},
{
path: '/pages/oversea',
aliasPath: '/oversea',
name: 'oversea',
meta: {
title: '我要出海',
keepAlive: false
},
},
{
path: '/pages/publish',
aliasPath: '/publish',
name: 'publish',
meta: {
title: '我要发行',
keepAlive: false
},
},
{
path: '/pages/copyright',
aliasPath: '/copyright',
name: 'copyright',
meta: {
title: '我要版权',
},
},
{
path: '/pages/versionNumber',
aliasPath: '/versionNumber',
name: 'versionNumber',
meta: {
title: '我要版号',
},
},
{
path: '/pages/blockchainquery',
aliasPath: '/blockchainquery',
name: 'blockchainquery',
meta: {
title: '区块链数字资产查询',
keepAlive: false
},
},
{
path: '/pages/gameDtail',
aliasPath: '/gameDtail',
name: 'gameDtail',
meta: {
title: '资产中心',
},
},
{
path: '/pages/login',
aliasPath: '/login',
name: 'login',
meta: {
title: '登录',
},
},
{
path: '/pages/forget',
aliasPath: '/forget',
name: 'forget',
meta: {
title: '忘记密码',
},
},
{
path: '/pages/register',
aliasPath: '/register',
name: 'register',
meta: {
title: '注册',
},
},
{
path: '/pages/member',
aliasPath: '/member',
name: 'member',
meta: {
title: '个人中心',
},
},
{
path: '/pages/productCulture',
aliasPath: '/productCulture',
name: 'productCulture',
meta: {
title: '产品文化',
},
},
{
path: '/pages/asset',
aliasPath: '/asset',
name: 'asset',
meta: {
title: '资产确权',
},
},
{
path: '/pages/asset_list',
aliasPath: '/asset_list',
name: 'asset_list',
meta: {
title: '资产列表',
},
},
{
path: '/pages/asset_add',
aliasPath: '/asset_add',
name: 'asset_add',
meta: {
title: '资产新增',
},
},
{
path: '/pages/pay_list',
aliasPath: '/pay_list',
name: 'pay_list',
meta: {
title: '付款记录',
},
},
{
path: '/pages/pay_detail',
aliasPath: '/pay_detail',
name: 'pay_detail',
meta: {
title: '付款详情',
},
},
{
path: '/pages/notice_list',
aliasPath: '/notice_list',
name: 'notice_list',
meta: {
title: '平台通知',
},
},
{
path: '/pages/notice_details',
aliasPath: '/notice_details',
name: 'notice_details',
meta: {
title: '平台通知详情',
},
},
{
path: '/pages/digital_assets',
aliasPath: '/digital_assets',
name: 'digital_assets',
meta: {
title: '资产列表',
},
},
{
path: '/pages/digital_assets_add',
aliasPath: '/digital_assets_add',
name: 'digital_assets_add',
meta: {
title: '资产新增',
},
},
{
path: '/pages/introduction',
aliasPath: '/introduction',
name: 'introduction',
meta: {
title: '指数介绍',
},
},
{
path: '/pages/about',
aliasPath: '/about',
name: 'about',
meta: {
title: '关于我们',
},
},
{
path: '/pages/articleDetails',
aliasPath: '/articleDetails',
name: 'articleDetails',
meta: {
title: '文章详情',
keepAlive: false
},
},
{
path: '/pages/actDetails',
aliasPath: '/actDetails',
name: 'actDetails',
meta: {
title: '活动详情',
keepAlive: false
},
},
{
path: '/pages/companyProflie',
aliasPath: '/companyProflie',
name: 'companyProflie',
meta: {
title: '企业简介',
keepAlive: false
},
}
] //路由表
});
//全局路由前置守卫
router.beforeEach((to, from, next) => {
next()
})
// 全局路由后置守卫
router.afterEach((to, from) => {})
export default router;