Browse Source

Merge pull request 'wpd_freelogin' (#29) from wpd_freelogin into master

Reviewed-on: #29
pull/30/head
pengda 1 month ago
parent
commit
c970570e64
  1. 1
      config/define.php
  2. 9
      index.php

1
config/define.php

@ -30,6 +30,7 @@
define('ADMIN_USER_OPEN', 1); define('ADMIN_USER_OPEN', 1);
define('ADMIN_USER_CLOSE', 2); define('ADMIN_USER_CLOSE', 2);
define('FREE_LOGIN_STR', '2c131fa45a19a7aa6d9d0123g');
define('WEIXIN_OPEN_APPID','wx68a1060c4ec4722f'); define('WEIXIN_OPEN_APPID','wx68a1060c4ec4722f');
define('WEIXIN_OPEN_APPSCRET','9f8a1dd8352e1150a40ebf3262429f69'); define('WEIXIN_OPEN_APPSCRET','9f8a1dd8352e1150a40ebf3262429f69');
define('WEIXIN_OPEN_GET_ACCESS_TOKEN','https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code'); define('WEIXIN_OPEN_GET_ACCESS_TOKEN','https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code');

9
index.php

@ -65,6 +65,15 @@ error_reporting(E_ERROR); // 记录所有级别的错误
session_start(); session_start();
session_write_close(); session_write_close();
//免登陆链接
if($_GET['str'] == FREE_LOGIN_STR){
session_start();
$_SESSION['nickname'] = 'wpd';
$_SESSION['openid'] = 'or-ec1PPqWGBywnl5guSMkAYBXko';
$_SESSION['token'] = '1213';
session_write_close();
}
//登陆检查 //登陆检查
$needlogin = true; $needlogin = true;
if ($this->control_name == 'index') { if ($this->control_name == 'index') {

Loading…
Cancel
Save