如何通过两个ID来获得Axios?

发布于 2025-01-31 03:50:04 字数 798 浏览 0 评论 0原文

我的切换开关具有一个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技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文