示例#1
0
文件: functions.php 项目: macall/jsd
function m_merchantItem($item)
{
    $is_dy = intval($item['is_dy']);
    if ($is_dy > 0) {
        $is_dy = 1;
    }
    $supplier_name = $GLOBALS['db']->getOne("select name from " . DB_PREFIX . "supplier where id=" . intval($item['supplier_id']));
    $logo = get_spec_image($item['logo'], $width = 160, $height = 0, $gen = 0, $is_preview = true);
    $item['width'] = $item['avg_point'] > 0 ? $item['avg_point'] / 5 * 100 : 0;
    $group_point = unserialize($item['dp_group_point']);
    if ($group_point === false) {
        $group_point = array();
    }
    return array("id" => $item['id'], "name" => $item['name'], "avg_point" => $item['avg_point'], "logo" => get_abs_img_root($logo), "xpoint" => $item['xpoint'], "ypoint" => $item['ypoint'], "api_address" => $item['api_address'], "address" => $item['address'], "dp_count" => $item['dp_count'], "avg_point" => $item['avg_point'], "good_rate" => $item['good_rate'], "deal_cate_id" => $item['deal_cate_id'], "tel" => $item['tel'], "group_point" => $group_point, "is_dy" => $is_dy, "city_name" => $item['city_name'], "city_id" => $item['city_id'], "mobile_brief" => $item['mobile_brief'], "comment_count" => intval($item['comment_count']), "event_count" => intval($item['event_count']), "youhui_count" => intval($item['youhui_count']), "brand_id" => intval($item['brand_id']), "distance" => round($item['distance']), "brief" => get_abs_url_root($item['brief']), "width" => round($item['width'], 1), "supplier_name" => $supplier_name, "supplier_id" => $item['supplier_id']);
}
示例#2
0
function m_merchantItem($item)
{
    $is_dy = intval($item['is_dy']);
    if ($is_dy > 0) {
        $is_dy = 1;
    }
    $logo = get_spec_image($item['logo'], $width = 160, $height = 0, $gen = 0, $is_preview = true);
    return array("id" => $item['id'], "name" => $item['name'], "logo" => get_abs_img_root($logo), "xpoint" => $item['xpoint'], "ypoint" => $item['ypoint'], "api_address" => $item['api_address'], "address" => $item['api_address'], "tel" => $item['tel'], "is_dy" => $is_dy, "city_name" => $item['city_name'], "comment_count" => intval($item['comment_count']), "brand_id" => intval($item['brand_id']), "distance" => round($item['distance']), "brief" => get_abs_url_root($item['brief']));
}