Solve the problem of ignoring the URL parameters carried by the applet routing jump

describe

When I was doing a jump in a small program recently, I found that I omitted a part of the parameter when carrying it. At first, I thought it was because my parameter was too long. Is there a limit? I found out later that it was because my parameter was a URL. , and then helped me omit a part. After finding the problem, the solution is very simple. just transcode it

wepy.navigateTo({
    
    
        url: "/pages/路径=" + encodeURIComponent(id)
      });

//接收再转回来
decodeURIComponent(option.id);

Just such a little trick, record it.

The personal level is limited. If you have any questions, please leave a message for guidance. It is only for learning and reference.

There is no limit to learning! Work hard, encourage each other!

Guess you like

Origin blog.csdn.net/qq_37131884/article/details/104546050