vue使用axios调用api接口 ---- 多参数传递
//新增 var params = { deviceName:this.dtypefrom.deviceName, deviceFirstCode:FirstCode, deviceSecondCode:SecondCode, firstSecondCode:this.dtypefrom.firstSecondCode, modelCode:this.dtypefrom.modelCode, } this.$axios.post(`${this.$APIURL}/deviceType/add`,params) .then(response => { const { data } = response if(data.code=="0") { console.log(data); this.showdtypediafrom = false; this.showdtypemanager(); this.$message({ message: '添加成功!', type: 'success' }); this.dtypefrom={}; } else { this.$message.error(data.msg); } }).catch(error => { this.$message.error(error); })