#### 站內使用Ajax獲取數據示例:
```
<script>
$(document).ready(function (e) {
??var url='/api.php/cmf/site';
??$.ajax({
????type: 'POST',
????url: url,
????dataType: 'json',
????data: {
??????appid: '{shanke:appid}',
??????timestamp: '{shanke:timestamp}',
??????signature: '{shanke:signature}'
?? ??},
????success: function (response, status) {
??????if(response.code){
????????//獲取數據成功
????????alert(response.data.title);
??????}else{
????????//返回錯誤數據
????????alert(response.data);
??????}
????},
????error:function(xhr,status,error){
??????//返回數據異常
??????alert('返回數據異常!');
????}
??});
});
</script>
```
此處使用了三個站內標簽:
{shanke:appid} 認證用戶名
{shanke:timestamp} 時間戳
{shanke:signature} 認證簽名