Mini Program: official-account official account follow component

1. Introduction to official-account

official-account | WeChat Open Documentation

2. Practice

Technology stack: mpvue applet. . uniapp also

<official-account @load="bindload" @error="binderror"></official-account>

methods: {
    bindload (e) {
      console.log('bindload:', e)
    },
    binderror (e) {
      console.log('binderror:', e)
    }
}

The method of mobile phone WeChat scanning code is successful.

If you have followed, it will display "view", if you have not followed, it will display "follow".

On the mobile phone WeChat, I recognized the QR code, and then an error message appeared. . Wrong scene value. . Can't solve it now~

The supplementary method can make some compensation in the wrong callback, for example, displaying the QR code of an official account~

 

3. Related content

The backend generates url, and the page is accessed through web-view

https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=XXX==&scene=110#wechat_redirect

tested

Open the debugging mode of WeChat on the mobile phone, and the operation is normal

It is not in debug mode, and cannot be opened. I saw some information that it was possible before, but it is not working now. . .

Welcome to exchange and correct, follow me, and learn together.

Reference link:

Why does the display scene of the official-account component not include long-pressing the QR code to identify and enter the applet? | WeChat Open Community

Guess you like

Origin blog.csdn.net/snowball_li/article/details/129989605