微信小程序中出現Invoking Page() in async task.問題


      在做項目中需要讓頁面跳到外網,用到了<web-view src=""> </web-view>組件,需要新建一個文件放這個組件,調接口的時候鏈接連到這個頁面,當我把參數傳過去的時候,出現了 page[pages/XXX/XXX] not found.May be caused by :1. Forgot to add page route in app.json.2. Invoking Page() in async task.導致參數沒有傳過去,百度了一下是因為在app.json里面的路由填寫順序問題,最后貼上我的代碼:

                     data:{     

                               

                                      site:''//外網地址

       

                          }    

                url: '/pages/index/vacancy/vacancy?site=' + uri,
 
                     <web-view src="{{site}}"> </web-view>
                        onLoad: function (options) {
                               console.log(options)
                               this.setData({
                                     site: options.site
                            })
                                        console.log(this.data.site)
                           },
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM