| 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