123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?php
- namespace app\home\controller;
- use app\common\model\RecruitAppointBasicModel;
- use app\home\HomeBaseController;
- class My extends HomeBaseController
- {
- protected function init()
- {
- $this->checkLogin();
- }
- public function index()
- {
- return view();
- }
- public function info()
- {
- $info = RecruitAppointBasicModel::where('user_id', $this->user['id'])->find();
- if (empty($info)) {
- $info = [
- 'realname' => '',
- 'sex' => 1,
- 'birthday' => '',
- 'avatar' => '',
- 'nation' => '',
- 'native_place' => '',
- 'political_affiliation' => '',
- 'titles' => '',
- 'work' => '',
- 'house_register' => '',
- 'join_time' => '',
- 'edu_type' => '',
- 'education' => '',
- 'school' => '',
- 'degree' => '',
- 'pro' => '',
- 'province' => '',
- 'city' => '',
- 'area' => '',
- 'address' => '',
- 'card' => '',
- 'mobile' => '',
- 'email' => '',
- 'concat_name' => '',
- 'concat_mobile' => '',
- 'resume' => '',
- 'family' => [
- [
- 'relation' => '',
- 'realname' => '',
- 'birthday' => '',
- 'political_affiliation' => '',
- 'work' => '',
- ],
- ],
- 'is_push' => 1,
- ];
- }
- return view('', ['info' => json_encode($info)]);
- }
- public function infoPost()
- {
- $basic = RecruitAppointBasicModel::where('user_id',$this->user['id'])->find();
- $data = input('post.');
- if ($basic) {
- //更新基础信息
- unset($data['create_time'],$data['update_time']);
- RecruitAppointBasicModel::where('user_id', $this->user['id'])->update($data);
- } else {
- //新增基础信息
- $data['user_id'] = $this->user['id'];
- RecruitAppointBasicModel::create($data);
- }
- ajax_return(0,'个人基础信息保存成功,快去报名吧!');
- }
- public function account()
- {
- return view();
- }
- public function tip()
- {
- return view();
- }
- public function feedback()
- {
- return view();
- }
- }
|