|
|
@@ -91,6 +91,14 @@ class AuctionProductController
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取用户竞拍订单
|
|
|
+ * @param Request $request
|
|
|
+ * @return mixed
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\DbException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ */
|
|
|
public function user_auction_order(Request $request)
|
|
|
{
|
|
|
|
|
|
@@ -100,9 +108,28 @@ class AuctionProductController
|
|
|
[['limit', 'd'], 0],
|
|
|
]);
|
|
|
|
|
|
-
|
|
|
return app('json')->successful(AuctionOrder::userOrder($data,$request->uid()));
|
|
|
}
|
|
|
|
|
|
+ public function up_image(Request $request)
|
|
|
+ {
|
|
|
+ $data = UtilService::getMore([
|
|
|
+ ['image'],
|
|
|
+ ['id']
|
|
|
+ ]);
|
|
|
+ if (!$data['image'] || !$data['id']) return app('json')->fail('数据传入错误');
|
|
|
+
|
|
|
+ $order = AuctionOrder::where('id', $data['id'])->find();
|
|
|
+ if (!$order) return app('json')->fail('订单不存在');
|
|
|
+ if ($order['status'] != 1) return app('json')->fail('当前订单状态无法上传凭证');
|
|
|
+ $order['upload_image'] = $data['image'];
|
|
|
+ $order['status'] = 2;
|
|
|
+
|
|
|
+ if ($order->save()){
|
|
|
+ return app('json')->successful('上传成功');
|
|
|
+ }else{
|
|
|
+ return app('json')->fail('上传失败');
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|