You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
548 B
PHTML

5 years ago
<?php
namespace Sdk\Controller;
use Think\Controller;
class PageBaseController extends Controller
{
public $userId;
public function _initialize()
{
$userToken = I("request.user_token");
if (!$userToken) {
re_msg(11, "参数有误,请重新登入获取!");
}
$this->userId = M("user", "tab_")->where(['user_token' => $userToken])->getField("id");
$this->userToken = $userToken;
if (!$this->userId) {
re_msg(12, $userToken."Token失效");
}
}
}