diff --git a/config/define.php b/config/define.php index 8db6956..78fb636 100644 --- a/config/define.php +++ b/config/define.php @@ -21,8 +21,8 @@ define('CALLBACK_KNOWLEDGE_LOGIN', 'knowledge_login'); - define('WEIXIN_OPEN_APPID','wx1bda8b3d08d169cb'); - define('WEIXIN_OPEN_APPSCRET','48ad19c3a836f6e5c79f68b965bf9e77'); + define('WEIXIN_OPEN_APPID','wxd31fa56cbcd5c650'); + define('WEIXIN_OPEN_APPSCRET','5e6d75001fca1b13788ece389b2bd40d'); 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_PERSONAL_INFORMATION','https://api.weixin.qq.com/sns/userinfo?access_token=%s&openid=%s'); diff --git a/control/callback.php b/control/callback.php index a0dca1e..3f48fbb 100644 --- a/control/callback.php +++ b/control/callback.php @@ -17,6 +17,7 @@ class callback extends publicBase { if (!$res) $this->show_message($obj->getError(), 'goback'); session_start(); + $_SESSION['nickname'] = $res['nickname']; $_SESSION['openid'] = $res['openid']; $_SESSION['token'] = $res['jwttoken']; session_write_close(); diff --git a/model/mManage.php b/model/mManage.php index 329b764..21c88a7 100644 --- a/model/mManage.php +++ b/model/mManage.php @@ -68,6 +68,7 @@ class mManage extends mBase { $data = array(); $data['jwttoken'] = $jwttoken; $data['openid'] = $res['openid']; + $data['nickname'] = $res['nickname']; return $data; } diff --git a/view/2UcNOgLCeM.txt b/view/2UcNOgLCeM.txt deleted file mode 100644 index fb7caec..0000000 --- a/view/2UcNOgLCeM.txt +++ /dev/null @@ -1 +0,0 @@ -8bec5d05184fa430e594cafd50a68020 \ No newline at end of file diff --git a/view/KNix1gprzP.txt b/view/KNix1gprzP.txt new file mode 100644 index 0000000..195e0e4 --- /dev/null +++ b/view/KNix1gprzP.txt @@ -0,0 +1 @@ +202ca7f83350f7987b48c24211077c87 \ No newline at end of file diff --git a/view/MP_verify_gEeTvhQ46JT6iGJS.txt b/view/MP_verify_gEeTvhQ46JT6iGJS.txt deleted file mode 100644 index 32984ba..0000000 --- a/view/MP_verify_gEeTvhQ46JT6iGJS.txt +++ /dev/null @@ -1 +0,0 @@ -gEeTvhQ46JT6iGJS \ No newline at end of file diff --git a/view/templates/index/login.html b/view/templates/index/login.html index 92f46ae..a9f90af 100644 --- a/view/templates/index/login.html +++ b/view/templates/index/login.html @@ -99,9 +99,9 @@