0
点赞
收藏
分享

微信扫一扫

mui axaj 注意点

窗外路过了谁 2022-05-31 阅读 34

谁用这玩意啊...服了

 

画了一个小时总结:

1. 他的url 不能用 127.0.0.1 已经 loaclhosy  只能用自己本机IP ,自己IPconfig 查询

2.他的url一定要带上http://协议头。http 和 https都可以

 

以上2点没满足!那么就等这回调error错误把,而且没任何提示! 气死人!!!!!!!!!!

 

刚成功的代码:

mui axaj 注意点_jsonmui axaj 注意点_json_02

mui.ajax(app.serverUrl + "/u/login", {
                            data: {
                                "username": username.value,
                                "password": txt_password.value,
                                "cid": cid
                            },
                            dataType: 'json',
                            type: 'post', //HTTP请求类型
                            timeout: 10000, //超时时间设置为10秒;
                            headers: {
                                'Content-Type': 'application/json'
                            },
                            success: function(data) {
                                console.log(JSON.stringify(data));
                            }
                        })

mui.axaj

mui axaj 注意点_json_03

 


作者:咸瑜​


举报

相关推荐

0 条评论