a标签 此处链接为一个外链接 传统得 ajax get请求 携带字符串 item.goods_id 商品id

<a :href="$global.http+ '/b2b/addCart?gid='+ item.goods_id"></a> 
  1. 标签在网页中检查就相当于标签 此处链接为vue项目内部的链接 to属性值相当于 路由 此标签生成的网址在路由前面 会有个
<router-link :to="{path:'/login'}" ></router-link> 

3.通过事件 点击 打开新的页面

//方法 See (goodsId) { if(this.$global.getCookie('SYB_TX[tokenId]')){ window.location.href ='https://www.baidu.com/?tn='+goodsId; // 跳转链接 }else{ this.$router.push({path: '/login'}) } }, 
<a :href ="'http://search.jd.com/Search?enc=utf-8&keyword='+keyWord+'&page='+Math.ceil(record.skuRank/60)+'.html'">跳转</a> 

注意点:
1.href前面要加“:”
2.字符串要用单引号“ ’ ”包住
3.句尾要加“.html”

转自
https://blog.csdn.net/weixin_39192643/article/details/82529113