在做taro跳轉的時候,發現在跳轉后的頁面會走兩遍componentDidMount周期,查看了github上的issues,發現是跳轉路由帶參為中文引起的,只要把中文參數進行urlencode解決
Taro.navigateTo({url: `/pages/xxx/xxx?exam_name=${encodeURI(xxx)}`})
在做taro跳轉的時候,發現在跳轉后的頁面會走兩遍componentDidMount周期,查看了github上的issues,發現是跳轉路由帶參為中文引起的,只要把中文參數進行urlencode解決
Taro.navigateTo({url: `/pages/xxx/xxx?exam_name=${encodeURI(xxx)}`})
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。