修复内容

This commit is contained in:
2026-01-30 18:48:13 +08:00
parent 5fe5289e26
commit 76cfa6b278
25 changed files with 943 additions and 289 deletions

View File

@@ -91,8 +91,11 @@ class Order extends ApiBase
$order = OrderLogic::add($this->user_id, $info['data'], $post);
if ($order['code'] == 0) {
$this->_error($order['msg']);
}
return $order;
$this->_success('', $order['data']);
}
@@ -572,6 +575,7 @@ class Order extends ApiBase
public function putday()
{
$this->_error('该时间内无法自主预约,请联系客服');
$post = $this->request->post();
$hourLists = $post['data']['hourLists'] ?? [];
$orderid = $post['data']['id'] ?? 0;

View File

@@ -22,7 +22,8 @@ class Points extends ApiBase
* @return mixed
*/
public function goodslist(){
$lists = PointsLogic::goodslist();
$clsssId = $this->request->get('classify_id');
$lists = PointsLogic::goodslist($clsssId);
$this->_success('获取数据成功',$lists);
}
/**
@@ -38,16 +39,42 @@ class Points extends ApiBase
}
public function goodsSub(){
$data = $this->request->get();
$data['user_id']= $this->user_id;
$user_jf=UserLogic::getUserInfo($this->user_id);
if($user_jf['user_integral']<$data['price']){
$data = $this->request->post();
// 参数校验
if(empty($data) || !is_array($data)){
$this->_error('参数错误');
}
if(empty($data['id']) || empty($data['name']) || !isset($data['price'])){
$this->_error('参数不完整');
}
$data['user_id'] = $this->user_id;
$user_jf = UserLogic::getUserInfo($this->user_id);
if($user_jf['user_integral'] < $data['price']){
$this->_error('积分不足');
}else{
$data = PointsLogic::goodsSub($data);
$this->_success('兑换成功',$data);
$result = PointsLogic::goodsSub($data);
if($result['code'] == 1){
$this->_success('兑换成功');
}else{
$this->_error($result['msg']);
}
}
}
//积分订单列表
public function orderList()
{
$data = $this->request->post();
// 参数校验
if(empty($data) || !is_array($data)){
$this->_error('参数错误');
}
$userId = $this->user_id;
$state = isset($data['state']) ? $data['state'] : null;
$result = PointsLogic::orderList($userId, $state);
$this->_success('获取数据成功',$result);
}
}

View File

@@ -26,7 +26,7 @@ class Share extends ApiBase
public function shareGoods()
{
$id = $this->request->get('id');
$url = $this->request->get('url');
$url = $this->request->get('page');
$client = $this->client;
if ($id && $url) {
$result = ShareLogic::shareGoods($this->user_id, $id, $url, $client);