• ADADADADAD

    小程序页面路径参数怎么看[ 建站问答 ]

    建站问答 时间:2024-12-01 19:02:33

    作者:文/会员上传

    简介:

    小程序获取当前页面路径及参数的代码:exportfunctiongetCurrentPageUrlWithArgs(){constpages=getCurrentPages()constcurrentPage=pages[pages.length-1]consturl=currentPa

    以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。

    小程序获取当前页面路径及参数的代码:

    exportfunctiongetCurrentPageUrlWithArgs(){

    constpages=getCurrentPages()

    constcurrentPage=pages[pages.length-1]

    consturl=currentPage.route

    constoptions=currentPage.options

    leturlWithArgs=`/${url}?`

    for(letkeyinoptions){

    constvalue=options[key]

    urlWithArgs+=`${key}=${value}&`

    }

    urlWithArgs=urlWithArgs.substring(0,urlWithArgs.length-1)

    returnurlWithArgs

    }

    小程序页面路径参数怎么看.docx

    将本文的Word文档下载到电脑

    推荐度:

    下载