|
@@ -13,6 +13,7 @@ use App\Models\BaseSettingsModel;
|
|
use App\Models\DreamImages;
|
|
use App\Models\DreamImages;
|
|
use App\Models\DreamInfoModel;
|
|
use App\Models\DreamInfoModel;
|
|
use App\Models\SystemInfoModel;
|
|
use App\Models\SystemInfoModel;
|
|
|
|
+use App\Models\UserCareDream;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Request;
|
|
use App\Repositories\Base\Criteria\OrderBy;
|
|
use App\Repositories\Base\Criteria\OrderBy;
|
|
use App\Repositories\Dream\Criteria\MultiWhere;
|
|
use App\Repositories\Dream\Criteria\MultiWhere;
|
|
@@ -138,6 +139,20 @@ class InfoController extends Controller
|
|
if (is_array($data['sign'])) {
|
|
if (is_array($data['sign'])) {
|
|
$data['sign'] = join(',',$data['sign']);
|
|
$data['sign'] = join(',',$data['sign']);
|
|
}
|
|
}
|
|
|
|
+// 后台修改排行参数时,梦想分数也改变
|
|
|
|
+ $dream_id = request('id');
|
|
|
|
+ $data2 = UserCareDream::where('dream_id',$dream_id)->get();
|
|
|
|
+ $care_num = count($data2);
|
|
|
|
+ $setting = BaseSettingsModel::where('category','paihang')->first();
|
|
|
|
+ $a = $setting?$setting->key:1;
|
|
|
|
+ $b = $setting?$setting->value:1;
|
|
|
|
+ $t = 21*3600 / 60;
|
|
|
|
+ \Log::debug($data['end_time'].' care_num:'.$care_num.' a:'.$a.' b:'.$b.' t:'.$t);
|
|
|
|
+ if ($care_num == 0) {
|
|
|
|
+ $data['score'] = (($a/$t) + $b)*100000000 ;
|
|
|
|
+ }else{
|
|
|
|
+ $data['score'] = (log($care_num) + ($a/$t) + $b)*100000000 ;
|
|
|
|
+ }
|
|
$pics = (array) request('pic');
|
|
$pics = (array) request('pic');
|
|
if (empty($pics)) {
|
|
if (empty($pics)) {
|
|
$url[] = array('url'=>U( 'Dream/Info/index'),'title'=>'返回列表');
|
|
$url[] = array('url'=>U( 'Dream/Info/index'),'title'=>'返回列表');
|