vue.js environment, you need to fill in multiple objects on the page and add them to the backend in batches. Currently, there are two APIs in api.js:
apiCheckDuplicated (name)
apiCreateNew (name)
ajax calls implemented by axios.
now the page has entered a bunch of new name: interactively
var newnames = xxxxxx []
first, the for loop detects whether it exists one by one, displays what already exists, reminds the user that it cannot be submitted, and then submits the calling interfaces that do not exist one by one. I"m going to write it in promise, but it feels like it"s too complicated to use. Who can give me an example?