CN115543318A - Implementation method for rapidly forming H5 application into multi-terminal application based on vue development - Google Patents

Implementation method for rapidly forming H5 application into multi-terminal application based on vue development Download PDF

Info

Publication number
CN115543318A
CN115543318A CN202211334684.XA CN202211334684A CN115543318A CN 115543318 A CN115543318 A CN 115543318A CN 202211334684 A CN202211334684 A CN 202211334684A CN 115543318 A CN115543318 A CN 115543318A
Authority
CN
China
Prior art keywords
vue
route
application
guardians
uniapp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211334684.XA
Other languages
Chinese (zh)
Inventor
陈朋
鲁嘉睿
张氣箔
张坤洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianyi Electronic Commerce Co Ltd
Original Assignee
Tianyi Electronic Commerce Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianyi Electronic Commerce Co Ltd filed Critical Tianyi Electronic Commerce Co Ltd
Priority to CN202211334684.XA priority Critical patent/CN115543318A/en
Publication of CN115543318A publication Critical patent/CN115543318A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method for realizing rapid H5 application forming into multi-terminal application based on vue development, which comprises the following steps: 1. preparation work: a mobile terminal h5 application developed based on vue; 2. the scheme comprises the following flows: (1) A project empty shell is quickly generated by means of a scaffold provided by the uniapp framework; (2) Js file is configured with multi-terminal application personalized information to be constructed; (3) Configuring a route, wherein because uniapp does not support route guardians naturally, but most of the vue projects use route guardians, the route configuration can best keep the original route configuration rule to the greatest extent by means of a wheel uni-simple-router and support the use of route guardians in the projects; (4) Migrating files such as vue, css, json and the like under the page according to the routing sequence; (5) And installing item dependencies according to the instruction npmi, and constructing applications of different platforms by virtue of script scripts provided in package. The invention completes the rapid molding from a single H5 project to multi-end application by the minimum change point.

Description

Implementation method for rapidly forming H5 application into multi-terminal application based on vue development
Technical Field
The invention relates to the technical field of information, in particular to a method for realizing rapid H5 application forming into multi-terminal application based on vue development.
Background
Currently, each large internet company pushes a small program under own app, and in order to guide the flow, a business company does not develop H5 application alone, but properly selects 'H5 + multi-platform small program' to popularize the business. Because the small program codes of all platforms are not fuzzy and compatible, and H5 application is added, the development scene is too complex, and the research, development and maintenance costs are higher and higher.
Aiming at the series of problems, the invention provides a solution for rapidly forming H5 application into multi-terminal application based on vue development, and the solution has the advantages of small change point and high expansion degree.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a method for realizing the rapid forming of the H5 application into the multi-terminal application based on vue, and the rapid forming from a single H5 project to the multi-terminal application is finished by depending on a bottom layer frame provided by uniiapp to expect the minimum change point.
In order to realize the purpose, the invention is realized by the following technical scheme: the implementation method for rapidly forming the H5 application into the multi-terminal application based on vue development comprises the following steps:
1. preparation work:
a mobile terminal h5 application developed based on vue;
2. the scheme comprises the following flows:
(1) A project empty shell is quickly generated by means of a scaffold provided by the uniapp framework;
(2) Js file is internally configured with multi-terminal application personalized information to be constructed, such as appid, sub-package, component and the like of each small program;
(3) Configuring a route, wherein because uniapp does not support route guardians naturally, but most of the vue projects use route guardians, the route configuration can best keep the original route configuration rule to the greatest extent by means of a wheel uni-simple-router and support the use of route guardians in the projects;
(4) Migrating files such as vue, css and json under the page according to the routing sequence;
(5) And installing item dependencies according to the instruction npmi, and constructing applications of different platforms by virtue of script scripts provided in package.
The scheme flow (4) specifically comprises the following steps:
1. the file with the suffix name of vue, the file type remains unchanged, but note that the tag under template is processed as follows:
div to View
Changing span and font into text
a is changed into navigator
Changing img to image
Change from select to picker
iframe to web-view
ul and li are not available, and are all replaced by view
Js code is mostly directly reusable, only needs to handle partially incompatible APIs, such as:
processing window api
Processing navigator api
Processing dom api
Other js api
3. Css's code 99 is reusable, but care should be taken not to support selectors;
the invention has the following beneficial effects:
the invention adapts the page layout under the folding screen by processing the DOM on the premise of not separately displaying the cs of the write adaptation for the unfolding state of the folding screen.
Drawings
The invention is described in detail below with reference to the drawings and the detailed description;
fig. 1 is a schematic architecture diagram of the present invention.
Detailed Description
In order to make the technical means, the creation characteristics, the achievement purposes and the effects of the invention easy to understand, the invention is further described with the specific embodiments.
Referring to fig. 1, the following technical solutions are adopted in the present embodiment: the implementation method for rapidly forming the H5 application into the multi-terminal application based on vue development comprises the following steps:
1. preparation:
a mobile terminal h5 application developed based on vue;
2. the scheme comprises the following flows:
(1) A project empty shell is quickly generated by means of a scaffold provided by the uniapp framework;
(2) Js file is internally configured with multi-terminal application personalized information to be constructed, such as appid, sub-package, component and the like of each small program;
(3) Configuring a route, wherein because uniapp does not support route guardians naturally, but most of the vue projects use route guardians, the route configuration can best keep the original route configuration rule to the greatest extent by means of a wheel uni-simple-router and support the use of route guardians in the projects;
(4) Migrating files such as vue, css, json and the like under the page according to the routing sequence;
(5) Installing project dependence according to the instruction npmi, and constructing applications of different platforms according to script scripts provided in package.
(6) And finally, releasing the packaged different platform applications to corresponding platforms.
The present embodiment accomplishes the rapid prototyping of single H5 projects to multi-end applications by relying on the underlying framework provided by uniapp for minimal change points.
The foregoing shows and describes the general principles and broad features of the present invention and advantages thereof. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (2)

1. The implementation method for rapidly forming the H5 application into the multi-end application based on vue is characterized by comprising the following steps of:
(I) preparation:
a mobile terminal h5 application developed based on vue;
(II) scheme flow:
(1) A project empty shell is quickly generated by means of a scaffold provided by the uniapp framework;
(2) Js file is internally configured with multi-terminal application personalized information to be constructed, such as appid, sub-package and component of each small program;
(3) Configuring a route, wherein because uniapp does not support route guardians naturally, but most of the vue projects use route guardians, the route configuration can best keep the original route configuration rule to the greatest extent by means of a wheel uni-simple-router and support the use of route guardians in the projects;
(4) Migrating vue files, css files and json files under the page according to the routing sequence;
(5) And installing item dependencies according to the instruction npmi, and constructing applications of different platforms by virtue of script scripts provided in package.
2. The method for implementing rapid prototyping of H5 applications into multi-end applications based on vue development of claim 1, wherein the scheme flow (4) specifically comprises:
1. the file with the suffix name of vue, the file type remains unchanged, but note that the tag under template is processed as follows:
changing div into view;
span and font are changed into text;
a is changed into navigator;
changing img into image;
change select to picker;
the iframe is changed into the web-view;
ul and li are not available, and are replaced by view;
js code is mostly directly reusable, only needs to handle partially incompatible APIs, such as:
processing the window api;
processing navigator api;
processing the dom api;
other js api;
code 99 for 3.Css is reusable, but care should be taken not to support selectors.
CN202211334684.XA 2022-10-28 2022-10-28 Implementation method for rapidly forming H5 application into multi-terminal application based on vue development Pending CN115543318A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211334684.XA CN115543318A (en) 2022-10-28 2022-10-28 Implementation method for rapidly forming H5 application into multi-terminal application based on vue development

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211334684.XA CN115543318A (en) 2022-10-28 2022-10-28 Implementation method for rapidly forming H5 application into multi-terminal application based on vue development

Publications (1)

Publication Number Publication Date
CN115543318A true CN115543318A (en) 2022-12-30

Family

ID=84717839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211334684.XA Pending CN115543318A (en) 2022-10-28 2022-10-28 Implementation method for rapidly forming H5 application into multi-terminal application based on vue development

Country Status (1)

Country Link
CN (1) CN115543318A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116701807A (en) * 2023-06-16 2023-09-05 红石阳光(北京)科技股份有限公司 Method for supporting app and h5 to load 3D model simultaneously

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116701807A (en) * 2023-06-16 2023-09-05 红石阳光(北京)科技股份有限公司 Method for supporting app and h5 to load 3D model simultaneously
CN116701807B (en) * 2023-06-16 2024-03-15 红石阳光(北京)科技股份有限公司 Method for supporting app and h5 to load 3D model simultaneously

Similar Documents

Publication Publication Date Title
US10325012B2 (en) Filtered stylesheets
CN110825488A (en) Business processing method and device, electronic equipment and storage medium
CN106095437B (en) The implementation method and device of the user interface layout type of RTL from right to left
CN111488149B (en) Canvas element-based table rendering method and device and computer equipment
CN106991096B (en) Dynamic page rendering method and device
CN108268262A (en) Realize the method, apparatus and system that HTML is converted to wechat small routine
US10120660B2 (en) Systems and methods for producing launchers for a mobile terminal
CN101271389B (en) Built-in intelligent information processing method for Tibetan
CN113126990B (en) Page development method, device, equipment and storage medium
CN111158687B (en) Interface generation method and device of JAVA plugin, computer equipment and storage medium
CN115543318A (en) Implementation method for rapidly forming H5 application into multi-terminal application based on vue development
CN114996619A (en) Page display method and device, computer equipment and storage medium
CN111951356B (en) Animation rendering method based on JSON data format
CN110018876A (en) The international method, apparatus of software application and electronic equipment
CN114706616A (en) Applet construction method and device
CN107145322A (en) Configuration serial ports screen and its implementation
CN112799658B (en) Model training method, model training platform, electronic device, and storage medium
CN102306163A (en) Dynamic integration technology based on B2B (business to business) platform
CN103294463A (en) Editing system and method
CN115268904A (en) User interface design file generation method, device, equipment and medium
CN115543440A (en) Method for migrating android project to android-like system, electronic equipment and storage medium
CN110807162A (en) Method and device for loading occupation bitmap
CN112817595A (en) Interface rendering method and device, storage medium and electronic equipment
CN115857934A (en) Method for generating form page according to configuration variable file
CN102148687B (en) Signature method and device in information management system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication