|
|
|
|
@ -7,24 +7,17 @@ class Index extends CI_Controller {
|
|
|
|
|
public function __construct() {
|
|
|
|
|
parent::__construct();
|
|
|
|
|
$this->load->model('ding_value_model');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function test_cookie(){
|
|
|
|
|
//https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoagxeeheunc0p95eu8&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://www.mycht.cn/webht.php/apps/dingmail/index/test_cookie
|
|
|
|
|
|
|
|
|
|
$this->load->helper('cookie');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function index($unionid = null,$type = null){
|
|
|
|
|
if($this->session->userdata('dingding_user_info') === false){
|
|
|
|
|
$this->session->set_userdata('unionid', $unionid);
|
|
|
|
|
$this->session->set_userdata('type',$type);
|
|
|
|
|
$this->load->view('login');
|
|
|
|
|
if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){
|
|
|
|
|
redirect('http://www.mycht.cn/webht.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/');
|
|
|
|
|
}else{
|
|
|
|
|
if($unionid != null && $type != null){
|
|
|
|
|
$user_info = $this->session->userdata('dingding_user_info');
|
|
|
|
|
$data['type'] = $type;
|
|
|
|
|
$data['user'] = $user_info->ddu_Name;
|
|
|
|
|
$data['user_unionid'] = $user_info->ddu_Unionid;
|
|
|
|
|
$data['user'] = get_cookie('dingname');
|
|
|
|
|
$data['user_unionid'] = get_cookie('dingunionid');
|
|
|
|
|
if($this->ding_value_model->get_dingding_user($unionid) == null){
|
|
|
|
|
echo '该用户还未登录过,请告知他登录后才能对他点赞或拍砖!<br>';
|
|
|
|
|
echo '有问题请联系:CYC!';
|
|
|
|
|
@ -73,12 +66,10 @@ class Index extends CI_Controller {
|
|
|
|
|
|
|
|
|
|
//value邮件页面
|
|
|
|
|
public function mail_index(){
|
|
|
|
|
if($this->session->userdata('dingding_user_info') === false){
|
|
|
|
|
$this->load->view('login');
|
|
|
|
|
}else{
|
|
|
|
|
//print_r($this->session->userdata('dingding_user_info'));
|
|
|
|
|
$this->load->view('mail');
|
|
|
|
|
}
|
|
|
|
|
if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){
|
|
|
|
|
redirect('http://www.mycht.cn/webht.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/');
|
|
|
|
|
}
|
|
|
|
|
$this->load->view('mail');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//发送邮件
|
|
|
|
|
@ -397,8 +388,8 @@ class Index extends CI_Controller {
|
|
|
|
|
|
|
|
|
|
//点赞排行榜
|
|
|
|
|
public function rank_person() {
|
|
|
|
|
if($this->session->userdata('dingding_user_info') === false){
|
|
|
|
|
$this->load->view('login');
|
|
|
|
|
if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){
|
|
|
|
|
redirect('http://www.mycht.cn/webht.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/');
|
|
|
|
|
}else{
|
|
|
|
|
$data = array();
|
|
|
|
|
$user_info = $this->session->userdata('dingding_user_info');
|
|
|
|
|
@ -599,7 +590,6 @@ class Index extends CI_Controller {
|
|
|
|
|
|
|
|
|
|
//退出
|
|
|
|
|
public function logout(){
|
|
|
|
|
$this->session->unset_userdata('dingding_user_info');
|
|
|
|
|
$this->session->unset_userdata('unionid');
|
|
|
|
|
$this->session->unset_userdata('type');
|
|
|
|
|
$this->session->unset_userdata('identify');
|
|
|
|
|
|