dlh_test_server/app/api/controller/Verify.php
Yao baa8f9a93d 新增核销列表
商家绑定列表
余额支付页
2024-10-03 19:04:03 +08:00

68 lines
1.8 KiB
PHP

<?php
namespace app\api\controller;
use app\common\basics\Api;
use app\api\validate\VerifyValidate;
use app\common\server\JsonServer;
use app\api\logic\VerifyLogic;
class Verify extends Api
{
public $like_not_need_login = ['getVerifyCode'];
/**
* @return \think\response\Json
* 获取核销码
*/
public function getVerifyCode(){
$get = $this->request->get();
(new VerifyValidate())->goCheck('getVerifyCode', $get);
$data = VerifyLogic::getVerifyCode($get);
if (false === $data) {
return JsonServer::error(VerifyLogic::getError());
}
return JsonServer::success('获取成功!', $data);
}
/**
* @return void
* 扫码核销
*/
public function dispose(){
$post = $this->request->post();
$user_id = $this->user_id;
$post['user_id'] = $user_id;
(new VerifyValidate())->goCheck('dispose', $post);
$data = VerifyLogic::dispose($post);
if (false === $data) {
return JsonServer::error(VerifyLogic::getError());
}
return JsonServer::success('核销成功!', $data);
}
public function verifyOrderList(){
$post = $this->request->post();
$post['user_id'] = $this->user_id;
$data = VerifyLogic::verifyOrderList($post);
if (false === $data) {
return JsonServer::error(VerifyLogic::getError());
}
return JsonServer::success('请求成功!', $data);
}
public function StoreList(){
$post = $this->request->post();
$post['user_id'] = $this->user_id;
$data = VerifyLogic::StoreList($post);
if (false === $data) {
return JsonServer::error(VerifyLogic::getError());
}
return JsonServer::success('请求成功!', $data);
}
}