CN-116225391-B - Half-screen bill opening system based on WeChat applet
Abstract
The invention discloses a half-screen billing system for a WeChat applet, which comprises a mobile terminal, a server, wherein the mobile terminal is communicated with the server, the mobile terminal loads the WeChat applet and realizes half-screen billing based on the WeChat applet, the WeChat applet comprises a picture display module for selectively displaying a screenshot picture of chat content of a client and a goods-out operation interface for billing information input, the picture display module realizes scrolling to view the screenshot picture of the chat content, and the half-screen billing system for the WeChat applet is convenient to operate and more reasonable in system disaster preparation.
Inventors
- WANG XIAOJUN
- CHEN DAOHUI
- HE SHUAI
- LIU GUANLIN
- FENG DEGUI
Assignees
- 杭州衣科信息技术股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20230314
Claims (5)
- 1. The half-screen opening system for the WeChat applet is characterized by comprising a mobile terminal and a server, wherein the mobile terminal is communicated with the server, the mobile terminal is loaded with the WeChat applet, and the half-screen opening is realized based on the WeChat applet; The WeChat applet comprises a picture display module for selectively displaying the screenshot pictures of the chat contents of the clients and a goods-out operation interface for inputting the order information; the picture display module realizes scrolling to view screenshot pictures of chat contents; Superclass methods for specific opening interface implementations include SaleSelectPhotoView (), chooseImage (), selectGoodsModalView (), selectGoodsDetailModalView (), and onTouchMove (); SaleSelectPhotoView () is used for selecting an interface implementation method of chat screenshot; chooseImage () logic implementation method for selecting user chat screen shots; SelectGoodsModalView () implements a half-screen select item list interface; SelectGoodsDetailModalView () realizes a half screen selecting item detail interface; onTouchMove () is used for realizing the function of processing the manual drag closing interface of the user, judging whether the user pulls down or not, and automatically closing the opening interface after the user pulls down to a certain distance and releases hands; the picture display module is arranged on the upper half part of the mobile terminal, and the goods output operation interface is arranged on the lower half part of the mobile terminal; The method for rapidly detecting the global health state of the application cluster based on the Api gateway is arranged at the server and comprises a detector, the Api gateway, a load balancer, a service registration center and an application cluster, wherein the detector, the load balancer and the application cluster are communicated with the Api gateway, and the load balancer and the application cluster are registered and kept communicated with the service registration center, and the method comprises the following specific steps: 101 A preprocessing step of deploying a plurality of detection machines in various places around the country, wherein a detection agent program is arranged in each detection machine and is used for simulating an App request server; Arranging a plurality of data centers in all over the country, wherein each data center is provided with a plurality of application clusters, each application cluster externally provides a health detection interface, and the internal simulation execution database read-write, cache read-write, thread pool access and service call are realized by the application clusters, and execution result information is fed back; 102 The detection machine sends out a detection application to the Api gateway, and the Api gateway pulls the service provider list of all application clusters from the service registration center through the load balancer; 103 The method comprises the steps of detecting, namely, after receiving a detection signal, an Api gateway selects a specific provider from a service provider list to carry out remote call each time, namely, a detection machine transmits a specific application cluster name or an instance machine name parameter to be detected each time, the Api gateway searches in a locally cached service provider list after receiving the detection signal, matches the application cluster name or the machine name attached to the service provider by using the name and the parameter, and then locates the specific provider; 104 And (3) a result processing step of carrying out classification processing according to the detection result, wherein the classification processing comprises notification of manual processing and automatic disaster recovery switching processing.
- 2. The half-screen billing system for WeChat applets of claim 1 wherein the indicators of health detection include an application interface overall health response status, the status being true or false, true representing health and false representing a fault; judging the internal health detection according to indexes of database read-write, cache read-write, thread pool access and service call, wherein if any index is abnormal, the overall health response state is false; The database read-write method comprises the steps of randomly selecting a database db from each database instance, then rapidly inserting, inquiring and deleting a record of a built-in public table, detecting if all the records succeed, and if all the records succeed, detecting if all the records succeed, otherwise, indicating that the database read-write fails; Performing address map read-write operation once on redis remote cache service connected with an application cluster, if successful, detecting passing, otherwise, failing; Thread pool access, determining whether the thread pool access is healthy by detecting whether the number of currently active threads of the tomcat is greater than a preset threshold; and calling the service, namely calling a detection service interface in the cluster by the Api gateway through a service calling protocol, wherein if the detection service interface is called normally, the service is proved to be called normally, otherwise, the service is failed.
- 3. The half-screen billing system for WeChat applets of claim 1 wherein when a detection result of a detector exists in data collected from a data center, if more than 70% of agents report errors, the cluster is considered to have a problem and a back-end service needs to be switched to a corresponding disaster recovery cluster.
- 4. A half-screen billing system for WeChat applet as in claim 3 wherein when the detection result of the detector is in the data of the collection data center, if more than 70% of the agents report errors, the cluster is considered to have a problem and the back-end service needs to be switched to the corresponding disaster recovery cluster, the detector detects at intervals of less than 15 seconds.
- 5. The half-screen billing system for WeChat applet as recited in claim 1, further comprising 105) a recovery step of setting a switch flag and notifying a person to switch back manually at low peak after a switching action of the disaster recovery switching program occurs when the disaster recovery switching process is automatically performed.
Description
Half-screen bill opening system based on WeChat applet Technical Field The invention relates to the technical field of software interface construction and server sides, in particular to a half-screen billing system based on WeChat applet. Background The development of the enterprise WeChat applet is based on JavaScript language. But also on the applet that the enterprise WeChat is the subject of operation. The skill of JavaScript, HTML, CSS and the like is required to develop the applet quickly. The enterprise micro-letter authorities provide a service provider platform on which developers can create and develop their own required third party applications and the like. Simple and easy-to-use forms are created based on an enterprise WeChat platform, and small programs for managing clients are quite common. In order to facilitate the user to manage his external WeChat client when chatting with his client, sales opening can be performed inside the applet. However, when the customer opens the bill, the customer often forgets which goods need to be opened, and then the customer exits the applet to chat the record for viewing, which is inconvenient. Therefore, a convenient and quick menu interface is urgently needed to solve the problem of troublesome operation of users. In this process, the setting of the server is also an important issue, so that RTO index (Recovery Time Objective, recovery time target) needs to be considered in designing the disaster recovery system of the system, so as to achieve the goal of shortening the service stopping time of the production environment as much as possible. In practical applications, database stability is a major consideration in continuously providing services in a production environment. When a scene of damage to the production database occurs, the application route of the production environment needs to be manually switched to the disaster recovery environment. In disaster recovery systems, such manual switching can cause a certain business impact in a short time. There is also a need for more rational server-side system disaster recovery solutions. Disclosure of Invention The invention overcomes the defects of the prior art and provides a half-screen bill opening system based on a WeChat applet. The technical scheme of the invention is as follows: the half-screen billing system based on the WeChat applet comprises a mobile terminal and a server, wherein the mobile terminal is communicated with the server, the mobile terminal loads the WeChat applet and realizes half-screen billing based on the WeChat applet; The WeChat applet comprises a picture display module for selectively displaying the screenshot pictures of the chat contents of the clients and a goods-out operation interface for inputting the order information; the picture display module realizes scrolling to view screenshot pictures of chat contents; Superclass methods for specific opening interface implementations include SaleSelectPhotoView (), chooseImage (), selectGoodsModalView (), selectGoodsDetailModalView (), and onTouchMove (); SaleSelectPhotoView () is used for selecting an interface implementation method of chat screenshot; chooseImage () logic implementation method for selecting user chat screen shots; SelectGoodsModalView () implements a half-screen select item list interface; SelectGoodsDetailModalView () realizes a half screen selecting item detail interface; onTouchMove () is used for realizing the function of processing the manual drag and closing interface of the user, judging whether the user pulls down or not, and automatically closing the opening interface after the user pulls down to a certain distance and releases hands. Further, the picture display module is arranged on the upper half part of the mobile terminal, and the goods output operation interface is arranged on the lower half part of the mobile terminal. Furthermore, the server side sets an application cluster global health state rapid detection method based on the Api gateway, which comprises a detector, the Api gateway, a load balancer, a service registration center and an application cluster, wherein the detector, the load balancer and the application cluster are communicated with the Api gateway, and the load balancer and the application cluster are registered and kept communicated with the service registration center, and the method comprises the following specific steps: 101 A preprocessing step of deploying a plurality of detection machines in various places around the country, wherein a detection agent program is arranged in each detection machine and is used for simulating an App request server; Arranging a plurality of data centers in all over the country, wherein each data center is provided with a plurality of application clusters, each application cluster externally provides a health detection interface, and the internal simulation execution database read-write, cache read-write, thread pool access and service call ar