<?php
/**
 * Created by PhpStorm.
 * User: stanley-king
 * Date: 2017/10/31
 * Time: 下午8:07
 */
class schema_helper
{
    const prefix = "xmmz://p.lrlz.com";

    static public function special($title,$spid) {
        return self::prefix . "/block/special?title={$title}&special_id={$spid}&isSpecial=true";
    }
    static public function search($keyword,$hotid,$brand) {
        return self::prefix . "/search/search?title=MianMo&brand_id={$brand}&hot_id={$hotid}&keyword={$keyword}&isSpecial=false";
    }
    static public function goods($goods_id) {
        return self::prefix . "/goods/goods?goodsId={$goods_id}";
    }
    static public function mine_bonus() {
        return self::prefix . "/main/index?index=2";
    }
    static public function invite_page() {
        return self::prefix . "/invite/invite";
    }
    static public function send_bonus() {
        return self::prefix . "/bonus/send";
    }
    static public function bonus_detail($type_sn) {
        $url = BASE_SITE_URL . "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn={$type_sn}";
        $url = urlencode($url);
        return self::prefix . "/bonus/detail?url={$url}&type_sn={$type_sn}";
    }
    static public function friends() {
        return self::prefix . "/bonus/friend";
    }
    static public function shake() {
        return self::prefix . "/bonus/shake";
    }
    static public function openurl($title,$url) {
        $url = urlencode($url);
        return self::prefix . "/web/web?title={$title}&url={$url}";
    }
    static public function ugc($title,$special_id)
    {
        $url = BASE_SITE_URL . "/mobile/index.php?act=special&op=index&special_id={$special_id}&client_type=wap";
        $url = urlencode($url);
        return self::prefix . "/web/web?title={$title}&url={$url}";
    }
    static public function groupbuy() {
        return self::prefix . "/act_type/limit_groupbuy";
    }
    static public function mine_favorites() {
        return self::prefix . "/mine/favorites";
    }
    static public function mine_fcode() {
        return self::prefix . "/mine/fcode";
    }
    static public function buy_bundle($blid) {
        return self::prefix . "/bundling/bundling?bl_id={$blid}&buy=false";
    }
    static public function add_fcode($fcode,$key) {
        return self::prefix . "/fcode/add?fcode={$fcode}&key={$key}";
    }
    static public function mine_order() {
        return self::prefix . "/mine/order/index?index=0";
    }
    static public function order_info($pay_sn) {
        return self::prefix . "/order/detail?pay_sn={$pay_sn}";
    }
}