@@ -102,7 +102,8 @@ class Core
}
if (isset($v['open']) && $v['open'] == 2) {
- $v['user'] = ['name' => '匿名', 'avatar' => 'https://api.dicebear.com/7.x/thumbs/svg?seed=1'];
+ $v['user']['name'] = '匿名';
+ $v['user']['avatar'] = Dever::load(\Puser\Lib\Info::class)->createAvatar('niming');
} else {
$v['user'] = Dever::db('puser/info')->find($v['uid'], ['col' => 'name,avatar']);
@@ -54,6 +54,6 @@ class Info
public function createAvatar($name, $avatar = '')
{
# 默认头像 https://github.com/dicebear/dicebear
- return $avatar ?: 'https://api.dicebear.com/7.x/thumbs/svg?seed=' . urlencode($name);
+ return $avatar ?: 'https://api.dicebear.com/7.x/thumbs/png?seed=' . urlencode($name);