Kirin 4 anni fa
parent
commit
009e10712e
2 ha cambiato i file con 21 aggiunte e 0 eliminazioni
  1. 20 0
      app/api/controller/mining/MiningController.php
  2. 1 0
      route/api/route.php

+ 20 - 0
app/api/controller/mining/MiningController.php

@@ -186,4 +186,24 @@ class MiningController
             'list' => UserMining::getList($where)
         ]);
     }
+
+
+//    public function spread_mining_get(Request $request)
+//    {
+//        $where = UtilService::getMore([
+//            ['page', 1],
+//            ['limit', 10],
+//            ['type', 'XCH']
+//        ]);
+//        $where['uid'] = $request->uid();
+//
+//        return app('json')->success('ok', [
+//            'all_get' => UserMining::where('get_money_type', $where['type'])->where('uid', $where['uid'])->sum('get_money'),
+//            'all_unlock' => UserMining::where('get_money_type', $where['type'])->where('uid', $where['uid'])->sum('unlock'),
+//            'all_unstand' => UserMining::where('get_money_type', $where['type'])->where('uid', $where['uid'])->sum('unstand'),
+//            'all_lock' => UserMining::where('get_money_type', $where['type'])->where('uid', $where['uid'])->sum('lock_money'),
+//            'stand' => UserMiningMachine::where('get_money_type', $where['type'])->where('uid', $where['uid'])->sum('stand_money'),
+//            'list' => UserMining::getList($where)
+//        ]);
+//    }
 }

+ 1 - 0
route/api/route.php

@@ -60,6 +60,7 @@ Route::group(function () {
     Route::post('mining/:id', 'mining.MiningController/buy')->name('MiningDetail');//算力产品
     Route::get('my_mining', 'mining.MiningController/my')->name('myMingning');//算力产品
     Route::get('my_mining_get', 'mining.MiningController/mining_get')->name('mining_get');//算力收益
+    Route::get('spread_mining_get', 'mining.MiningController/spread_mining_get')->name('spread_mining_get');//邀请算力收益
     //理财
     Route::get('money_manage', 'manege.ManageMoneyController/lst')->name('ManageMoneyList');//理财产品
     Route::get('money_manage/my', 'manege.ManageMoneyController/myList')->name('ManageMoneyMyList');//理财产品