The ajax post request submission parameter returned status=200, but the code=0 display operation failed.

there is an add function, ajax post request submission parameter returned status=200, but the code=0 display operation failed, and then the data is not in data, but in config.data

    add(){
        let data = {
          systemDeptName: "test",
          systemDeptParentId: 546515268,
          systemDeptSort: 1,
          systemDeptRemark: ""
        }
        this.$http.post("/api/admin/safe/dept/add",data).then((res)=>{
            console.log(res)
        })
    },  
    

clipboard.png

ask for advice

Oct.20,2021

this problem should be handled by the server. There is no problem with the handling of ajax. For specific reasons, you should consult the students who provide the interface on your server. If the server is written by node itself, the processing logic of the server should also be posted.


response 200 simply means that the server has responded to the request normally, and exactly why the operation failed should depend on the back-end logic.

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-1b3fde2-2c4f6.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-1b3fde2-2c4f6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?