Some of the pits that the micro-message applet has stepped on.

Source: Internet
Author: User

So far, serious's online real-world program, but the small program is indeed not small.

The reason is not small, because this community-like small program, has done most of the functions of the

For example, some of the specific functional points:

    • 1, the Post List page: There will be features: rolling load, drop-down refresh, etc.
    • 2, Post page: text, video upload
    • 3, Comment page, text comment
    • 4, Post details page: Rich text parsing, like, reply to posts, reply to comments, concerns, collections, friends circle share, share
    • 5, Mission Center, points acquisition, redemption.
    • 6, small procedures to withdraw to change (coming soon)
Count the following pits (upper)

1. Rich Text

This said there is a very pit, as a post, self-created fortunately, if it is imported rich text, the experience of the small program is really miserable, looking for a variety of methods, which even have their own filter tags, but the performance is not very good, and finally chose the Wxparse

The community is also dedicated to this open source project, designed a small program plug-in, but it is best to use this project to introduce, after all, some code is convenient to change, not every resolution rich text requirements are just met, you can properly adjust the source code.


From Wxparse

It is worth noting that in some search results pages, may also need to use rich text parsing into the search results are red, because the front-end to match, or too cumbersome, this time to use the Wxparse multi-Data recycling method

Example is the array pattern, in fact, the object of the key value pair is also possible, as long as after some processing can, is not very troublesome.

2, image upload

Reference problem source Chooseimage How to get compressed pictures when Sizetype is compressed

There are two small questions about uploading pictures

1, on the real machine, no matter how the print compression results will find no compression.

This time ... Do not be surprised, because the developer tool does not see the actual compression results, to be placed in the real machine on the top of the tune, to print out the size of the specific compression, although not difficult problems, but really distressed a burst.

2. After uploading, the speed of displaying the preview graph is relatively slow.

This is their own death encountered, in order to facilitate the diagram, directly took the seven cow cloud above the link address rendering img, but the actual experience than imagined is much worse, the best way to improve the scheme, or take choose after the local image rendering, the speed is much faster.

3. Video is always at the highest level

At the time of doing the frame, no matter how the design of the window, can not exceed the video of the mountain, and finally found no matter what the label, set what level is no use.

Choose the way to design a video that pretends to be paused (black screen), moves the real videos away, and so on when the popup message is removed and then re-moved back.

This program still feel very low, there is a good plan can be suggested under.

4. When textarea gets focus, the page does not push

Yes, this is a known issue, no more searching, coordinates 2018-9-3, not yet repaired ..... All kinds of resentment. (Some phones are supported by push-up)

Count the following pits (bottom)

5, small program poster two-dimensional code drawing

As long as the small program in the function are beginning to perfect almost, inevitably will encounter this small program poster two-dimensional code problem, this time is a variety of God pen Ma Liang when drawing.

This time, you will encounter how to hide the current canvas problem, there are many options, the last choice, the canvas out of the screen, with the previous video is similar to the method.

As for the two-dimensional code drawing, the demand for large, recommended documents in the B program.

Get two-dimensional code

There is a bit more pit is that the identification of the QR code must be if the small program has been released, if the small program has never been released, no matter how well you are debugging is not successful.

6. Small program sharing

The announcement has been made to cancel the successful callback.

Detailed applet, Web and app sharing function adjustment

Not finished ... Do not know whether to be continued

Long time no blog, this time has been immersed in the small program, there are willing to discuss the children's shoes welcome, the current small program has been stable on-line 2 months, Community Class applet.

Please specify the original address Thank you

My github, welcome to shoot Bricks

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.