鍍金池/ 問(wèn)答/HTML/ dva如何按順序訪問(wèn)網(wǎng)頁(yè)

dva如何按順序訪問(wèn)網(wǎng)頁(yè)

      yield put(routerRedux.push({
        pathname: `/bbs/websocket/login/${userId}`,
      }))
      console.log("@3.3")
      yield put(routerRedux.push({
        pathname: `/bbs/websocket/send/${userId}`,
      }))
      console.log("@4")
      yield put(routerRedux.push('/dashboard'))
      

如何按順序訪問(wèn)這3個(gè)網(wǎng)址?我這樣寫好像沒(méi)有用。。
http://localhost:8000/bbs/websocket/login/3
http://localhost:8000/bbs/websocket/send/3
http://localhost:8000/dashboard

回答
編輯回答
墨染殤

push會(huì)將前面的頁(yè)面url壓到瀏覽器history棧中,只顯示最后一個(gè)。
dvaeffects就是同步執(zhí)行的。

2018年3月14日 00:04