WIN-2308041133\Administrator 5 maanden geleden
bovenliggende
commit
1da0b26a93

+ 6 - 0
app/common/repositories/user/AwardIntegralPriceRepository.php

@@ -16,6 +16,7 @@ namespace app\common\repositories\user;
 
 
 use app\common\dao\user\AwardIntegralPriceDao;
 use app\common\dao\user\AwardIntegralPriceDao;
 use app\common\dao\user\AwardLakeDao;
 use app\common\dao\user\AwardLakeDao;
+use app\common\dao\user\AwardLakeLogDao;
 use app\common\model\store\order\StoreOrder;
 use app\common\model\store\order\StoreOrder;
 use app\common\model\user\AwardIntegralPrice;
 use app\common\model\user\AwardIntegralPrice;
 use app\common\model\user\AwardLakeLog;
 use app\common\model\user\AwardLakeLog;
@@ -170,4 +171,9 @@ class AwardIntegralPriceRepository extends BaseRepository
         // 返回包含数据总数和数据列表的数组
         // 返回包含数据总数和数据列表的数组
         return compact('count', 'list');
         return compact('count', 'list');
     }
     }
+    public function getPrice(){
+        $mark = app()->make(AwardIntegralPriceDao::class);
+        $price = $mark->order('add_time DESC')->value('price');
+        return $price;
+    }
 }
 }

+ 3 - 4
app/controller/api/user/Award.php

@@ -29,15 +29,14 @@ class Award extends BaseController
 
 
 
 
     /**
     /**
-     * 用户反馈列表
+     * 积分价格
      * @return mixed
      * @return mixed
      * @author xaboy
      * @author xaboy
      * @day 2020/5/28
      * @day 2020/5/28
      */
      */
-    public function feedbackList()
+    public function integral_price()
     {
     {
-        [$page, $limit] = $this->getPage();
-        return app('json')->success($this->repository->getList(['uid' => $this->request->uid(),'is_del' => 0], $page, $limit));
+        return app('json')->success($this->repository->getPrice());
     }
     }
 
 
 
 

+ 3 - 0
route/api.php

@@ -210,6 +210,9 @@ Route::group('api/', function () {
             Route::get('award/range_list', 'User/award_range_list');
             Route::get('award/range_list', 'User/award_range_list');
 //            分红积分提现
 //            分红积分提现
             Route::get('award/create', 'User/award_create');
             Route::get('award/create', 'User/award_create');
+//            最新的积分价格
+            Route::get('award/price', 'award/integral_price');
+
         })->prefix('api.user.');
         })->prefix('api.user.');
 
 
         //购物车
         //购物车