当前位置:网站首页>Wechat applet refreshes the current page

Wechat applet refreshes the current page

2022-06-27 05:19:00 Summer thought

// Refresh current page .
reloadThisPage() {
   let currentPages = getCurrentPages()
   let lastRoute = currentPages[currentPages.length - 1].route
   let options = currentPages[currentPages.length - 1].options
   let optionsStr = "?"
   for (let key in options) {
      optionsStr += '&' + key + '=' + options[key]
   }

   wx.redirectTo({
      url: '/' + lastRoute + optionsStr,
   })
},
原网站

版权声明
本文为[Summer thought]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/178/202206270509026866.html