/** * 合并默认参数和额外参数 * @param array $params 默认参数 * @param array/string $param 额外参数 * @return array: */ protected function param($params, $param) { $params = parent::param($params, $param); /* 签名 */ ksort($params); $param = array(); foreach ($params as $key => $value) { $param[] = "{$key}={$value}"; } $sign = implode('', $param) . $this->appSecret; $params['sig'] = md5($sign); return $params; }