如何通过两个ID来获得Axios?
我的切换开关具有一个Axios.put具有两个ID。一个ID正在正确返回,但另一个ID返回不确定。 这是Console.log '/s/s/groups/61/network-groups/undefined'
的结果 这就是我要获得'/s/groups/61/Network-groups/289'
获得第二个“ ID”的正确方法是什么? 提前致谢!
methods{
...mapActions(['toggleDeliveryAction']),
async toggleDeliveryAction( {gId, id})
{
let url = projConfig.apiRoot + `/s/groups/${id}/network-groups/${gId}`;
console.log(url);
}
}
<switcher
:value="networkGroup.isActive"
:disabled="loading"
@input="(isChecked) => toggleRow(isChecked, group.id, networkGroup.name, {gId: networkGroup.id})"
/>
My toggle switch has a axios.put that has two ids. One id is returning correctly but the other id is returning as undefined.
This is the result in console.log '/s/groups/61/network-groups/undefined'
This is what I want to get '/s/groups/61/network-groups/289'
What is the correct way to get the second 'id'?
Thanks in advance!
methods{
...mapActions(['toggleDeliveryAction']),
async toggleDeliveryAction( {gId, id})
{
let url = projConfig.apiRoot + `/s/groups/${id}/network-groups/${gId}`;
console.log(url);
}
}
<switcher
:value="networkGroup.isActive"
:disabled="loading"
@input="(isChecked) => toggleRow(isChecked, group.id, networkGroup.name, {gId: networkGroup.id})"
/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论