Control method, device and equipment of applet pop-up window, medium and product
By managing mini-program pop-ups through target configuration files and wrapper components, the lag issue of pop-up components during multiple calls was resolved, achieving efficient pop-up control and improved user experience.
Patent Information
- Application Number
- CN202411363271.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-07
AI Technical Summary
The existing pop-up component for mini-programs is prone to lag when called multiple times, which affects the user experience.
The system calls the wrapper component through the target configuration file, responds to the pop-up display event of the mini program, detects user click operations, and determines the feedback strategy based on the configuration file to execute business operations or close the pop-up.
It improves the efficiency of opening and closing pop-ups in mini-programs, enhancing the user experience during user interaction.
Smart Images

Figure CN119271298A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mini-program technology, and in particular to a method, device, equipment, medium and product for controlling a mini-program pop-up window. Background Art
[0002] In native WeChat applets, modals are a common user interaction component used to display prompts, confirmations, or input information when users perform specific operations. However, when the interaction scenario with the user involves multiple pop-up controls, the existing method of calling encapsulated pop-up components is prone to lag.
[0003] Therefore, how to display pop-up windows in a timely manner based on package components and quickly confirm the pop-up window feedback strategy according to the target configuration file, so as to improve the switching efficiency of mini-program pop-up windows during business interaction and enhance user experience, is an urgent problem to be solved. Summary of the invention
[0004] The present invention provides a method, device, equipment, medium and product for controlling a mini-program pop-up window, so as to improve the switching efficiency of the mini-program pop-up window during business interaction and enhance the user experience.
[0005] According to one aspect of the present invention, a method for controlling a mini-program pop-up window is provided, comprising:
[0006] In the process of business interaction with the user, in response to the mini program pop-up window display event, the package component is called through the target configuration file to display the mini program pop-up window;
[0007] If a click operation of the user on the displayed mini-program pop-up window is detected, it is determined whether the user has set a target parameter corresponding to the click operation according to the target configuration file;
[0008] If so, determine the return information corresponding to the target parameter after the click operation, and determine the feedback strategy based on the return information to execute the business operation and / or close the mini program pop-up window.
[0009] According to another aspect of the present invention, a device for controlling a mini-program pop-up window is provided, comprising:
[0010] A display module is used to respond to a mini-program pop-up window display event and call a package component through a target configuration file to display a mini-program pop-up window during business interaction with the user;
[0011] A determination module, for determining, if a click operation of a user on a displayed mini-program pop-up window is detected, whether the user has set a target parameter corresponding to the click operation according to a target configuration file;
[0012] The execution module is used to determine the return information corresponding to the target parameter after the click operation, and determine the feedback strategy based on the return information to execute the business operation and / or close the mini program pop-up window.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for controlling the mini-program pop-up window described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for controlling a mini-program pop-up window as described in any embodiment of the present invention when executed.
[0018] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the method for controlling a mini-program pop-up window according to any embodiment of the present invention is implemented.
[0019] The technical solution of the embodiment of the present invention, in the process of business interaction with the user, responds to the mini-program pop-up window display event, calls the package component through the target configuration file to display the mini-program pop-up window; if a user click operation on the displayed mini-program pop-up window is detected, then according to the target configuration file, it is determined whether the user has set the target parameters corresponding to the click operation; if so, the return information corresponding to the target parameters after the click operation is determined, and according to the return information, the feedback strategy is determined to execute the business operation and / or close the mini-program pop-up window. Based on the management of the pop-up window component by the package component, the pop-up window can be displayed in time, and the confirmation of the pop-up window feedback strategy can be quickly completed according to the target configuration file, thereby improving the switching efficiency of the mini-program pop-up window during business interaction and improving the user experience.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 This is a flow chart of a method for controlling a mini-program pop-up window provided in Embodiment 1 of the present invention;
[0023] Figure 2 This is a flow chart of a method for controlling a mini-program pop-up window provided in Embodiment 2 of the present invention;
[0024] Figure 3 This is a structural block diagram of a device for controlling a mini-program pop-up window provided in Embodiment 3 of the present invention;
[0025] Figure 4 It is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", "target", "candidate", "alternative", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0028] Embodiment 1
[0029] Figure 11 is a flowchart of a method for controlling a mini-program pop-up window provided in the first embodiment of the present invention; this embodiment is applicable to the case where the mini-program performs pop-up window opening and closing control based on the package component and the target configuration file during the process of business interaction with the user. The method can be executed by a control device for the mini-program pop-up window. The control device for the mini-program pop-up window can be implemented in the form of hardware and / or software. The control device for the mini-program pop-up window can be configured in an electronic device, such as an electronic device with a mini-program pop-up window control, and is executed by the mini-program, such as Figure 1 As shown, the control method of the mini program pop-up window includes:
[0030] S101. In the process of business interaction with the user, in response to a mini-program pop-up window display event, a package component is called through a target configuration file to display a mini-program pop-up window.
[0031] Among them, the mini program pop-up display event refers to an event that responds to user operations by displaying a pop-up window to remind or guide the user to continue the operation. The mini program pop-up display event can be an event automatically generated when the user clicks the delete button on the page or other operations that require secondary confirmation from the user.
[0032] The target configuration file refers to the file that configures the pop-up control of the mini program, which can be a wxml file. The target configuration file can include the target configuration code that calls the component to open the window. It can also record the pop-up properties set by the user through preset function methods (such as the modalObj method), such as the pop-up title, content information, method names of the cancel and confirm buttons, opentype and other information, which are specifically represented by user configuration parameters.
[0033] A wrapper component (i.e., a pro-page component) is a component that can wrap the components it manages for unified management. For example, a wrapper component can include a target window component (i.e., a modal component) and a page display component (i.e., a slot component). A wrapper component can call a target window component for pop-up display, and can also call a page display component to display the page content of the mini program.
[0034] It should be noted that the present invention uses a wrapping component
[0035] Optionally, after the user performs a preset operation (such as the user clicks the Delete button on the page), when it is considered necessary for the user to perform a second confirmation, it is confirmed that a pop-up display request instructing the user to confirm or cancel the preset operation is detected, that is, a mini-program pop-up display event is detected, and further in response to the mini-program pop-up display event, the target configuration code in the target configuration file is executed to call the package component to implement the pop-up display of the mini-program.
[0036] For example, if the mini program is a WeChat mini program, the wx.jdshowModal function in the target configuration code in the target configuration file can be called to set the open attribute in the component switch function modalObj to true, thereby realizing the pop-up window display of the mini program, wherein the displayed pop-up window style and text and other attribute information are based on the parameters of wx.jdshowModal, that is, the user configuration parameters. In this way, the component switch function can be mounted on WeChat, thereby realizing the switching of the pop-up window in the form of an API (Application Programming Interface).
[0037] Optionally, in the process of business interaction with users, a target configuration file can also be generated in response to a component configuration request for a mini-program pop-up window issued by the user to complete the component configuration of the mini-program pop-up window. Specifically, it includes: determining the target component style and open attribute type in response to the component configuration request for the mini-program pop-up window; generating a component configuration code according to the target component style and open attribute type, and configuring the target window component, page display component and wrapping component through the component configuration code, and introducing the target window component and page display component into the wrapping component; adding the component configuration code to the target configuration file to complete the component configuration of the mini-program pop-up window.
[0038] Among them, the target component style can be a component style determined based on different UI designs (User Interface Design) under different target projects. The open attribute type can be, for example, an open-type type. By configuring the target window component as an open attribute type, the target window component can call other development functions supported by the mini-program, such as opening a customer service session, quickly verifying a mobile phone number, obtaining user information, opening an authorization settings page, and other functions. The page display component is used to display page components based on the target component style.
[0039] It should be noted that the present invention pre-configures the target component style in the target configuration file, so that when a pop-up window is subsequently displayed according to the target configuration file, a pop-up window based on the target component style can be displayed, thereby realizing customized adjustment of the pop-up window style according to project needs, greatly enhancing the flexibility of the pop-up window display style.
[0040] For example, the target window component can be defined as a property that can receive opentype in the properties option of the modal component to complete the configuration of the target window file. Accordingly, the code for configuring the target window component in the preset component configuration code can be " <button wx:if="{{opentype}}"open-type="{{opentype}}"class='yes'style="width:100%;border-radius:0;padding:0;"> {{confirmText}}< / button> ”.
[0041] Optionally, you can introduce the target window component into the wrapping component in the same way as the WeChat applet introduces components. At the same time, the target configuration file adds a slot tag to the content of the pro-page component to introduce the page display component into the wrapping component.
[0042] Exemplarily, the component configuration code corresponding to the target window component and the page display component introduced into the package component may be as follows:
[0043] <view><modal wx:if="{{modalObj.open}}"
[0044] open="{{modalObj.open}}"opentype="{{modalObj.opentype}}"
[0045] title="{{modalObj.title}}"content="{{modalObj.content}}"
[0046] confirmText="{{modalObj.confirmText}}"
[0047] cancelText='{{modalObj.cancelText}}'
[0048] bindconfirm="modalconfirm"bindcancel="modalcancel" / >
[0049] <slot>< / slot>
[0050] < / view>
[0051] Optionally, in response to a component configuration request for a mini-program pop-up window, after determining the target configuration file, it also includes: determining user configuration parameters corresponding to the wrapped component based on the target configuration file; determining target configuration parameters for the wrapped component based on the initialization parameters of the wrapped component and the user configuration parameters set by the user in the target configuration file, and generating a preset component configuration code based on the target configuration parameters to complete the configuration of the wrapped component.
[0052] The initialization parameters may include at least one of the following: open: whether the pop-up window is open; title: the title of the pop-up window; content: the content of the pop-up window; maxHeight: the maximum height of the pop-up window; cancelText: the text of the pop-up window cancel button; confirmText: the text of the pop-up window confirmation button; cancel: the method string of the pop-up window cancel button; confirm: the method string of the pop-up window confirmation button. The target configuration parameters refer to the configuration parameters of the packaged component that are finally determined.
[0053] Optionally, the initialization parameters and user configuration parameters may be compared, and for each initialization parameter, it is determined whether a corresponding parameter value is configured in the user configuration parameter. If so, the parameter value corresponding to the user configuration parameter replaces the corresponding initialization parameter to complete the update of the initialization parameter and obtain the target configuration parameter.
[0054] Optionally, the wrapping component is called through the target configuration file to display the mini-program pop-up window, including: calling the wrapping component through the target configuration file to instruct the wrapping component to call the target window component and page display component it manages to display the mini-program pop-up window.
[0055] The component style in the mini-program pop-up window is the target component style, which is configured through the component configuration code in the target configuration file. The display content displayed in the mini-program pop-up window is set by the target configuration parameters in the target configuration file.
[0056] Optionally, the mini program can call the wrapped component by executing the corresponding component configuration code in the target configuration file. After the wrapped component is called, it can automatically call the components managed by its wrapping, namely the target window component and the page display component, to display the mini program pop-up window based on the target window component and the page display component.
[0057] S102: If a click operation of the user on the displayed mini-program pop-up window is detected, determine whether the user has set a target parameter corresponding to the click operation according to the target configuration file.
[0058] The click operation may be a click operation on a confirmation button or a cancel button in a pop-up window of a mini program. The target parameter refers to a parameter used to transmit the user's click operation, and the target parameter may be, for example, a confirm parameter and a cancel parameter.
[0059] Optionally, if a user click operation on a displayed mini-program pop-up window is detected, then based on the target configuration file, it is determined whether the user has set target parameters corresponding to the click operation, including: if a user click operation on a displayed mini-program pop-up window is detected, then based on the instruction information corresponding to the click operation, a match is performed in the target configuration file to determine whether the preset transfer function contains the key value of the target parameter corresponding to the instruction information; if so, it is determined that the user has set the target parameters corresponding to the click operation.
[0060] Exemplarily, whether the cancel / confirm parameter is set can be determined by determining whether the object passed by calling wx.jdshowModal() contains the cancel and confirm keys, and the passed cancel / confirm is a string.
[0061] S103: If yes, determine the return information corresponding to the target parameter after the click operation, and determine a feedback strategy based on the return information to execute the business operation and / or close the mini program pop-up window.
[0062] Optionally, you can listen for user click events based on a preset function method for binding click events, such as bindtap in WeChat mini-programs. When a user clicks an element on the mini-program page, if the element is bound to a bindtap event, the corresponding event processing function will be triggered. For example, if the click event is a click on the confirm or cancel button, the corresponding event bound to the button can be executed.
[0063] Optionally, a feedback strategy is determined based on the returned information to execute business operations and / or close the mini-program pop-up window, including: determining the parameter type of the target parameter based on the returned information; if the parameter type is an allowed type, first executing the business operation corresponding to the click operation, and then closing the mini-program pop-up window; if the parameter type is a parsed type, directly closing the mini-program pop-up window; if the parameter type is a rejected type, keeping the mini-program pop-up window open after executing the business operation corresponding to the click operation.
[0064] The parameter type is a promise type, a resolve type, or a reject type. The return information can be, for example, the return value of the confirm / cancel method, which can be obtained through the input parameter. The business operation can be, for example, calling an interface to save data or change status.
[0065] Optionally, if the input parameter is used to obtain a title information input by the user, the corresponding method of confirm can be used to call the interface to store the title information locally.
[0066] It should be noted that the open function corresponding to the open attribute type can be realized by executing the business operation corresponding to the click operation.
[0067] It should be noted that in JavaScript, Promise is an object used for asynchronous calculations. It represents the final completion (or failure) of an asynchronous operation and its resulting value. Promise has several different states and related concepts, including resolve and reject, which are related to the state changes of Promise. Resolve is a state of Promise and a function that resolves Promise. When an asynchronous operation is completed successfully, the Promise is resolved and the resolve function is called. The resolve function can take a value, which is passed to the next .then() method in the Promise chain. Similar to resolve, reject is also a function that resolves Promise, but it is used when an asynchronous operation fails. When an asynchronous operation fails, the Promise is rejected and the reject function is called. The reject function usually takes an error object or error message, which is passed to the .catch() method or the next .catch() method chain.
[0068] Optionally, you can determine the parameter type of the confirm / cancel parameter based on the return information. If the parameter type is Promise type, the corresponding event bound to the confirmation button is executed by calling the method code corresponding to the confirm / cancel parameter in the target configuration file to implement the business operation, and when the execution is completed, the mini program pop-up window is closed; if the parameter type is resolve type, the mini program pop-up window is closed directly; if the parameter type is reject type, after executing the task operation, the pop-up window is kept open and an early warning is issued.
[0069] For example, based on the return information, if it is determined that the parameter obj exists and its value is not null, then it is recorded in an object or function, and finally the object or function has a then method recorded in it. If all the above conditions are met, it can be determined that it is a Promise object, that is, the parameter type of the confirm / cancel parameter is Promise type.
[0070] The technical solution of the embodiment of the present invention, in the process of business interaction with the user, responds to the mini-program pop-up window display event, calls the package component through the target configuration file to display the mini-program pop-up window; if a user click operation on the displayed mini-program pop-up window is detected, then according to the target configuration file, it is determined whether the user has set the target parameters corresponding to the click operation; if so, the return information corresponding to the target parameters after the click operation is determined, and according to the return information, the feedback strategy is determined to execute the business operation and / or close the mini-program pop-up window. Based on the management of the pop-up window component by the package component, the pop-up window can be displayed in time, and the confirmation of the pop-up window feedback strategy can be quickly completed according to the target configuration file, thereby improving the switching efficiency of the mini-program pop-up window during business interaction and improving the user experience.
[0071] Embodiment 2
[0072] Figure 2 It is a flowchart of a method for controlling a mini-program pop-up window provided in the second embodiment of the present invention; based on the above embodiment, this embodiment provides a preferred solution for controlling a mini-program pop-up window based on a package component and a target configuration file.
[0073] like Figure 2 As shown, the method may include the following process:
[0074] S201. In response to a component configuration request for a mini-program pop-up window, determine a target component style and an open attribute type.
[0075] S202. Generate component configuration code according to the target component style and open attribute type, and configure the target window component, page display component and package component through the component configuration code, and introduce the target window component and page display component into the package component.
[0076] S203. Add the component configuration code to the target configuration file to complete the component configuration of the mini program pop-up window.
[0077] S204. In the process of business interaction with the user, in response to the mini-program pop-up window display event, the wrapping component is called through the target configuration file to instruct the wrapping component to call the target window component and page display component it manages to display the mini-program pop-up window.
[0078] S205. If a click operation of the user on the displayed mini-program pop-up window is detected, a match is performed in the target configuration file according to the instruction information corresponding to the click operation to determine whether the preset transfer function contains the key value of the target parameter corresponding to the instruction information.
[0079] S206: If yes, determine that the user has set a target parameter corresponding to the click operation, and determine the return information corresponding to the target parameter after the click operation, so as to determine the parameter type of the target parameter according to the return information.
[0080] S207. If the parameter type is an allowed type, first execute the business operation corresponding to the click operation, and then close the mini program pop-up window.
[0081] S208. If the parameter type is a parsing type, the mini-program pop-up window is directly closed; if the parameter type is a rejection type, the mini-program pop-up window is kept open after the business operation corresponding to the click operation is executed.
[0082] Embodiment 3
[0083] Figure 3 : is a structural block diagram of a control device for a mini-program pop-up window provided in the third embodiment of the present invention; this embodiment can be applicable to the situation where the mini-program performs pop-up window opening and closing control based on the package component and the target configuration file during the process of business interaction with the user. The control device for the mini-program pop-up window provided in the embodiment of the present invention can execute the control method for the mini-program pop-up window provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method; the control device for the mini-program pop-up window can be implemented in the form of hardware and / or software, and configured in an electronic device with the control function of the mini-program pop-up window, and executed by the mini-program, such as Figure 3 As shown, the control device of the mini program pop-up window specifically includes:
[0084] The display module 301 is used to respond to the mini-program pop-up window display event and call the package component through the target configuration file to display the mini-program pop-up window in the process of business interaction with the user;
[0085] The determination module 302 is used to determine whether the user has set a target parameter corresponding to the click operation according to the target configuration file if a click operation of the user on the displayed mini-program pop-up window is detected;
[0086] The execution module 303 is used to determine the return information corresponding to the target parameter after the click operation, and determine the feedback strategy based on the return information to execute the business operation and / or close the mini program pop-up window.
[0087] The technical solution of the embodiment of the present invention, in the process of business interaction with the user, responds to the mini-program pop-up window display event, calls the package component through the target configuration file to display the mini-program pop-up window; if a user click operation on the displayed mini-program pop-up window is detected, then according to the target configuration file, it is determined whether the user has set the target parameters corresponding to the click operation; if so, the return information corresponding to the target parameters after the click operation is determined, and according to the return information, the feedback strategy is determined to execute the business operation and / or close the mini-program pop-up window. Based on the management of the pop-up window component by the package component, the pop-up window can be displayed in time, and the confirmation of the pop-up window feedback strategy can be quickly completed according to the target configuration file, thereby improving the switching efficiency of the mini-program pop-up window during business interaction and improving the user experience.
[0088] Furthermore, the above device is also used for:
[0089] In response to a component configuration request for a mini-program pop-up window, determine a target component style and an open attribute type;
[0090] Generate component configuration code according to the target component style and open attribute type, configure the target window component, page display component and package component through the component configuration code, and introduce the target window component and page display component into the package component; the page display component is used to display the page component based on the target component style;
[0091] Add the component configuration code to the target configuration file to complete the component configuration of the mini program pop-up window.
[0092] Furthermore, the above device is also used for:
[0093] Determine the user configuration parameters corresponding to the package component according to the target configuration file;
[0094] According to the initialization parameters of the wrapped component and the user configuration parameters set by the user in the target configuration file, the target configuration parameters for the wrapped component are determined, and the preset component configuration code is generated according to the target configuration parameters to complete the configuration of the wrapped component.
[0095] Furthermore, the display module 301 is specifically used for:
[0096] The wrapping component is called through the target configuration file to instruct the wrapping component to call the target window component and page display component it manages to display the mini-program pop-up window; the component style in the mini-program pop-up window is the target component style.
[0097] Further, the determination module 302 is specifically used for:
[0098] If a user click operation on the displayed mini-program pop-up window is detected, a match is performed in the target configuration file according to the instruction information corresponding to the click operation to determine whether the preset transfer function contains the key value of the target parameter corresponding to the instruction information;
[0099] If so, it is determined that the user has set a target parameter corresponding to the click operation.
[0100] Furthermore, the execution module 303 is specifically used for:
[0101] Determine the parameter type of the target parameter according to the returned information; the parameter type is an allowed type, a parsed type or a rejected type;
[0102] If the parameter type is an allowed type, the business operation corresponding to the click operation is executed first, and then the mini-program pop-up window is closed; if the parameter type is a parsed type, the mini-program pop-up window is directly closed; if the parameter type is a rejected type, after executing the business operation corresponding to the click operation, the mini-program pop-up window is kept open.
[0103] Embodiment 4
[0104] Figure 4 It is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0105] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0106] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0107] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for controlling a mini-program pop-up window.
[0108] In some embodiments, the control method of the applet pop-up window may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the control method of the applet pop-up window described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the control method of the applet pop-up window by any other appropriate means (e.g., by means of firmware).
[0109] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0110] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0111] In the context of the present invention, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. A more specific example of a machine readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0112] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0113] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0114] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0115] In one embodiment, the embodiment of the present invention also includes a computer program product, the computer program product includes a computer program, and when the computer program is executed by a processor, it implements the control method of the mini-program pop-up window of any embodiment of the present invention.
[0116] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0117] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0118] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for controlling a mini program pop-up window, characterized in that: include: In the process of business interaction with the user, in response to the mini program pop-up window display event, the package component is called through the target configuration file to display the mini program pop-up window; If a click operation of the user on the displayed mini-program pop-up window is detected, it is determined whether the user has set a target parameter corresponding to the click operation according to the target configuration file; If so, determine the return information corresponding to the target parameter after the click operation, and determine the feedback strategy based on the return information to execute the business operation and / or close the mini program pop-up window.
2. The method according to claim 1, characterized in that Before calling the package component through the target configuration file to display the mini program pop-up window, it also includes: In response to a component configuration request for a mini-program pop-up window, determine a target component style, an open attribute type, and a target configuration file; Generate component configuration code according to the target component style and open attribute type, configure the target window component, page display component and package component through the component configuration code, and introduce the target window component and page display component into the package component; the page display component is used to display the page component based on the target component style; Add the component configuration code to the target configuration file to complete the component configuration of the mini program pop-up window.
3. The method according to claim 2, characterized in that In response to the component configuration request for the mini program pop-up window, after determining the target configuration file, the method further includes: Determine the user configuration parameters corresponding to the package component according to the target configuration file; According to the initialization parameters of the wrapped component and the user configuration parameters set by the user in the target configuration file, the target configuration parameters for the wrapped component are determined, and the preset component configuration code is generated according to the target configuration parameters to complete the configuration of the wrapped component.
4. The method according to claim 1, characterized in that Call the package component through the target configuration file to display the mini program pop-up window, including: The wrapping component is called through the target configuration file to instruct the wrapping component to call the target window component and page display component it manages to display the mini-program pop-up window; the component style in the mini-program pop-up window is the target component style.
5. The method according to claim 1, characterized in that: If a user clicks on the displayed mini-program pop-up window, it is determined whether the user has set target parameters corresponding to the click operation according to the target configuration file, including: If a user click operation on the displayed mini-program pop-up window is detected, a match is performed in the target configuration file according to the instruction information corresponding to the click operation to determine whether the preset transfer function contains the key value of the target parameter corresponding to the instruction information; If so, it is determined that the user has set a target parameter corresponding to the click operation.
6. The method according to claim 1, characterized in that Determine the feedback strategy based on the returned information to perform business operations and / or close the mini program pop-up window, including: Determine the parameter type of the target parameter according to the returned information; the parameter type is an allowed type, a parsed type or a rejected type; If the parameter type is an allowed type, the business operation corresponding to the click operation is executed first, and then the mini-program pop-up window is closed; if the parameter type is a parsed type, the mini-program pop-up window is directly closed; if the parameter type is a rejected type, after executing the business operation corresponding to the click operation, the mini-program pop-up window is kept open.
7. A control device for a mini-program pop-up window, characterized in that: include: A display module is used to respond to a mini-program pop-up window display event and call a package component through a target configuration file to display a mini-program pop-up window during business interaction with the user; A determination module, for determining, if a click operation of a user on a displayed mini-program pop-up window is detected, whether the user has set a target parameter corresponding to the click operation according to a target configuration file; The execution module is used to determine the return information corresponding to the target parameter after the click operation, and determine the feedback strategy based on the return information to execute the business operation and / or close the mini program pop-up window.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for controlling the pop-up window of the mini-program according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the control method for the mini-program pop-up window according to any one of claims 1 to 6 when executed.
10. A computer program product, characterized in that The computer program product includes a computer program, which, when executed by a processor, implements the method for controlling the mini-program pop-up window according to any one of claims 1-6.
Citation Information
Cited By
Small program prompt component injection calling method and device, equipment, medium and product
CN121092349A