xieruidong 2 лет назад
Родитель
Сommit
1204a10a90

+ 8 - 4
app/data/controller/api/Data.php

@@ -3,6 +3,9 @@
 namespace app\data\controller\api;
 
 use app\data\model\BaseUserMessage;
+use hg\apidoc\annotation\Param;
+use hg\apidoc\annotation\Returned;
+use hg\apidoc\annotation\Title;
 use think\admin\Controller;
 use think\admin\helper\QueryHelper;
 use think\admin\model\SystemBase;
@@ -33,10 +36,11 @@ class Data extends Controller
     }
 
     /**
-     * 图片内容数据
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
+     * @Title("图片内容数据")
+     * @Param("keys",desc="船厂传:data_shipyard")
+     * @Returned("img",desc="图片链接")
+     * @Returned("url",desc="跳转url")
+     * @Returned("type",desc="#不跳转,LK自定义链接,NL新闻资讯列表,NS")
      */
     public function getSlider()
     {

+ 10 - 3
app/data/controller/api/business/Purchase.php

@@ -499,9 +499,16 @@ class Purchase extends Controller
             $this->error('该接单已被其他订单匹配');
         }
         $offer=ShopPurchase::getOffer($data['tab'])->lock(true)->where('id',$data['offer_id'])->findOrFail();
-        if($offer->order_id!=$model['id']){
-            Db::rollback();
-            $this->error('该接单不属于此订单');
+        if($request['tab']==1){
+            if ($offer->item_id != $model['id']) {
+                Db::rollback();
+                $this->error('该接单不属于此订单');
+            }
+        }else {
+            if ($offer->order_id != $model['id']) {
+                Db::rollback();
+                $this->error('该接单不属于此订单');
+            }
         }
 
         $model['offer_id']=$data['offer_id'];

+ 3 - 2
app/data/controller/base/Slider.php

@@ -19,8 +19,9 @@ class Slider extends Controller
     protected $rules = [
         '#'  => ['name' => '不跳转'],
         'LK' => ['name' => '自定义链接'],
-        'NL' => ['name' => '新闻资讯列表'],
-        'NS' => ['name' => '新闻资讯详情', 'node' => 'data/news.item/select'],
+        //'NL' => ['name' => '新闻资讯列表'],
+        //'NS' => ['name' => '新闻资讯详情', 'node' => 'data/news.item/select'],
+        //'XW' => ['name' => '新闻资讯详情', 'node' => 'admin/xw/index'],
     ];
 
     /**

+ 1 - 0
config/apidoc.php

@@ -49,6 +49,7 @@ return [
                     \app\data\controller\api\auth\Purchase::class,
                     \app\data\controller\api\auth\UserPurchase::class,
                     \app\data\controller\api\ShipYard::class,
+                    \app\data\controller\api\Data::class,