Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common problems in WeChat Mini Programs's development?

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces what are the common problems in the development of WeChat Mini Programs. What is introduced in the article is very detailed and has a certain reference value. Interested friends must finish reading it!

Q:navigateTo does not have a return button.

A:Android is designed in this way, you need to click the physical return key to return.

Q: how to get the distance between two points on WeChat Mini Programs map?

A: the component is not supported. This can be transferred to a third party or calculated on its own.

Q: in the development tools for developing beta versions, placeholder is not displayed after it is set.

A: this is the bug of the test version of the tool and we will fix this problem in the next test version.

Q: how does WeChat Mini Programs call the API to join Wechat card package?

A: there is no relevant api at present.

Q: after WeChat Pay, use prepay_id to send template messages, always prompting error 41028.

A: here should be a problem that is not stated in the document:

Although the prepay_id can be obtained on the tool, the id is invalid. Only the prepay_id obtained on the real machine can send messages normally.

Place an order using a real machine and then get id and try sending template messages again, and there should be no problem.

Q: does WeChat Mini Programs have any port restrictions? Does the port have to be 443? Just like the official account must have port 80?

A: the secure domain name of Mini Program must be https, and ports are not allowed in the domain name.

Q: why does the debugger display normally and can be tested? You can't even get the data from your cell phone?

A: a self-signed certificate is used; a third-party approved certificate must be used.

Q: can WeChat Mini Programs add an expiration time to his data cache? Could you tell me how to deal with the cache? For example, caching a data that does not change very often. When will you update this data?

A: you can handle this by yourself, even if it is not provided by API, and the strategy can be made by yourself.

Q:wx.scanCode () cannot wake up the scan interface in IOS10 version 6.5.5.

A: it is not recommended to do some interface-related operations in onLoad, because the client may not be ready for the view interface at this time

It can be called in onShow after the next version (there is also a slight problem with onShow timing at present). Currently, you can add a setTimeout to postpone some calls.

Q: do you have the function of annotations when writing functions?

A: you can choose other editors to meet your needs.

Q: can Mini Program receive a push message when it is not at the front desk?

A: you can also receive template messages without the front desk, as long as the pushable condition is met, as long as the user who receives the push message needs to have a form submission or WeChat Pay behavior in Mini Program.

Q:wx.scanCode (object) scans the Wechat friend's QR code and gets a url link, similar to: http://weixin.qq.com/r/Xp1ZQZXEesgFrdEi98h5, what does this url mean? Can you supplement the document in more detail?

A: the Wechat friend QR code can only be processed by the Wechat client itself. This string of URL developers do not need to pay attention to. ScanCode is for developers to use for their own business QR codes.

Has Q:input autofocus failed? Neither auto-focus nor focus= "true" works on the tool simulator.

A: thanks for the feedback. There's something wrong with the tool.

Make some adjustments in the next version.

1: if the focus is in the editor, when you save the refresh, the focus is still in the editor, and the input of the page will not automatically get the focus.

2: if you are on the debugging page, click compile, and the input of the page can be automatically focused.

What is the size limit for uploading images on Q:wx.uploadFile?

A: there is no limit.

Q: template message development version is normal, online version errcode: 41030. May I ask the correct way to write page? Is this directory format / pages/detail/detail?id=xxxxx?

A: remove / before the path

The above is all the contents of the article "what are WeChat Mini Programs's frequently asked questions in Development?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report