<?php

namespace Main\Src;

use Dever;
use Main\Lib\Core;

class Data extends Core
{
    protected $checkUser = false;

    public function config()
    {
    	//print_r($this->data['config']);die;
        $this->data['config']['index_link'] = Dever::url('main/home');
    	$this->data['config']['search_link'] = Dever::url('main/search');
        $this->data['config']['submit_link'] = Dever::url('main/submit');
        $this->data['config']['vip_link'] = Dever::url('main/vip');
        $this->data['config']['user_link'] = Dever::url('main/ucenter');
        $this->data['config']['repassword_link'] = Dever::url('main/repassword');
        $this->data['config']['password_link'] = Dever::url('main/password');
        $this->data['config']['edit_link'] = Dever::url('main/edit');
        $this->data['config']['service_link'] = Dever::url('main/service');
        $this->data['config']['share_link'] = Dever::url('main/share');

        $quit = Dever::url('passport/login.quit?refer=2');
        $this->data['config']['quit'] = 'location.href=\''.$quit.'\'';

        return $this->data['config'];
    }

    # 验证当前用户是否关联拼呗
    public function pinbei()
    {
        # 显示状态
        $result['state'] = true;
        return $result;
    }

    # 获取推荐列表
    public function getPush($data)
    {
        if (!isset($data['limit'])) {
            $data['limit'] = false;
        }
        return Dever::load('push/lib/data')->get($data['key'], $data['name'], $data['num'], false, $data['limit']);
    }
}