...
|
...
|
@@ -71,8 +71,16 @@ class AbstractAction extends Controller_Abstract |
|
|
$this->_useSession = false;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
//读取客服开关配置
|
|
|
$customerServiceSwitch = $this->getCustomerServiceSwitch();
|
|
|
$this->_view->assign('customerServiceSwitch', $customerServiceSwitch);
|
|
|
}
|
|
|
|
|
|
//客服配置
|
|
|
protected function getCustomerServiceSwitch() {
|
|
|
return $this->_useSession && empty($this->getCache('customerServiceSwitch')) ? 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409' : '/service/client';
|
|
|
}
|
|
|
/**
|
|
|
* 封装一下获取get参数
|
|
|
*
|
...
|
...
|
@@ -289,6 +297,22 @@ class AbstractAction extends Controller_Abstract |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 直接查询缓存,不对key做任何处理<php与node cache对接>
|
|
|
*
|
|
|
* @param string $key 键名
|
|
|
* @param bool $isMaster 控制是到主服务器取,还是到从服务器取缓存
|
|
|
* @return mixed
|
|
|
*/
|
|
|
protected function getCacheBy($key, $isMaster = true)
|
|
|
{
|
|
|
if ($isMaster) {
|
|
|
return Cache::getBy($key, 'master');
|
|
|
} else {
|
|
|
return Cache::getBy($key, 'slave');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 设置Session
|
|
|
*
|
|
|
* @param string $name 名称
|
...
|
...
|
|