|
@@ -17,18 +17,21 @@ class Base
|
|
|
$user = new User();
|
|
|
$this->user = $user->data();
|
|
|
|
|
|
+ $config = Dever::db('main/config')->one();
|
|
|
+ if ($config['avatar']) {
|
|
|
+ $this->data['avatar'] = $config['avatar'];
|
|
|
+ } else {
|
|
|
+ $this->data['avatar'] = Dever::config('host', 'main')->assets . 'mobile/images/avatar.jpg';
|
|
|
+ }
|
|
|
+
|
|
|
+ $this->data['avatar'] =
|
|
|
$this->data['config'] = Dever::db('main/config')->one(1);
|
|
|
$this->data['time'] = time();
|
|
|
$this->data['uid'] = -1;
|
|
|
if ($this->user) {
|
|
|
$this->data['uid'] = $this->user['id'];
|
|
|
if (!$this->user['avatar']) {
|
|
|
- $config = Dever::db('main/config-one');
|
|
|
- if ($config['avatar']) {
|
|
|
- $this->user['avatar'] = $config['avatar'];
|
|
|
- } else {
|
|
|
- $this->user['avatar'] = Dever::config('host', 'main')->assets . 'mobile/images/avatar.jpg';
|
|
|
- }
|
|
|
+ $this->user['avatar'] = $this->data['avatar'];
|
|
|
}
|
|
|
|
|
|
$this->user['avatar'] .= '?v=' . time();
|