随笔 - 298  文章 - 377  trackbacks - 0
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用链接

留言簿(34)

随笔分类

随笔档案

文章档案

相册

收藏夹

搜索

  •  

最新评论

阅读排行榜

评论排行榜

后台:
            header('Content-Type:text/html; charset=utf-8');
            header('Access-Control-Allow-Origin: *');
            header('Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE');
            header('Access-Control-Max-Age: 3600');
            header('Access-Control-Allow-Headers: Content-Type,x-requested-with,Authorization');
            header('Access-Control-Allow-Credentials: true');
            if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
                header('HTTP/1.1 200 OK');
                exit;
            }



Sender:
if (fetchType === 'CORS'){
return axios.post(url, qs.stringify(Data))//如果是跨域接口 发送表单请求 否则 发送json
}else {
return axios.post(url, Data)
}

@import url(http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
posted on 2017-09-03 18:03 聂文龙 阅读(295) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理