OnlineData.php 985 Bytes
<?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);
    }

}