How to get the parameters shared by Aladdin QR code in Mini Program app.js?

how to get the parameters of Aladdin"s QR code sharing in Mini Program app.js, be sure to get

before login operation.
Feb.28,2021

    The sharing parameters of the
  1. QR code are in the options.q attribute.
  2. options this object is available in the onLaunch , onShow of the registrant, and onLoad of the registration page.

so, you just need to get options before invoking the life cycle of the login operation.


The

upstairs positive solution we often use in development is that the code scanning function has recently done a
e.q parameter that needs to be parsed with the decodeURIComponent function. For details, you can check Baidu
and convert it into an object after parsing as follows:

GetRequest(url) {
    var theRequest = new Object();
    if (url.indexOf("?") != -1) {
        var str = url.split('?')[1];
        let strs = str.split("&");
        for (var i = 0; i < strs.length; iPP) {
            theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
        }
    }
    return theRequest;
},

then you can get the parameters brought by the normal QR code

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2b892-2ba9f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2b892-2ba9f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?