From 0c6cee4ece3bd25db7577c28e3240fe049783e63 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 8 Jan 2020 19:53:16 +0800 Subject: [PATCH] 1 --- webapp/controller/RankController.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/webapp/controller/RankController.class.php b/webapp/controller/RankController.class.php index 5d4f79a..e20127d 100644 --- a/webapp/controller/RankController.class.php +++ b/webapp/controller/RankController.class.php @@ -141,16 +141,19 @@ class RankController{ $name = $myname; $avatar_url = $myavatar_url; } else { - /*$address = '../res/robot@robot' . 1 . '.php'; + $name = $myname; + $address = '../res/robot@robot' . 1 . '.php'; $robot_meta_cluster = require($address); $j = Rand(1, 100); $robot_id = 1000 + $j; - $robot_meta = getRobotConfig($robot_meta_cluster, $robot_id);*/ + $robot_meta = getRobotConfig($robot_meta_cluster, $robot_id); $rob = array( 'name' => $robot_meta['name'], 'avatar_url' => 'https://wx.qlogo.cn/mmopen/vi_32/xr8cTwYUP440icRKFobfmBAG5yjiaKLF8CuThOSWsyj2klXXMJlJ7OsrZuH7V7l2XyjmVFwWFCfeZoFtGoRrpTYg/132', ); - $name = $rob['name']; + if($user_db[$i][1] == '') { + $name = $rob['name']; + } $avatar_url = $rob['avatar_url']; } } else {