1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace app\talent\controller;
- use app\common\model\TalentWorkModel;
- use app\talent\TalentBaseController;
- class Index extends TalentBaseController
- {
- public function index()
- {
- $month = date('Y-m');
- $is_register = 'false';
- $work_check = TalentWorkModel::where('month', $month)->where('user_id', $this->user->id)->find();
- if (!empty($work_check)) {
- $is_register = 'true';
- }
- return view('', [
- 'is_register' => $is_register,
- 'month' => $month,
- ]);
- }
- public function listWork()
- {
- $list = TalentWorkModel::where('user_id', $this->user->id)
- ->limit(input('limit', 10))
- ->order('update_time', 'desc')
- ->page(input('page', 1))
- ->select();
- ajax_success($list);
- }
- }
|