wesley 7 年之前
父節點
當前提交
aad4f8450e

+ 6 - 1
app/Http/Controllers/Api/V1/HomeController.php

xqd xqd
@@ -607,6 +607,8 @@ class HomeController extends Controller
      *                  "service_time": "约120分钟",                  //服务时长
      *                  "price": 199,                                //应付金额
      *                  "deposit": 100                               //定金
+     *                  "photo": [                                   //照片
+     *                  ]
      *                  "paidinfo": {
      *                      "id": 3,
      *                      "order_id": "27",
@@ -640,7 +642,10 @@ class HomeController extends Controller
             return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!', $validator->messages());
         }
 
-        $order = OrderInfoModel::with(['paidinfo'])->select(['id', 'out_trade_no', 'username', 'phone', 'email', 'schedule_time', 'status', 'store_id', 'price', 'deposit', 'product_id'])->find(request('order_id'));
+        $order = OrderInfoModel::with(['paidinfo'])->select(['id', 'out_trade_no', 'username', 'phone', 'email', 'schedule_time', 'status', 'store_id', 'price', 'deposit', 'product_id','photo'])->find(request('order_id'));
+        $photo = $order->photo;
+        $order->photo = explode(',',$photo);
+
         $store = $order->store();
         $product = ProductInfoModel::find($order->product_id);
 

+ 1 - 1
app/Models/ProductInfoModel.php

xqd
@@ -45,7 +45,7 @@ class ProductInfoModel extends BaseModel
     ];
 
     public function catename(){
-        return (new ProductCategoryModel())->find($this->category_id)->name;
+        return (new ProductCategoryModel())->find($this->category_id)?(new ProductCategoryModel())->find($this->category_id)->name:$this->category_id;
     }
 
 }

File diff suppressed because it is too large
+ 0 - 0
public/apidoc/api_data.js


File diff suppressed because it is too large
+ 0 - 0
public/apidoc/api_data.json


+ 1 - 1
public/apidoc/api_project.js

xqd
@@ -1 +1 @@
-define({
  "name": "",
  "version": "0.0.0",
  "description": "",
  "sampleUrl": false,
  "defaultVersion": "0.0.0",
  "apidoc": "0.3.0",
  "generator": {
    "name": "apidoc",
    "time": "2018-08-13T06:12:54.401Z",
    "url": "http://apidocjs.com",
    "version": "0.17.6"
  }
});
+define({
  "name": "",
  "version": "0.0.0",
  "description": "",
  "sampleUrl": false,
  "defaultVersion": "0.0.0",
  "apidoc": "0.3.0",
  "generator": {
    "name": "apidoc",
    "time": "2018-08-27T07:27:44.202Z",
    "url": "http://apidocjs.com",
    "version": "0.17.6"
  }
});

+ 1 - 1
public/apidoc/api_project.json

xqd
@@ -1 +1 @@
-{
  "name": "",
  "version": "0.0.0",
  "description": "",
  "sampleUrl": false,
  "defaultVersion": "0.0.0",
  "apidoc": "0.3.0",
  "generator": {
    "name": "apidoc",
    "time": "2018-08-13T06:12:54.401Z",
    "url": "http://apidocjs.com",
    "version": "0.17.6"
  }
}
+{
  "name": "",
  "version": "0.0.0",
  "description": "",
  "sampleUrl": false,
  "defaultVersion": "0.0.0",
  "apidoc": "0.3.0",
  "generator": {
    "name": "apidoc",
    "time": "2018-08-27T07:27:44.202Z",
    "url": "http://apidocjs.com",
    "version": "0.17.6"
  }
}

Some files were not shown because too many files changed in this diff