<?php

# 订单类

namespace Res\Lib;

use Dever;
use Main\Lib\Core;

class Order extends Core
{
	protected $checkUser = true;

	# 获取我的订单
	public function my()
	{
		$where['uid'] = $this->data['uid'];
		$data = Dever::db('res/order')->state($where);

		if ($data) {
			$info = Info::init(-1);
			foreach ($data as $k => $v) {
				$data[$k]['info'] = $info->getInfo($v['product_id'], true, 'list_reorder');
			}
		}

		return $data;
	}
}