<?php

# 订单类

namespace Res\Src;

use Dever;

class Test
{
    private $host = 'http://openapi.ecois.info/';
    private $token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOjIwMTYsImp0aSI6IjUzZElCemFEc3BTSUJ5N3MiLCJleHAiOjE1Nzc2Mjg3NzR9.G1_y8NnO7wwJWn-R9MAThqATTNBmApHeq_xuSMYZCZ8';
    # 获取我的订单
    public function index()
    {
        $url = $this->host . '/v3/devices';

        $header['Authorization'] = $this->token;
        $param['page'] = 1;
        $param['limit'] = 100;

        $data = Dever::curl($url, $param, 'get', true, $header);

        print_r($data);die;

        return $data;
    }

    public function token()
    {
        $url = $this->host . '/v3/token';

        $param['appid'] = '53dIBzaDspSIBy7s';
        $param['secret'] = 'RzZ28lmQW3xm2jsVUZsD2i4X4rah3t8d';
        $data = Dever::curl($url, $param);

        print_r($data);die;
    }
}