对于以下代码获取输出
$response=array();
$response['wheel_deg_end'] = (360*(ceil($wheel->wheel_spin_time/3))) + (360 - (($wheel_slice_number * 30) - 30)) + rand(-5,5);
$response['wheel_time_end'] = $wheel->wheel_spin_time * 1000;
$response['success'] = true;
$ab = json_encode($response,JSON_NUMERIC_CHECK);
echo $ab;
输出:
"{"wheel_deg_end":1743,"wheel_time_end":10000,"success":true}"
Json 解析错误:
jQuery.ajax({
url: couponspining_ajaxurl,
type: 'POST',
data: {
action: 'couponspining_wheel_run',
form_data: form_data,
preview_key: this.preview_key
},
context: this,
}).done(function(json){
this.submit_form_done(jQuery.parseJSON(json));
});
未捕获的语法错误:JSON.parse:JSON数据submit_form的第3行第1列出现意外字符 http://localhost/shopify-php-app/src/public/assets/js/couponspining1.js:210
慕莱坞森
陪伴而非守候
料青山看我应如是
相关分类