Let’s talk about this project first. Just like the title, it is a framework developed based on VUE+.NET. It is also the ABP framework that group members have been clamoring for for a vue version. Let’s take a look at the homepage first:
It’s quite cool. I’ll provide you with a demo account.
Demo address: http://vue.yoyocms.com/ Account: demo Password: bb123456 Of course, you can also register an account yourself for verification.
First, for students who don’t know the ABP framework, let’s explain what the ABP framework is:
ABP is the abbreviation of "ASP.NET Boilerplate Project (ASP.NET Boilerplate Project)". ASP.NET Boilerplate is a new starting point for developing modern WEB applications using best practices and popular technologies. It aims to become a universal WEB application framework and project template. Framework ABP is an application framework based on the latest ASP.NET CORE, ASP.NET MVC and Web API technologies. And using popular frameworks and libraries, it provides easy-to-use common functions such as authorization, dependency injection, validation, exception handling, localization, logging, caching, etc. Architecture ABP implements multi-layer architecture (domain layer, application layer, infrastructure layer and presentation layer), as well as domain-driven design (entities, repositories, domain services, application services, DTO, etc.). Good infrastructure is also implemented and provided to implement best practices such as dependency injection. Template ABP easily creates startup templates for your projects. It includes the most commonly used frameworks and libraries by default. Also allows you to choose single page (Angularjs) or multi-page architecture, EntityFramework or NHibernate as ORM. Visit the official website to learn more.
The structure of the project selected this time is:
In the previous article [ABP Framework] Interception Usage of Dynamic Web Api, it was explained how to use token for authorization verification. Currently, the cookie method is still used for verification. But it does not affect the front-end and back-end development methods. Take a look at the login page:
####Framework used by the front end 1.vue
2.vuex
3.vue-router
4.jquery
1.element-ui
2.waves
3.bootstrap
4.BSBADMIN
The following are the original words of the front-end staff. Thank you Huixin666 for taking the time to improve the interface of vue.
Before development, we assume that you have a basic skill base in
es6
,sass
,vue
,vue-router
, andvuex
.
It is recommended to read the advice of You YuxiInstall front-end dependencies
Enter the Assets directory in
Web项目
$ npm i
Run the project
Remember to start the background first
$ npm run dev
webpack will use express to start a web server with port 8986
$ npm run build
This command will compile all files into the
dist
directory, refer to the project structure diagram above
src/views
to create a module directory.administration
, which contains all system management pages. Each module may also contain components
and assets
directories, which means that the components and resources in it only belong to the current module.Index.vue
as the parent routing page to control all pages under this module.User.vue
fetchData
in methods
. In this method, you need to call abp.view.setContentLoading(false)
after getting the data to close the loading mask layer of the content area. (You can refer to User.vue) src/router
directory, add the routing module folder, and add a file named index.js
in the folder.src/router/index.js
src/services
directory and add the module corresponding to the interface request. For example, the role-related objects are placed in roleService.js
The objects exported by the roleService.js
file correspond to abp.services.yoyocms.role
. The advantage of using it this way is that it can be managed and expanded uniformlyThe above is the basic situation of the vue version of ABP.
The open source address of the vue version: https://github.com/yoyocms/YoYoCms.AbpProjectTemplate The demo address of the vue version: http://vue.yoyocms.com/ The open source address of the angularJS version: https://github.com/ltm0203/YoYoCms angularJS Version demo address: http://www.yoyocms.com
If you have good suggestions or bug feedback, please file an issue on github.