帖子
帖子
用户
博客
课程
显示全部楼层
5
帖子
0
勋章
2567
Y币

[插件开发] "statusCode":500,"code":0,发送ajax请求提示这个

[复制链接]
发表于 2022-10-10 16:12:37



api.ajax({
            url: ljurl,
            method: 'post',
            cache: 'false',
            timeout: 30,
            dataTpye: 'json',
            data: {
                values: rlpostitme,
                files: {
                    file: path
                }
            },
        }, function (ret, err) {
            //console.log(JSON.stringify(ret));
            console.log(JSON.stringify(err));
            api.hideProgress();
            if (ret.result == 1) {
                toast.hide();
                api.toast({
                    msg: "提交成功",
                    duration: 2000,
                    location: 'bottom'
                });
                setTimeout(function () {
                    api.sendEvent({
                        name: 'addclose'
                    })
                }, 1000)
            }
            else if (ret.result == 0) {
                toast.hide();
                api.toast({
                    msg: ret.des,
                    duration: 2000,
                    location: 'bottom'
                });

            } else {
                toast.hide();
                api.toast({
                    msg: '请求失败'
                })
            }
        })
不加files的访问正常,加上就不能请求后台了

"statusCode":500,"code":0,"headers":
{"Cache-Control":"private","X-Android-Sent-Millis":"1665388459695","X-AspNet-Version":"4.0.30319",
"Content-Type":"text/html","X-Powered-By":**.**","Date":"Mon, 10 Oct 2022 07:54:10 GMT",
"Content-Length":"1141","Server":"Microsoft-IIS/10.0","X-Android-Response-Source":"NETWORK 500","X-Android-Received-Millis":"1665388461301"}

用postman请求一下,报错吗
您需要登录后才可以回帖 登录

本版积分规则