Authored by whb

tools

... ... @@ -32,6 +32,7 @@ class ToolsController extends WebAction
{
//频道=>key
$channels = array(
'导航' => CacheConfig::KEY_WEB_HOME_NAVBAR_DATA,
'男生首页'=> CacheConfig::KEY_WEB_HOME_CHANNEL_DATA.'_'.HomeModel::CODE_BOYS_CHANNEL,
'女生首页'=> CacheConfig::KEY_WEB_HOME_CHANNEL_DATA.'_'.HomeModel::CODE_GIRLS_CHANNEL,
'kids首页'=> CacheConfig::KEY_WEB_HOME_CHANNEL_DATA.'_'.HomeModel::CODE_KIDS_CHANNEL,
... ... @@ -54,8 +55,15 @@ class ToolsController extends WebAction
{
$key = $this->get('key');
if(!empty($key)) {
AuthCode::decode($key, 'yohobuy');
$key = AuthCode::decode($key, 'yohobuy');
if(!empty($key)) {
//导航清除
if($key == CacheConfig::KEY_WEB_HOME_NAVBAR_DATA) {
$list = array(HomeModel::COOKIE_NAME_BOYS, HomeModel::COOKIE_NAME_GIRLS, HomeModel::COOKIE_NAME_KIDS, HomeModel::COOKIE_NAME_LIFESTYLE);
foreach ($list as $val) {
Cache::delete($key.'_'.$val);
}
}
Cache::delete($key);
echo '清除成功';
}
... ...