Authored by Rock Zhang

修复skn传值为空时会清除所有浏览记录的bug

Code Review By Rock Zhang
... ... @@ -359,13 +359,19 @@ class UserModel
{
$result = array('code' => 400, 'message' => '出错啦~');
$record = UserData::delRecord($uid, $skn);
do {
if (empty($skn)) {
break;
}
// 处理数据
if ($record && isset($record['code'])) {
$result['code'] = $record['code'];
$result['message'] = $record['message'];
}
$record = UserData::delRecord($uid, $skn);
// 处理数据
if ($record && isset($record['code'])) {
$result['code'] = $record['code'];
$result['message'] = $record['message'];
}
} while (false);
return $result;
}
... ...