Mini-program development, compilation and operation system based on uni-app

Through the development, compilation and running system of uni-app-based applets, and the use of drag and drop components to develop and compile module conversion code, the problems of low efficiency and high cost of traditional applet development are solved, and simple and efficient applet development and release are achieved.

WO2025130295A1PCT designated stage expired Publication Date: 2025-06-26CHINA TELECOM DIGITAL INTELLIGENCE TECH CO LTD

Patent Information

Application Number
PCT/CN2024/125155
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-18
Filing Date
2024-10-16
Publication Date
2025-06-26

AI Technical Summary

Technical Problem

Traditional mini-program development has problems such as inefficiency and high development costs. It is necessary to first learn the development syntax of the target platform and deploy development tools for compilation.

Method used

A uni-app-based mini-program development, compilation and running system is proposed, including mini-program development module, compilation module and running module. The development module is developed by dragging and pulling components. The compilation module compiles the development code into WeChat applet code and converts it into applet code that supports running. The running module loads and runs the compiled code in the applet container SDK.

Benefits of technology

It improves the development efficiency of mini programs, reduces development costs, and allows business personnel who do not understand development to develop, compile and publish mini programs. At the same time, it solves the problem that the development of mini programs requires learning costs and the deployment of different mini program target platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024125155_26062025_PF_FP_ABST
    Figure CN2024125155_26062025_PF_FP_ABST
Patent Text Reader

Abstract

The present invention provides a mini-program development, compilation and operation system based on a uni-app, comprising: a mini-program development module uses a multi-end framework uni-app as an underlying support for a mini-program design service, and encapsulates a component in the uni-app framework into a component capable of being dragged; a mini-program compilation module compiles, into a WeChat mini-program code, a mini-program code developed by means of dragging, analyzes the WeChat mini-program code, converts same into a mini-program code capable of supporting running, and then compiles the mini-program code to generate a code capable of finally running in a mini-program container; and a mini-program running module provides a mini-program container SDK to a host application (APP) to load and run the compiled mini-program code, utilizes the native capability of the host APP and an interactive JSBridge interface between the host APP and JS to perform encapsulation and form a component and an API interface, and performs page rendering and capability invocation on the compiled mini-program, thereby implementing separation of a view layer and a logic layer by means of a double-thread model. The present invention can improve the development efficiency of mini-programs, thereby saving development costs.
Need to check novelty before this filing date? Find Prior Art

Description

A small program development, compilation and operation system based on uni-app Technical Field

[0001] The present invention relates to the field of computer and mobile terminal technologies, and in particular to a mini-program development, compilation and operation system based on uni-app. Background Art

[0002] In recent years, the rapid development of the mobile internet and the continuous increase in user base have made it increasingly competitive. Mini programs, as a form of mobile application, have also garnered widespread attention within the industry. Combining the advantages of web and smartphones, they offer a richer user experience and more flexible functionality, and are therefore considered the future of the mobile internet.

[0003] The mobile internet has entered an era of "super apps + mini-programs." Major companies like WeChat, ByteDance, Baidu, and Alipay all have their own open mini-program platforms. By turning their platforms into engines and attracting external partners, they are gradually building their own mini-program ecosystems. Through mini-programs, developers have greater opportunities to reach internet users and convert traffic from leading platforms into their own. With this large developer base, leading platforms also have the opportunity to further cultivate their stable traffic and further extend user time.

[0004] Traditional mini-program development requires first learning the mini-program development syntax for the target platform, or developing using multi-terminal development frameworks such as uni-app and taro. Traditional mini-program compilation is performed using mini-program development tools on the target platform, or using multi-terminal development frameworks such as uni-app and taro to compile into the target mini-program. Traditional mini-program development and compilation methods require deployment to the target platform and execution using the target platform's development syntax and tools. This leads to problems such as low mini-program development and compilation efficiency and high development costs.

[0005] Summary of the Invention

[0006] The object of the present invention is to solve at least one of the technical drawbacks.

[0007] To this end, the purpose of the present invention is to propose a mini-program development, compilation and operation system based on uni-app, which can improve the development efficiency of mini-programs and save development costs.

[0008] In order to achieve the above objectives, an embodiment of the present invention provides a mini-program development, compilation and operation system based on uni-app, including: a mini-program development module, a mini-program compilation module and a mini-program operation module, wherein:

[0009] The mini-program development module is deployed in the service layer, and is used to adopt the multi-terminal framework uni-app as the underlying support for the mini-program design service, and encapsulate the components in the uni-app framework into components that can be dragged and dropped, so that users can develop mini-programs by dragging and dropping; the process of encapsulating into components that can be dragged and dropped is as follows: find out the components that are used more frequently in the uni-app framework, identify the properties that can be configured for the components that are used more frequently, and then encapsulate the source code files and configuration files of the components that are used more frequently into components that can be dragged and dropped. Each time a component is dragged to the page, it is equivalent to adding the source code file to the page, and then the configuration information of the dragged component is modified to indirectly modify the properties of the original component, so that the data of the page is responsively re-rendered in the page view to achieve the effect of what is changed is what is seen;

[0010] The mini-program compilation module is deployed in the service layer and is used to compile the mini-program code developed by dragging and dropping into WeChat mini-program code. It then analyzes the converted WeChat mini-program code, converts WXML type files, JS type files, and WXSS type files into corresponding mini-program code that can be run. It then compiles the converted mini-program code to generate code that can ultimately run in the mini-program container.

[0011] The mini-program running module runs in the mini-program container SDK, and is used to provide the mini-program container SDK to the host application APP to load and run the compiled mini-program code, utilize the native capabilities of the host application APP, and the interactive JSBridge interface with JS, encapsulate it into components and API interfaces to process the framework logic, and perform page rendering and capability calls on the compiled mini-program code, and realize the separation of the view layer and the logic layer through a dual-threaded model.

[0012] Furthermore, the mini-program development module includes: a page management unit, a routing setting unit, a page style setting unit, a page preview unit and a page design unit, wherein:

[0013] The page management unit is used to maintain all pages in the mini program project;

[0014] The routing setting unit is used to manage the jump between pages and configure the jump page;

[0015] The page style setting unit is used to uniformly define the style and background of the page;

[0016] The page preview unit is used to preview the page display effect after dragging and dropping components in real time;

[0017] The page design unit is used to perform layer management, drag and drop control operations, component configuration and page interaction.

[0018] Furthermore, the page design unit includes: a layer management subunit, a drag and drop control operation subunit, a component configuration subunit and a page interaction subunit, wherein:

[0019] The layer management subunit is used to manage the layer positions of page elements;

[0020] The drag and drop control operation subunit is used to implement the drag and drop function of the control;

[0021] The component configuration subunit is used to set the dragged component;

[0022] The page interaction subunit is used for JS logic management of the page and calling of background data interface.

[0023] Furthermore, the mini-program compilation module analyzes the converted WeChat mini-program code and converts the WXML type file, JS type file, and WXSS type file into corresponding mini-program code that can support operation, including:

[0024] First, the templates, components, instructions, and attributes in the WXML code are converted to generate ZXML code that supports the running of the mini-program. The ZXML type corresponds to WeChat's WXML type, representing the custom Z standard extensible markup language.

[0025] Then, convert the references in the JS type code to generate JS code that supports running the mini-program;

[0026] Finally, the selectors in the WXSS type code are converted to generate ZCSS type code that supports the running of the mini program; the ZCSS type corresponds to the WXSS type of WeChat, which represents a custom Z standard cascading style sheet.

[0027] Furthermore, the mini-program compilation module compiles the converted mini-program code that can support running, and generates code that can ultimately run in the mini-program container, including:

[0028] First, compile the ZXML code file to generate JavaScript code;

[0029] Then, compile the ZCSS type code file to generate an HTML page;

[0030] Finally, the compiled JavaScript code and HTML page are packaged into a resource package.

[0031] Furthermore, compiling the ZXML type code file includes the following steps:

[0032] Receive a list of ZXML files, parse all ZXML code files to generate an abstract syntax tree (AST), then parse the input tags and attributes and generate a virtual DOM, render the virtual DOM into a real DOM structure, and finally output JavaScript code.

[0033] Furthermore, compiling the ZCSS type code file includes the following steps:

[0034] Receive a list of ZCSS files, parse all ZCSS-type code files to generate AST, use the PostCSS tool to process the ZCSS files, convert them into the final style and add them to the HTML page.

[0035] Furthermore, the applet executes the framework logic of the module processing, including: data binding, components, events and communications.

[0036] Furthermore, the mini-program execution module provides the mini-program container SDK to the host application APP to load and run the compiled mini-program code. When the host application APP runs the mini-program, it first initializes the SDK, then the logic layer loads the resource package of the mini-program, obtains the configuration object of the mini-program, and then notifies the view layer to load the page information through event-driven. After the page rendering is completed, the logic layer is notified through event-driven that the page rendering is completed. Then the logic layer obtains the request in js and calls the network request component to process the network request. After the logic layer obtains the requested data, it notifies the view layer to load the data again through event-driven. The view layer re-renders the page according to the data, and the trigger event of the view layer page notifies the logic layer through event-driven. The logic layer calls the component to perform event processing according to the triggered event. After processing, the logic layer notifies the view layer again through event-driven that the event processing is completed.

[0037] Furthermore, the business architecture of the system adopts a layered design, including: data layer, transport layer, application layer and presentation layer, wherein the data layer is used to provide cache services and data persistence services; the application layer is used to provide user services, organizational services, permission services, role services, mini-program application services, mini-program page services, mini-program navigation services, mini-program design services and mini-program interface services; the transport layer adopts a WEB server; the presentation layer is used to provide presentation services to users through the WEB and mobile terminals.

[0038] According to the mini-program development, compilation and operation system based on uni-app according to the embodiment of the present invention, it is applied to the development, compilation and operation of mini-programs, which can make the development of mini-programs simpler, and business personnel who do not understand development can also develop, compile and publish mini-programs. In addition, the SDK for mini-program operation can integrate the SDKs of other mini-program platforms compatible with uni-app, and the mini-programs developed using the present invention can be published to other mini-program platforms. The solution provided by the present invention solves the problems of learning costs required for developing mini-programs, deploying different mini-program target platforms for developing mini-programs, and visual development of mini-programs, reduces the complexity of custom mini-program code compilation and conversion fault tolerance, and the developed mini-programs can run on privately deployed mini-program platform APPs, making the development and use of mini-programs simpler and more convenient, and laying the foundation for subsequent similar user needs.

[0039] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments with reference to the accompanying drawings, in which:

[0041] FIG1 is a structural diagram of a system for developing, compiling, and running a mini-program based on uni-app according to an embodiment of the present invention;

[0042] FIG2 is a diagram of the business architecture of a mini-program development platform according to an embodiment of the present invention;

[0043] FIG3 is a schematic diagram of a mini-program development function design according to an embodiment of the present invention;

[0044] FIG4 is a flowchart of mini-program compilation according to an embodiment of the present invention;

[0045] FIG5 is a flowchart of a mini-program running SDK design according to an embodiment of the present invention;

[0046] FIG6 is a diagram of an operation interface of a page design according to an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following describes embodiments of the present invention in detail, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and are not to be construed as limiting the present invention.

[0048] The business architecture of the uni-app-based mini-program development, compilation, and operation system in an embodiment of the present invention adopts a layered design, including: a data layer, a transport layer, an application layer, and a presentation layer, see FIG2 .

[0049] The data layer is used to provide caching services and data persistence services; the application layer is used to provide user services, organizational services, permission services, role services, mini-program application services, mini-program page services, mini-program navigation services, mini-program design services, and mini-program interface services; the transport layer uses a web server; and the presentation layer is used to provide presentation services to users via the web and mobile terminals. The layered design makes the system more flexible. Not only does it allow for flexible service-oriented decomposition at each level and module, but more importantly, it can provide some basic support services for other related areas of the software, facilitating the rapid integration and expansion of other systems. For example, the user services, organizational services, permission services, and role services of the application layer can be reused in other related areas.

[0050] As shown in FIG1 , the mini-program development, compilation, and operation system based on uni-app according to an embodiment of the present invention includes: a mini-program development module, a mini-program compilation module, and a mini-program operation module.

[0051] Specifically, the mini-program development module is deployed in the service layer, which is used to adopt the multi-terminal framework uni-app as the underlying support for the mini-program design service, and encapsulate the components in the uni-app framework into components that can be dragged and dropped, so that users can develop mini-programs by dragging and dropping. The process of encapsulating into components that can be dragged and dropped is as follows: find out the components that are used more frequently in the uni-app framework, identify the properties that can be configured for the components that are used more frequently, and then encapsulate the source code files and configuration files of the components that are used more frequently into components that can be dragged and dropped. Each time a component is dragged to the page, it is equivalent to adding the source code file to the page, and then modifying the configuration information of the dragged component is equivalent to indirectly modifying the properties of the original component, so that the data of the page is responsive and the page view is re-rendered, thereby achieving the effect of what is changed is what is seen. At this time, the code generated by dragging and dropping is not the real mini-program code, and it needs to be converted into the real mini-program code through the mini-program compilation function provided by the present invention, so as to improve the development efficiency of the mini-program and save development costs.

[0052] Referring to Figures 1 and 3, the mini-program development module includes: a page management unit, a routing setting unit, a page style setting unit, a page preview unit, and a page design unit. The page management unit is used to maintain all pages in the mini-program project. The routing setting unit is used to manage jumps between pages and configure which pages are used as bottom menu pages and which are used as jump pages. The page style setting unit is used to uniformly define the style and background of the page, achieving a dynamic skinning effect. The page preview unit is used to preview the page display effect after dragging and dropping components in real time.

[0053] The page design unit is used to perform layer management, drag and drop control operations, component configuration and page interaction functions.

[0054] Specifically, the page design unit includes: a layer management subunit, a drag-and-drop control operation subunit, a component configuration subunit, and a page interaction subunit, as shown in FIG6 .

[0055] The layer management subunit manages the layer positions of page elements. The drag-and-drop control operation subunit implements the drag-and-drop functionality of controls, which are divided into layout components, basic components, form components, and media components. The component configuration subunit is used to configure the dragged components, including component property settings, component style settings, and component event driving. The page interaction subunit is used to manage the page's JS logic and call backend data interfaces.

[0056] As shown in Figure 4, the mini-program compilation module is deployed in the service layer. By utilizing the multi-terminal framework uni-app's feature of being able to publish to multiple terminals, the mini-program code developed by dragging and dropping is compiled into the WeChat mini-program code, and then the converted WeChat mini-program code is analyzed. First, the templates, components, instructions, and attributes in the WXML type code are converted to generate the ZXML type code of the mini-program supported by the present invention. Then, the references in the JS type code are converted to generate the JS code of the mini-program supported by the present invention. Then, the selectors in the WXSS type code are converted to generate the ZCSS type code of the mini-program supported by the present invention. Finally, the converted mini-program code supported by the present invention is compiled to generate the code that can ultimately run in the mini-program container provided by the present invention.

[0057] WXSS, short for WeiXin Style Sheets, is a style language used to describe the styles of WXML components, similar to CSS in web development. WXML (WeiXin Markup Language) is a markup language that, combined with basic components and an event system, can build page structures, similar to HTML in web development.

[0058] The mini-program compilation module analyzes the converted WeChat mini-program code and converts WXML, JS, and WXSS files into corresponding mini-program code that can be run, including:

[0059] First, the templates, components, instructions, and attributes in the WXML type code are converted to generate the ZXML type code that supports the running of the mini program. The ZXML type is a custom term in this invention, corresponding to the WXML type of WeChat, which refers to the custom Z standard extensible markup language.

[0060] Then, the references in the JS type code are converted to generate JS code that supports the running of the mini program.

[0061] Finally, the selector in the WXSS type code is converted to generate the ZCSS type code that supports the running of the mini program. The ZCSS type is a custom term used by the present invention, corresponding to the WXSS type of WeChat, and refers to the custom Z standard cascading style sheet.

[0062] The mini-program compilation module compiles the converted mini-program code to generate code that can ultimately run in the mini-program container, including:

[0063] First, compile the ZXML code file to generate JavaScript code.

[0064] Specifically, compiling ZXML type code files includes the following steps: receiving a ZXML file list, parsing all ZXML type code files to generate an abstract syntax tree AST, then parsing the input tags and attributes and generating a virtual DOM, rendering the virtual DOM into a real DOM structure, and finally outputting JavaScript code.

[0065] Then, compile the ZCSS code files to generate an HTML page. Specifically, compiling the ZCSS code files includes the following steps: receiving a list of ZCSS files, parsing all ZCSS code files to generate AST, processing the ZCSS files with the PostCSS tool, converting them into the final style, and adding them to the HTML page. AST (Abstract Syntax Tree): A very important concept in the front-end and the most atomic content, almost all frameworks are modified and run based on AST, such as React / Vue / Taro, etc. Multi-terminal operation and use are inseparable from the concept of AST.

[0066] Finally, the compiled JavaScript code and HTML page are packaged into a resource package.

[0067] As shown in Figure 5, the mini-program running module runs in the mini-program container SDK, and is used to provide the mini-program container SDK to the host application APP to load and run the compiled mini-program code, utilize the native capabilities of the host application APP (such as Bluetooth, camera, wifi, etc.), and the interactive JSBridge interface with JS, encapsulate it into components and API interfaces, and use a series of framework logic such as data binding, component system, event system, communication system, etc., and perform page rendering and capability calls on the compiled mini-program code, and realize the separation of the view layer and the logic layer through the dual-threaded model.

[0068] The Mini Program SDK provides an environment for running Mini Program business code and a processing engine that encapsulates Mini Program management. The runtime environment is used to execute the Mini Program JS business logic and render the Mini Program page, providing a closed and secure runtime environment for the business code. The Mini Program management processing engine includes Mini Program authentication, query, and management functions, making it easier and faster for third-party host applications to integrate the SDK and manage and use Mini Programs.

[0069] When the host application runs the mini program, it first initializes the SDK. Then the logic layer first loads the resource package of the mini program and obtains the configuration object of the mini program. Then, it notifies the view layer to load the page information through event-driven. After the page rendering is completed, it notifies the logic layer through event-driven that the page rendering is completed. Then, the logic layer obtains the request in js and calls the network request component to process the network request. After the logic layer obtains the requested data, it notifies the view layer to load the data again through event-driven. Then, the view layer re-renders the page according to the data. Finally, the triggering event of the view layer page will also be notified to the logic layer through event-driven. After that, the logic layer calls the component for event processing according to the triggered event. After processing, the logic layer notifies the view layer again through event-driven that the event processing is completed.

[0070] According to the mini-program development, compilation and operation system based on uni-app according to the embodiment of the present invention, it is applied to the development, compilation and operation of mini-programs, which can make the development of mini-programs simpler, and business personnel who do not understand development can also develop, compile and publish mini-programs. In addition, the SDK for mini-program operation can integrate the SDKs of other mini-program platforms compatible with uni-app, and the mini-programs developed using the present invention can be published to other mini-program platforms. The solution provided by the present invention solves the problems of learning costs required for developing mini-programs, deploying different mini-program target platforms for developing mini-programs, and visual development of mini-programs, reduces the complexity of custom mini-program code compilation and conversion fault tolerance, and the developed mini-programs can run on privately deployed mini-program platform APPs, making the development and use of mini-programs simpler and more convenient, and laying the foundation for subsequent similar user needs.

[0071] The mini-program development, compilation, and operation system based on uni-app in the embodiment of the present invention has the following beneficial effects:

[0072] (1) Traditional mini-program development requires first learning the mini-program development syntax on the target platform to be deployed, or using a multi-terminal development framework such as uni-app, taro, etc. for development. The present invention provides development based on uni-app, encapsulating uni-app components, and developing mini-programs based on the multi-terminal framework uni-app framework. Combined with the drag-and-drop design, users can visually open mini-programs by dragging and dropping, effectively reducing the learning cost of mini-program development, improving mini-program development efficiency, and saving development costs.

[0073] (2) Traditional mini-program compilation is performed by deploying mini-program development tools on the target platform, or by using a multi-terminal development framework such as uni-app, taro, etc. to compile into a target mini-program. The present invention provides a method for indirectly compiling mini-programs, first compiling the code developed based on uni-app into a WeChat mini-program, and then compiling the WeChat mini-program into a mini-program supported by the present invention.

[0074] (3) Traditional mini-programs are compiled into mini-programs on a target platform, and then deployed to the target platform and opened with the target platform's APP. The present invention provides a mini-program that can be run after compilation by introducing the SDK encapsulated by the present invention.

[0075] (4) Based on the multi-terminal framework uni-app, the mini-program is developed. Combined with the drag-and-drop design, it is first converted into a WeChat mini-program through the multi-terminal framework uni-app, then converted into a customized mini-program, and finally compiled into a resource file that can be run in the mini-program SDK, realizing a complete set of processes from development to compilation to final operation of the customized mini-program.

[0076] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0077] Although the embodiments of the present invention have been shown and described above, it should be understood that the above embodiments are illustrative and are not to be construed as limiting the present invention. Those skilled in the art may make changes, modifications, substitutions, and variations to the above embodiments without departing from the principles and intent of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A small program development, compilation and operation system based on uni-app, characterized in that: include: Mini-program development module, mini-program compilation module and mini-program running module, among which, The mini-program development module is deployed in the service layer, and is used to use the multi-terminal framework uni-app as the underlying support for the mini-program design service, and encapsulate the components in the uni-app framework into components that can be dragged and dropped, so that users can develop mini-programs by dragging and dropping; the process of encapsulating into components that can be dragged and dropped is as follows: find out the components that are used frequently in the uni-app framework, identify the properties that can be configured for the components that are used frequently, and then encapsulate the source code files and configuration files of the components that are used frequently into components that can be dragged and dropped. Each time a component is dragged to the page, it is equivalent to adding the source code file to the page, and then the configuration information of the dragged component is modified to indirectly modify the properties of the original component, so that the data of the page is responsively re-rendered to the page view, so as to achieve the effect of what is changed is what is seen; The mini-program compilation module is deployed at the service layer, and is used to compile the mini-program code developed by dragging and dropping into the WeChat mini-program code, and then analyze the converted WeChat mini-program code, convert WXML type files, JS type files, and WXSS type files into corresponding mini-program codes that can support running, and then compile the converted mini-program codes that can support running to generate codes that can eventually run in the mini-program container; The mini-program running module runs in the mini-program container SDK, and is used to provide the mini-program container SDK to the host application APP to load and run the compiled mini-program code, utilize the native capabilities of the host application APP, and the interactive JSBridge interface with JS to encapsulate it into components and API interfaces to process the framework logic, and perform page rendering and capability calls on the compiled mini-program code, and realize the separation of the view layer and the logic layer through the dual-threaded model.

2. The uni-app-based applet development, compilation and operation system as claimed in claim 1, characterized in that: The mini program development module includes: a page management unit, a routing setting unit, a page style setting unit, a page preview unit and a page design unit, wherein: The page management unit is used to maintain all pages in the mini program project; The routing setting unit is used to manage the jump between pages and configure the jump page; The page style setting unit is used to uniformly define the style and background of the page; The page preview unit is used to preview the page display effect after dragging and dropping components in real time; The page design unit is used to perform layer management, drag and drop control operations, component configuration and page interaction.

3. The uni-app-based applet development, compilation and operation system as claimed in claim 2, characterized in that: The page design unit includes: a layer management subunit, a drag and drop control operation subunit, a component configuration subunit and a page interaction subunit, wherein: The layer management subunit is used to manage the layer positions of page elements; The drag-and-drop control operation subunit is used to implement the drag-and-drop function of the control; The component configuration subunit is used to set the dragged component; The page interaction subunit is used for JS logic management of the page and calling of the background data interface.

4. The uni-app-based applet development, compilation and operation system as claimed in claim 1, characterized in that: The mini-program compilation module analyzes the converted WeChat mini-program code and converts the WXML type file, JS type file and WXSS type file into corresponding mini-program codes that can support running, including: First, the templates, components, instructions and attributes in the WXML type code are converted to generate the ZXML type code that supports the running of the mini program; the ZXML type corresponds to the WXML type of WeChat, which represents the custom Z standard extensible markup language; Then, the references in the JS type code are converted to generate JS code that supports the running of the mini-program; Finally, the selector in the WXSS type code is converted to generate the ZCSS type code that supports the running of the mini program; among them, the ZCSS type corresponds to the WXSS type of WeChat, which means the custom Z standard cascading style sheet.

5. The uni-app-based applet development, compilation and operation system as claimed in claim 4, characterized in that: The mini-program compilation module compiles the converted mini-program code that can support running, and compiles and generates code that can eventually run in the mini-program container, including: First, compile the ZXML code file to generate JavaScript code; Then, compile the ZCSS type code file to generate an HTML page; Finally, the compiled JavaScript code and HTML page are packaged into a resource package.

6. The uni-app-based applet development, compilation and operation system as claimed in claim 5, characterized in that: The compiling of the ZXML type code file comprises the following steps: Receive a ZXML file list, parse all ZXML type code files to generate an abstract syntax tree AST, then parse the input tags and attributes and generate a virtual DOM, render the virtual DOM into a real DOM structure, and finally output JavaScript code.

7. The uni-app-based applet development, compilation and operation system as claimed in claim 5, characterized in that: The compiling of the ZCSS type code file comprises the following steps: Receive the ZCSS file list, parse all ZCSS type code files to generate AST, use the PostCSS tool to process the ZCSS files, convert them into the final style and add them to the HTML page.

8. The uni-app-based applet development, compilation and operation system as claimed in claim 1, characterized in that: The framework logic of the applet execution module processing includes: data binding, components, events and communications.

9. The uni-app-based applet development, compilation and operation system as claimed in claim 1 or 8, characterized in that: The mini-program execution module provides the mini-program container SDK to the host application APP to load and run the compiled mini-program code. When the host application APP runs the mini-program, it first initializes the SDK, then the logic layer loads the resource package of the mini-program, obtains the configuration object of the mini-program, and then notifies the view layer to load the page information through event driving. After the page rendering is completed, the logic layer is notified through event driving that the page rendering is completed. Then the logic layer obtains the request in js, calls the network request component to process the network request, and after the logic layer obtains the requested data, it notifies the view layer to load the data again through event driving. The view layer re-renders the page according to the data, and the trigger event of the view layer page notifies the logic layer through event driving. The logic layer calls the component to perform event processing according to the triggered event. After the processing is completed, the logic layer notifies the view layer again through event driving that the event processing is completed.

10. The uni-app-based applet development, compilation and operation system according to claim 1, characterized in that: The business architecture of the system adopts a layered design, including: data layer, transport layer, application layer and display layer, wherein the data layer is used to provide cache services and data persistence services; the application layer is used to provide user services, organizational services, authority services, role services, mini-program application services, mini-program page services, mini-program navigation services, mini-program design services and mini-program interface services; the transport layer adopts a WEB server; the display layer is used to provide display services to users through the WEB and mobile terminals.

Citation Information

Patent Citations

  • Cross-platform applet development method

    CN110489088A

  • Small program runtime capable of being embedded with plurality of arbitrary APPs

    CN112559980A

  • Method for realizing low-code platform based on taro

    CN114003224A

  • Small program development, compilation and operation system based on uniapp

    CN117707531A

  • System and method for software application development in a portal environment

    US20060206856A1

Cited By

  • Cross-platform sky map component two-way communication method and device based on message queue

    CN121396962A

  • Unified development method and system supporting high-low code dynamic fusion arrangement

    CN122633235A