作者 xudada

添加路由验证,存在提示

... ... @@ -183,15 +183,15 @@ let routes = [
// {path: '/exchangeView', component: ExchangeView, name: '交换机监控'},
]
},
{
path: '/nav3',
component: Home,
name: '组件练习',
iconCls: 'el-icon-view',
children: [
{path: '/page7', component: Page7, name: '组件'},
]
},
// {
// path: '/nav3',
// component: Home,
// name: '组件练习',
// iconCls: 'el-icon-view',
// children: [
// {path: '/page7', component: Page7, name: '组件'},
// ]
// },
// {
... ...
... ... @@ -258,7 +258,7 @@
let para = Object.assign({}, this.addForm);
addType(para).then((res) => {
this.$message({
message: '提交成功',
message: res.data.msg,
type: 'success'
});
//数据初始化
... ...
... ... @@ -352,8 +352,10 @@
_this.loadingStatus = true;
api_batchAddRouter(this.params).then(response => {
let res = response.data;
if (res.code !== '200') {
return _this.$message.error('批量添加路由,失败!');
console.log(res)
if (res.code != '200') {
return _this.$message.error(res.msg);
_this.loadingStatus = false;
}
// 关闭加载
_this.$message.success('批量添加路由,成功!');
... ...
... ... @@ -240,3 +240,4 @@
}
}
</script>
<style scoped></style>
... ...