about json-server url path

2021-01-06  本文已影响0人  想溜了的蜗牛

一个比较复杂的业务,分几层,结构大致下如

{
  parent: {
     child_1: {
        ....
    },
    child_2: {
      ....
    },
  }
}

想着有没办法把 url path 设置成 xx.com/parent/child_1xx.com/parent/child_2
但发现不行,于是查了点资料 Nested request without any ids
按这的建议,就是将上面改为

{
   child_1: {
      ....
  },
  child_2: {
      ....
  },
}

然后 path 照旧。

上一篇 下一篇

猜你喜欢

热点阅读