发起get请求,返回的数据是空数组
// 获取参数的列表数据
async getParamsData() {
//选中的不是3级分类
if (this.selectedCateKeys.length !== 3) {
this.selectedCateKeys = []
return
}
console.log(this.selectedCateKeys[2]);
const { data: res } = await this.$http.get(`categories/${this.selectedCateKeys[2]}/attributes`,
{
params: {sel: this.activeName }
}
)
if (res.meta.status!==200) {
return this.$message.error("获取参数列表失败")
}
console.log(res.data);
}