Showing
3 changed files
with
13 additions
and
2 deletions
@@ -79,7 +79,7 @@ class AbstractAction extends Controller_Abstract | @@ -79,7 +79,7 @@ class AbstractAction extends Controller_Abstract | ||
79 | 79 | ||
80 | //客服配置 | 80 | //客服配置 |
81 | protected function getCustomerServiceSwitch() { | 81 | protected function getCustomerServiceSwitch() { |
82 | - return $this->_useSession && empty($this->getCacheBy('customerServiceSwitch')) ? 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409' : '/service/client'; | 82 | + return $this->_useSession && empty($this->getCache('customerServiceSwitch')) ? 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409' : '/service/client'; |
83 | } | 83 | } |
84 | /** | 84 | /** |
85 | * 封装一下获取get参数 | 85 | * 封装一下获取get参数 |
@@ -250,6 +250,17 @@ class ToolsController extends WebAction | @@ -250,6 +250,17 @@ class ToolsController extends WebAction | ||
250 | echo 'skn不正确'; | 250 | echo 'skn不正确'; |
251 | } | 251 | } |
252 | } | 252 | } |
253 | + | ||
254 | + public function secretSwitchAction() | ||
255 | + { | ||
256 | + $val = intval($this->get('com.yohobuy.customerservice.enabled', -1)); | ||
257 | + if ($val === -1) { | ||
258 | + return false; | ||
259 | + } | ||
260 | + Cache::set('customerServiceSwitch', $val === 1, 0); | ||
261 | + | ||
262 | + var_dump(Cache::get('customerServiceSwitch')); | ||
263 | + } | ||
253 | } | 264 | } |
254 | 265 | ||
255 | ?> | 266 | ?> |
@@ -45,7 +45,7 @@ class UserModel | @@ -45,7 +45,7 @@ class UserModel | ||
45 | } | 45 | } |
46 | 46 | ||
47 | public static function getCustomerServiceSwitch() { | 47 | public static function getCustomerServiceSwitch() { |
48 | - return USE_CACHE && empty(Cache::getBy('customerServiceSwitch')) ? 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409' : '/service/client'; | 48 | + return USE_CACHE && empty(Cache::get('customerServiceSwitch')) ? 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409' : '/service/client'; |
49 | } | 49 | } |
50 | /** | 50 | /** |
51 | * 个人中心-左侧导航 | 51 | * 个人中心-左侧导航 |
-
Please register or login to post a comment