[Mini Program] Privacy Protection Guidelines Settings

Official announcement of Mini Program: Announcement on the setting of privacy protection guidelines for Mini Programs

The app privacy agreement has just been processed, and the mini program has struck a blow. Roll up your sleeves and do it.

First, let’s take a look at the content of the Mini Program User Privacy Protection Guidelines . Everything involved in it requires configuring the user privacy authorization pop-up window. Including but not limited to functions such as camera, uploading files, mobile phone number, etc., I will not go into details here.

Let’s talk about how I did it. It’s very simple. The official demo has already prepared the rice. We just need to put it on the table of our own mini program. Open the Mini Program Privacy Agreement Development Guide . There is a complete sample demo below.

In the demo, there is a privacyPopup folder under the component. Copy the entire folder to the component in your project.

Find the page in your project that involves user privacy and requires a pop-up window, and add it in json

 "usingComponents": {
    "privacy-popup": "../../component/privacyPopup/privacyPopup"
  }

 Then reference the component in wxml

<privacy-popup bind:agree="agree" bind:disagree="disagree"></privacy-popup>

Clear cache and recompile. You will find that the privacy agreement can be automatically displayed before system pop-ups such as requesting mobile phone numbers.

If it still doesn't work, please check whether the base library is lower than 2.32.3 and whether it is configured in app.json

  "__usePrivacyCheck__": true,

Of course, if the layout style in the official demo does not meet our design specifications, just go to privacyPopup and adjust it.

This sharing ends here. 

Guess you like

Origin blog.csdn.net/u010055598/article/details/132710854