About opensetting calls via tap

Source: Internet
Author: User

Problem Module Frame Type Problem Type api/Component Name Terminal type version Base Library version
APIs and Components Small program Bug Opensetting Tools 6.7.2 2.3.0

- performance of the current Bug (can be attached)

The official note that the opensetting call is to support the tap to trigger the ShowModal, and then in ShowModal, but after the actual operation, with the description of the discrepancy.

Due to the actual development, in order to facilitate authorization, getsetting,showmodal,opensetting encapsulated in a function, convenient detection of permissions and authorization, but also should be satisfied with the above mentioned in the tap trigger requirements, but after testing, but still display the following prompt

VM255:1 openSetting:fail can only be invoked by user TAP gesture.

- Expected Performance

Support to trigger ShowModal via tap and then showmodal in the opensetting

- Recurrence Path

To import the code snippet (you need to fill in the AppID, because authorization is required), the following actions:

1, click on the authorization, click "Cancel" to refuse authorization

2, click the authorization again, at this time due to judge the user has refused authorization, so will go to call ShowModal display Confirm authorization box, click "OK", go back to call opensetting. At this time see the console, there will be the following tips

Opensetting:fail can only is invoked by user TAP gesture.

- provides a minimal replication Demo

Code snippet: wechatide://minicode/priplomj7222

-Conclusions and Solutions

The official development of the solution, due to the process of encapsulation using the promise way to deal with the problem of callback, changed to direct normal callback mode can solve the problem;

So that is the original way of judging and the process is unchanged, only need to modify the callback method.

Resolved Code snippet: wechatide://minicode/wyamurmb7x2l

Code Snippetswechatide://minicode/priplomj7222

This article is reproduced

About opensetting calls via tap

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: info-contact@alibabacloud.com 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.