在网上找了很多教程,也没有实现
 
                                        
                                    
                                    
                                        1***@qq.com                                                                                
                                        
                                - 发布:2019-08-01 11:56
- 更新:2020-01-01 11:11
- 阅读:6576
 
                                                                    
                                                                注入以下 JS 或者 在自己的页面写
document.addEventListener('UniAppJSBridgeReady', function() {  
$('body').on('click','a',function (e) {  
      if (/javascript/.test(this.href)){  
          return  
      }  
     e.stopPropagation();  
     e.preventDefault();  
      var href = this.href.replace(location.protocol + '//' +location.hostname,'');  
      var Reg = new RegExp('\/question\/\\d+','ig');  
          if (Reg.test(href)){  
              uni.navigateTo({  
                url: '/pages/question/index?id=' + href.replace(/\/question\/(\d+?)/,'$1')  
              });  
          }  
})  
} 
             
             
             
			 
                                                                    

 
            
DCMarvel
看回复
2020-01-01 11:12