uni——跳转到外链

案例代码

简洁写法

if(res.data){
    
      //如果存在链接,打开第三方
	window.location.href=res.data
}else{
    
    
	//不存在跳转到其他页面
	uni.$utils.common.on('/pages/index/index')
}

猜你喜欢

转载自blog.csdn.net/xulihua_75/article/details/130099821