36 lines
771 B
PHP
36 lines
771 B
PHP
<?php
|
|
|
|
namespace app\api\validate;
|
|
|
|
use app\common\validate\BaseValidate;
|
|
|
|
class PointsOrderValidate extends BaseValidate
|
|
{
|
|
protected $rule = [
|
|
'product_id' => 'require|number',
|
|
'order_id' => 'require|number',
|
|
];
|
|
|
|
protected $message = [
|
|
'product_id.require' => '请选择积分套餐',
|
|
'product_id.number' => '积分套餐参数错误',
|
|
'order_id.require' => '订单参数缺失',
|
|
'order_id.number' => '订单参数错误',
|
|
];
|
|
|
|
public function scenePreOrder()
|
|
{
|
|
return $this->only(['product_id']);
|
|
}
|
|
|
|
public function sceneCreateOrder()
|
|
{
|
|
return $this->only(['product_id']);
|
|
}
|
|
|
|
public function sceneDetail()
|
|
{
|
|
return $this->only(['order_id']);
|
|
}
|
|
}
|