OnlineData.php
985 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
namespace LibModels\Wap\Home;
use Api\Yohobuy;
/**
* 在线客服数据模型
*
* @name OnlineData
* @package LibModels/Wap/Home
* @copyright yoho.inc
* @version 1.0 (2015-11-13)
* @author xiaowei
*/
class OnlineData
{
const ONLINE_URI = 'operations/api/v1/help/';
/*
* 获取帮助列表(分类),缓存1h
* clientType客户端
*/
public static function getOnlineServiceInfo($clientType = 'iphone')
{
return Yohobuy::get(Yohobuy::SERVICE_URL . self::ONLINE_URI . 'getCategory', array('client_type' => $clientType), 3600);
}
/*
* 获取问题详情,缓存1h
* cateId问题分类ID
* clientType客户端
*/
public static function getOnlineServiceDetail($cateId, $clientType = 'iphone')
{
return Yohobuy::get(Yohobuy::SERVICE_URL . self::ONLINE_URI . 'getHelp', array('category_id' => $cateId, 'client_type' => $clientType), 3600);
}
}