3. ABPZero series of tutorials: how to modify and optimize the seller's tool project, abpzero seller
This article is complex and simple. It does not require multi-tenant, multi-language, MPA (Multi-page), and increases page loading speeds ......
After logging on to the system, you will see the following interface. This is not the final result. You can modify it one by one.
Multi-tenant is not required
The AbpZeroTemplateConsts. cs code is modified as follows:
File Path: D: \ abp version \ aspnet-zero-3.4.0 \ aspnet-zero-3.4.0 \ src \ MyCompanyName. AbpZeroTemplate. Core \ AbpZeroTemplateConsts. cs
/// <Summary> /// false indicates that multi-tenant is not enabled. The default value is enable /// </summary> public const bool MultiTenancyEnabled = false;
Use local clock
Modify the Global. asax. cs Code as follows:
File Path: D: \ abp version \ aspnet-zero-3.4.0 \ aspnet-zero-3.4.0 \ src \ MyCompanyName. AbpZeroTemplate. Web \ Global. asax. cs
protected override void Application_Start(object sender, EventArgs e) { //Use UTC clock. Remove this to use local time for your application. //Clock.Provider = ClockProviders.Utc; Clock.Provider = ClockProviders.Local;
After logon, change to mpa by default.
The ApplicationController. cs code is modified as follows:
File Path: D: \ abp version \ aspnet-zero-3.4.0 \ aspnet-zero-3.4.0 \ src \ MyCompanyName. AbpZeroTemplate. Web \ Controllers \ ApplicationController. cs
Public ActionResult Index () {/* enable the next line to redirect to the multi-page application */return RedirectToAction ("Index", "Home ", new {area = "Mpa"}); // return View ("~ /App/common/views/layout. cshtml "); // Layout of the angular application .}
Remove multiple languages and retain simplified text
Go to the system and set the simplified center to the default language.
The code of the _ Header. cshtml file is modified as follows:
File Path: D: \ abp version \ aspnet-zero-3.4.0 \ aspnet-zero-3.4.0 \ src \ MyCompanyName. AbpZeroTemplate. Web \ Areas \ Mpa \ Views \ Layout \ _ Header. cshtml
Search @ if (Model. Ages. Count> 1) and delete the code.
Increases loading speed without using Google Fonts
Google fonts are used in jtable control styles, and each access is particularly slow.
1.open the jtable.css File
File Path: D: \ abp version \ aspnet-zero-3.4.0 \ aspnet-zero-3.4.0 \ src \ MyCompanyName. AbpZeroTemplate. Web \ libs \ jquery-jtable \ themes \ metro \ blue \ jtable.css
Comment out the Google-related connections and save them.
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300; /*src: local('Open Sans Light'), local('OpenSans-Light'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTRa1RVmPjeKy21_GQJaLlJI.woff) format('woff');*/}
2. Open the StylePaths. cs File
[.. \ MyCompanyName. AbpZeroTemplate. Web \ App_Start \ Bundling \ StylePaths. cs]
Replace jtable.min.csswith jtable.css, save and generate
Finally, generate a project and log on again, as shown in
Total returned directory