CRMEB多商户二开教程2

本文档详细介绍了在CRMEB系统中如何新建前端页面并配置路由。首先在views/product下创建新的页面目录及index.vue文件,接着在router/modules/product.js中添加路由配置,使页面在http://localhost:9528/admin/product/guarantee可访问。其次,创建views/station目录,建立notice子目录和Index.vue文件,并在router/modules下新建station.js路由模块,最后在router/Index.js中导入并设置页面路径http://localhost:9528/admin/station/notice。
                                            **创建新的页面**

新建一个页面的流程
一. 在原来的文件夹中添加一个新的页面:

比如在product文件夹下新建一个商品保障服务的页面productGuarantee

首先在views目录下的product文件夹下面新建一个文件夹productGuarantee,再在该文件夹下新建一个index.vue文件
在这里插入图片描述
然后找到router文件夹下moudles下的product.js文件,在该文件下面加入你新加的页面要跳转的链接和页面地址
1{
2 path: ‘guarantee’,
3name: ‘ProductGuarantee’,
4meta: {
5 title: ‘保障服务’,
6noCache: true
7 },
8 component: () => import(’@/views/product/productGuarantee/index.vue’)
9}
在这里插入图片描述
在浏览器访问:http://localhost:9528/admin/product/guarantee
在这里插入图片描述
二. 在views下面添加新的文件夹,并添加新的页面,比如现在在views下面添加一个station文件夹

首先在views下新建station文件夹,并在station下新建notice文件夹和Index.vue文件
在这里插入图片描述
然后在router文件夹下的moudles文件夹下新建station.js,声明stationRouter然后导出
import Layout from ‘@/layout’
import { roterPre } from ‘@/settings’
const stationRouter =
{
path: ${roterPre}/station,
name: ‘station’,
meta: {
icon: ‘’,
title: ‘公告列表’
},
alwaysShow: true,
component: Layout,
children: [
{
path: ‘notice’,
name: ‘stationNotice’,
meta: {
title: ‘公告列表’
},
component: () => import(’@/views/station/notice/index’)
}
]
}
export default stationRouter
在这里插入图片描述
在router文件夹下的Index.js中导入在这里插入图片描述
在页面访问:http://localhost:9528/admin/station/notice在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值