作者 耿培杰

修改配置

... ... @@ -290,6 +290,7 @@ class Member extends Api
$limit = Config::get('paginate.index_rows');
if (empty($type)) $this->error('缺少参数 type!');
$where = ['user_id' => $userId];
$where['is_del'] = 0;
if ($type == 1) $where['type'] = ['in', '1,2'];
else $where['type'] = ['eq', 3];
$list = $orderModel->selectPageData($where, $page, $limit);
... ...
... ... @@ -1363,8 +1363,7 @@ class Order extends Api
$order = $this->orderModel->where(['id' => $param['order_id']])->find();
if (!$order) $this->error('订单不存在');
if ($order['status'] == 2 || $order['status'] == 3|| $order['status'] == 4 || $order['status'] == 6 || $order['status'] == 7 || $order['status'] == 10) $this->error('此订单状态不可删除');
$res = $this->orderModel->where('id', $param['order_id'])->delete();
$res = $this->orderModel->where('id', $param['order_id'])->update(['is_del'=>1]);
if ($res) $this->success('删除订单成功');
else $this->error('删除订单失败');
}
... ...