// nuxt 路由 通过query 传递参数
this.$router.push({path:'/',query:{index:index,row:row}});
//在目标页面通过this.$route.query获取参数:
this.$route.query.aid;
// 带参数打开新页面
第一种:
openProductDescription (item) {
var _this = this;
// _this.detailDialogVisible = true;
// this.$router.push('/usercenter/goodsDetail');
let href = this.$router.resolve({ path: '/usercenter/goodsDetail', query: { aid: item.aid } });
//打开一个新的页面
window.open(href.href,'_blank');
_this.detailMsg = item.adescription;
},
第二种:
openProductDescription (item) {
var _this = this;
// _this.detailDialogVisible = true;
// this.$router.push('/usercenter/goodsDetail');
let href = this.$router.resolve({ path: '/finance/subjectDataEdit', query: {
afirstaid: row.afirstaid,
afirstLevelId: row.afirstLevelId,
afirstLevelName:row.afirstLevelName,
asecondaid: row.asecondaid,
asecondLevelId: row.asecondLevelId,
asecondLevelName : row.asecondLevelName,
athirdaid: row.athirdaid,
athirdLevelId: row.athirdLevelId,
athirdLevelName: row.athirdLevelName,
frCode: row.frCode,
frCodeName: row.frCodeName
}});
//打开一个新的页面
window.open(href.href,'_blank');
},
接收:
var obj = {
afirstaid: this.$route.query.afirstaid,
afirstLevelId: this.$route.query.afirstLevelId,
afirstLevelName:this.$route.query.afirstLevelName,
asecondaid: this.$route.query.asecondaid,
asecondLevelId: this.$route.query.asecondLevelId,
asecondLevelName : this.$route.query.asecondLevelName,
athirdaid: this.$route.query.athirdaid,
athirdLevelId: this.$route.query.athirdLevelId,
athirdLevelName: this.$route.query.athirdLevelName,
frCode: this.$route.query.frCode,
frCodeName: this.$route.query.frCodeName
}
this.bcSubject = obj;