diff --git a/plugins/Common.php b/plugins/Common.php index bfdf5c0..8462f50 100644 --- a/plugins/Common.php +++ b/plugins/Common.php @@ -376,7 +376,14 @@ Class Common { array_merge($map, $tajian_user_map[$cellphone]) : array_push($map, $tajian_user_map[$cellphone]); } - return array_values(array_unique($map)); + $dirs = array_values(array_unique($map)); + + //把自己的默认id插入到最前面,确保在切换目录的时候可选 + if (!in_array($my_id, $dirs)) { + array_unshift($dirs, $my_id); + } + + return $dirs; } public static function getNicknameByDir($dir, $username){ diff --git a/themes/tajian/views/my/switchdir.php b/themes/tajian/views/my/switchdir.php index a5913b4..53967d1 100644 --- a/themes/tajian/views/my/switchdir.php +++ b/themes/tajian/views/my/switchdir.php @@ -32,7 +32,7 @@ eof; } }else { echo <<退出重新登录 +
  • 你还没有子账号,马上创建
  • eof; } ?>