|
@@ -26,18 +26,16 @@ class Base
|
|
|
$this->signature = Dever::input('signature');
|
|
|
$this->source_type = Dever::input('source_type');
|
|
|
|
|
|
- if ($this->source_type) {
|
|
|
+ $this->user = Dever::load('passport/user')->data();
|
|
|
+ # 用户信息
|
|
|
+ if (!$this->user && $this->signature) {
|
|
|
+ $uid = Dever::load('passport/applet')->check();
|
|
|
+ $this->user = Dever::db('passport/user')->one($uid);
|
|
|
+ } elseif ($this->source_type) {
|
|
|
$this->user = array();
|
|
|
$this->user['id'] = -1;
|
|
|
$this->user['username'] = '未登录用户';
|
|
|
$this->user['mobile'] = '';
|
|
|
- } else {
|
|
|
- $this->user = Dever::load('passport/user')->data();
|
|
|
- # 用户信息
|
|
|
- if (!$this->user && $this->signature) {
|
|
|
- $uid = Dever::load('passport/applet')->check();
|
|
|
- $this->user = Dever::db('passport/user')->one($uid);
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
|