first commit
This commit is contained in:
1
src/core/config/.pydio
Normal file
1
src/core/config/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
f0ed9e16-3f2b-4d50-9858-120dc2e2ae2c
|
||||
53
src/core/config/configure.config.ts
Normal file
53
src/core/config/configure.config.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
* Email:2271608011@qq.com
|
||||
* Github:https://github.com/helpcode
|
||||
*/
|
||||
|
||||
import VueRouter, { RouterOptions } from 'vue-router';
|
||||
import Vuex from 'vuex';
|
||||
import Antd from 'ant-design-vue';
|
||||
import 'ant-design-vue/dist/antd.css';
|
||||
import { AutoRoutesConfig } from "@config/route.config";
|
||||
import { PluginObject } from "vue";
|
||||
|
||||
export class ConfigureConfig {
|
||||
|
||||
/**
|
||||
* 接口配置: 测试环境基地址,正式环境基地址,具体页面接口
|
||||
*/
|
||||
public static AjaxConfig: {
|
||||
DevUrl: string,
|
||||
ProdUrl: string,
|
||||
ApiList: { [key: string]: string }
|
||||
} = {
|
||||
DevUrl: 'http://127.0.0.1:8080',
|
||||
ProdUrl: 'http://127.0.0.1:9090/api',
|
||||
ApiList: {
|
||||
// start - 注释内的key都将被Node.js监听并diff取出实时编辑后的差异项,然后程序决定是否增删请求中间层xx文件中的xx方法代码【不要删除】
|
||||
UserList: '/UserList',
|
||||
// User_IndexTest: '/test',
|
||||
// Car_carList: '/test',
|
||||
// Car_addCar: '/test',
|
||||
// Index_reg: '/reg',
|
||||
// Order_test: '/test',
|
||||
// end - 注释内的key都将被Node.js监听并diff取出实时编辑后的差异项,然后程序决定是否增删请求中间层xx文件中的xx方法代码【不要删除】
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Vue 插件
|
||||
*/
|
||||
public static VuePlugs: PluginObject<never>[] = [
|
||||
VueRouter, Vuex, Antd
|
||||
];
|
||||
|
||||
/**
|
||||
* 路由配置
|
||||
*/
|
||||
public static RouterConfigUrl: RouterOptions = {
|
||||
mode: 'hash',
|
||||
base: './',
|
||||
routes: AutoRoutesConfig
|
||||
};
|
||||
}
|
||||
18
src/core/config/route.config.ts
Normal file
18
src/core/config/route.config.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
// 根据page目录结构,自动生成的路由配置文件
|
||||
// 参考Nuxt.js 源码,同时自己 + ast 实现 https://zh.nuxtjs.org/guide/routing
|
||||
// @ts-ignore
|
||||
|
||||
export const AutoRoutesConfig = [
|
||||
{
|
||||
name: "About",
|
||||
path: "/About",
|
||||
component: () => import(/* webpackChunkName: 'About' */ '@page/about'),
|
||||
meta: { title: '关于我页面', showNav: true, isLogin: true }
|
||||
},
|
||||
{
|
||||
name: "Home",
|
||||
path: "/Home",
|
||||
component: () => import(/* webpackChunkName: 'Home' */ '@page/home'),
|
||||
meta: { title: '首页', showNav: true, isLogin: true }
|
||||
}
|
||||
];
|
||||
Reference in New Issue
Block a user