我前端的代码是这样,
后台是用php写的,
<code><?php
class IBaseAction extends Action
{
public $params = array();// 所有请求的参数
public $return = array('returnCode' =>200, 'returnDesc' => 'success'); // 返回的基础数据
function __construct()
{
$this->return['serverTime'] =time();
Log::record('传入的参数:' . var_export($_REQUEST, true),Log::DEBUG);
$this->params = @json_decode(base64_decode(I('post.params'),true),true);
if (!$this->params){
$this->return['returnCode'] =100;
$this->return['returnDesc'] = 'sign failed!';
$this->responseJson();
}else if(C('KEY')!=$this->params['key']){
$this->return['returnCode'] =100;
$this->return['returnDesc'] = 'sign failed!';
$this->return['returnAlert'] = '密钥不正确!';
$this->responseJson();
}
}
/*
* 检查接口传入的方式
*/
public function checkPublicParams($interfaces) {
$pass = false;
$this->return['returnCode'] = 100;
if (!I('post.')) {
$this->return['returnDesc'] = '请求方式错误';
} else if (!I('post.method') || !I('post.params')) {
$this->return['returnDesc'] = '接口参数错误';
} else if (!array_key_exists(I('post.method'), $interfaces)) {
$this->return['returnDesc'] = '接口名错误';
} else {
$this->return['returnCode'] = 200;
$pass = true;
}
return $pass;
}
protected function responseJson()
{
exit(json_encode($this->return));
}
}</code>未改的状态是返回 认证失败
“{"returnCode":100,"returnDesc":"sign failed!","serverTime":1476799012}”
在网上也找到了修改的方法
但是不知如何修改
国微CMS企业方案基于“核心+系统+模块+插件”的架构体系,拓展性良好。能非常方便站长及企业搭建企业信息平台。 手机短信体系平台A、 每个售后问题回复,客户均可收到快捷通知短信。B、 每个货物发送,均有一个快捷短信息发给收货方。C、 每个客户均可按实际需求收到手机短信回复与问候。D、每个订单申请都会有一个快捷短信回复。E、每个代理商申请代理均可得到短信回复。
0
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号