How do I open a new tab and use the fetch function?

Development environment: react

now that you have done it, click and use the fetch method to get a link on the current page and jump to the target page.
how to keep the current page, open a new tab and use the fetch method to get a link, and then jump to the target page.
current code:

getService(API_PREFIX + "/services/user/loginLingShen", data2 => {
            console.log(data2);
            fetch(data2.result, {     //fetchget
              method: "GET",
              mode: "no-cors",
              credentials: "include",
              cache: "no-store",
              headers: {
                "Content-Type": "application/json",
              },
            }).then(function (response) {
              return response.text().then((json) => {
                window.location="http://www.linksame.com";     //get
              });
            }).catch((error) => {
              console.log(error);
            });
Dec.08,2021

looking at the description, it seems that the communication between the parent and child components can solve the problem.


let w = window.open ("about:blank")

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e94a-2c43a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e94a-2c43a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?