MODEL('resume'); $resume = $resumeM -> getResumeInfo(array('uid'=>$this->member['uid']),array('logo'=>1,'setname'=>1)); $data = count($resume) ? $resume : array(); $data['resumename'] = !empty($this->config['sy_resumename_num']) ? $this->config['sy_resumename_num'] : 0; $this->render_json(0,'',$data); } /*wxapp保存基本信息*/ function saveinfo_action() { $resumeM = $this -> MODEL('resume'); $resume = $resumeM->getResumeInfo(array('uid'=>$this->member['uid'])); $mData = array( 'mobile' => $_POST['telphone'], 'email' => $_POST['email'], ); $rData = array( 'name' => $_POST['name'], 'sex' => $_POST['sex'], 'birthday' => $_POST['birthday'], 'edu' => $_POST['edu'], 'exp' => $_POST['exp'], 'telphone' => $_POST['telphone'], 'marriage' => $_POST['marriage'], 'height' => $_POST['height'], 'weight' => $_POST['weight'], 'nationality' => $_POST['nationality'], 'domicile' => $_POST['domicile'], 'address' => $_POST['address'], 'homepage' => $_POST['homepage'], 'living' => $_POST['living'], 'email' => $_POST['email'], 'phototype' => $_POST['phototype'], 'nametype' => $_POST['nametype'], 'wxid' => $_POST['wxid'], 'ewmFromWx' => $_FILES['photos'],//二维码 'lastupdate' => time() ); if($this -> config['user_revise_state'] == '0'){ $rData['state'] = 0 ; } if(!$resume['photo'] || ($resume['defphoto']==2 && $rData['sex']!=$resume['sex'])){ $logo = $resumeM->deflogo($rData); if($logo!=''){ $rData['photo'] = $logo; $rData['defphoto'] = 2; $rData['photo_status'] = 1; } } if($this->member['usertype'] == 0){ $userinfoM = $this->MODEL("userinfo"); $userinfoM -> activUser($this->member['uid'],1); } $resumeM = $this->MODEL('resume'); if (isset($_POST['provider'])) { if ($_POST['provider'] == 'wap') { $port = 2; } elseif ($_POST['provider'] == 'baidu' || $_POST['provider'] == 'toutiao' || $_POST['provider'] == 'weixin') { $port = 3; } elseif ($_POST['provider'] == 'app') { $port = 4; } } $return = $resumeM -> upResumeInfo(array('uid'=>$this->member['uid']),array('mData'=>$mData,'rData'=>$rData,'utype'=>'user','source'=>$_POST['source'], 'port' => $port)); $data['error'] = $return['errcode']==9 ? 1 : 2; $this -> render_json($data['error'],$return['msg'],''); } /*wxapp保存头像*/ function savephoto_action() { $resumeM = $this -> MODEL('resume'); $upData = array('utype'=>'user','photo'=>'','source'=>$_POST['source'],'preview'=>1); if (!empty($_POST['source']) && $_POST['source'] == 'wap'){ $upData['base'] = $_POST['uimage']; }else{ $upData['photo'] = $_FILES['photos']; } $return = $resumeM -> upPhoto(array('uid'=>$this->member['uid']), $upData); $data['error'] = $return['errcode']==9 ? 1 : 2; $this -> render_json($data['error'],$return['msg'],$return['picurl']); } }