<?php
/**
 * Created by PhpStorm.
 * User: chenkuan
 * Date: 2017/12/15
 * Time: 下午3:29
 */

namespace frontend\models;

class IndexActivityApi extends BaseApi
{
    public $apiUrl = 'index-activity';

    public function getRegisterList($data = [])
    {
        $result = $this->get($this->apiUrl . '/get-register-list', $data);
        if ($result['code'] == 1) {
            return $this->returnArray(1, $result['data']);
        } else {
            return $this->returnArray(0, [], '获取记录失败');
        }
    }

    public function deleteRegister($data = [])
    {
        $result = $this->get($this->apiUrl . '/delete-register', $data);
        if ($result['code'] == 1) {
            return $this->returnArray(1, $result['data']);
        } else {
            return $this->returnArray(0, [], '删除失败');
        }
    }

    public function getPartnerApply($data = [])
    {
        $result = $this->get($this->apiUrl . '/get-partner-apply', $data);
        if ($result['code'] == 1) {
            return $this->returnArray(1, $result['data']);
        } else {
            return $this->returnArray(0, [], '获取记录失败');
        }
    }

    public function deletePartnerApply($data = [])
    {
        $result = $this->get($this->apiUrl . '/delete-partner-apply', $data);
        if ($result['code'] == 1) {
            return $this->returnArray(1, $result['data']);
        } else {
            return $this->returnArray(0, [], '删除失败');
        }
    }

    public function getEnrollList($data = [])
    {
        $result = $this->get($this->apiUrl . '/get-enroll-list', $data);
        if ($result['code'] == 1) {
            return $this->returnArray(1, $result['data']);
        } else {
            return $this->returnArray(0, [], '获取记录失败');
        }
    }

    public function deleteEnroll($data = [])
    {
        $result = $this->get($this->apiUrl . '/delete-enroll', $data);
        if ($result['code'] == 1) {
            return $this->returnArray(1, $result['data']);
        } else {
            return $this->returnArray(0, [], '删除失败');
        }
    }
}
