正在显示
3 个修改的文件
包含
13 行增加
和
0 行删除
| @@ -13,9 +13,12 @@ use App\Enums\Common\Code; | @@ -13,9 +13,12 @@ use App\Enums\Common\Code; | ||
| 13 | use App\Http\Controllers\Bside\BaseController; | 13 | use App\Http\Controllers\Bside\BaseController; |
| 14 | use App\Models\HomeCount\Count; | 14 | use App\Models\HomeCount\Count; |
| 15 | use App\Models\HomeCount\MonthCount; | 15 | use App\Models\HomeCount\MonthCount; |
| 16 | +use App\Models\Inquiry\InquiryIP; | ||
| 17 | +use App\Models\Inquiry\InquirySet; | ||
| 16 | use App\Models\News\News; | 18 | use App\Models\News\News; |
| 17 | use App\Models\Product\Category; | 19 | use App\Models\Product\Category; |
| 18 | use App\Models\Product\Product; | 20 | use App\Models\Product\Product; |
| 21 | +use App\Models\Visit\Visit; | ||
| 19 | use Carbon\Carbon; | 22 | use Carbon\Carbon; |
| 20 | 23 | ||
| 21 | class MonthReportController extends BaseController | 24 | class MonthReportController extends BaseController |
| @@ -82,6 +85,9 @@ class MonthReportController extends BaseController | @@ -82,6 +85,9 @@ class MonthReportController extends BaseController | ||
| 82 | $info['news_num_last_7'] = $newsModel->formatQuery( | 85 | $info['news_num_last_7'] = $newsModel->formatQuery( |
| 83 | ['status'=>0,'created_at'=>['between',[now()->subDays(7)->startOfDay()->toDateString(),now()->startOfDay()->toDateString()]] | 86 | ['status'=>0,'created_at'=>['between',[now()->subDays(7)->startOfDay()->toDateString(),now()->startOfDay()->toDateString()]] |
| 84 | ])->count(); | 87 | ])->count(); |
| 88 | + $info['service_duration'] = $this->user['service_duration'];//服务天数 | ||
| 89 | + $info['ip_total'] = (new Visit())->count();//ip总数 | ||
| 90 | + $info['remain_day'] = $this->user['remain_day'];//剩余服务天数 | ||
| 85 | $info['speed'] = round((0.3 + mt_rand()/mt_getrandmax() * (1-0.3)),2); | 91 | $info['speed'] = round((0.3 + mt_rand()/mt_getrandmax() * (1-0.3)),2); |
| 86 | $this->response('success',Code::SUCCESS,$info); | 92 | $this->response('success',Code::SUCCESS,$info); |
| 87 | } | 93 | } |
| @@ -41,6 +41,9 @@ class BaseController extends Controller | @@ -41,6 +41,9 @@ class BaseController extends Controller | ||
| 41 | $this->uid = $info['id']; | 41 | $this->uid = $info['id']; |
| 42 | //参数处理 | 42 | //参数处理 |
| 43 | $this->getParam(); | 43 | $this->getParam(); |
| 44 | + if(!empty($this->user)){ | ||
| 45 | + $this->project = Cache::get('user-'.$this->user['project_id']); | ||
| 46 | + } | ||
| 44 | //日志记录 | 47 | //日志记录 |
| 45 | $this->set_user_log(); | 48 | $this->set_user_log(); |
| 46 | } | 49 | } |
| @@ -173,6 +173,8 @@ class UserLoginLogic | @@ -173,6 +173,8 @@ class UserLoginLogic | ||
| 173 | $info['is_update_language'] = $project['is_update_language']; | 173 | $info['is_update_language'] = $project['is_update_language']; |
| 174 | $info['configuration'] = $project['deploy_build']['configuration']; | 174 | $info['configuration'] = $project['deploy_build']['configuration']; |
| 175 | $info['project_type'] = $project['type']; | 175 | $info['project_type'] = $project['type']; |
| 176 | + $info['service_duration'] = $project['deploy_build']['service_duration']; | ||
| 177 | + $info['remain_day'] = $project['remain_day']; | ||
| 176 | if($info['is_customized'] == 1){ | 178 | if($info['is_customized'] == 1){ |
| 177 | $info['is_visualization'] = json_decode($project['is_visualization']); | 179 | $info['is_visualization'] = json_decode($project['is_visualization']); |
| 178 | } | 180 | } |
| @@ -272,6 +274,8 @@ class UserLoginLogic | @@ -272,6 +274,8 @@ class UserLoginLogic | ||
| 272 | $info['project_type'] = $project['type']; | 274 | $info['project_type'] = $project['type']; |
| 273 | $info['storage_type'] = $project['storage_type']; | 275 | $info['storage_type'] = $project['storage_type']; |
| 274 | $info['project_location'] = $project['project_location']; | 276 | $info['project_location'] = $project['project_location']; |
| 277 | + $info['service_duration'] = $project['deploy_build']['service_duration'] ?? 0; | ||
| 278 | + $info['remain_day'] = $project['remain_day'] ?? 0; | ||
| 275 | if($info['is_customized'] == 1){ | 279 | if($info['is_customized'] == 1){ |
| 276 | $info['is_visualization'] = json_decode($project['is_visualization']); | 280 | $info['is_visualization'] = json_decode($project['is_visualization']); |
| 277 | } | 281 | } |
-
请 注册 或 登录 后发表评论