【发布时间】:2018-03-26 14:56:16
【问题描述】:
我尝试了一周的各种解决方案,但没有任何效果,我不知道如何调试我的发布应用程序,在调试模式下,应用程序一切正常!这是我的html代码
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-eval' data: blob: filesystem: ws: gap://ready file: cdvfile: https://ssl.gstatic.com *; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'; img-src * data: 'unsafe-inline'; connect-src * 'unsafe-inline'; frame-src *; worker-src *; child-src *;">
$.post("https://xxxxx/api/").done(function (data) {
console.log(data);
})
config.xml:
<access origin="*" />
<allow-navigation href="*" />
<allow-intent href="*" />
php 代码:
header('Access-Control-Allow-Origin: *');
header('Content-Type: application/json');
$sendData[status] = 'ERROR';
$sendData[message] = 'no action command';
echo json_encode($sendData);
exit();
我在这里错过了什么?
【问题讨论】:
-
它工作正常...我认为问题是缓存问题
标签: php android ajax phonegap-build html-framework-7