Authored by 周少峰

Merge branch 'feature/customerServiceSwitch'

... ... @@ -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 名称
... ...
... ... @@ -83,12 +83,21 @@ class WebAction extends Controller_Abstract
break;
}
//读取客服开关配置
$customerServiceSwitch = $this->getCustomerServiceSwitch();
$this->_view->assign('customerServiceSwitch', $customerServiceSwitch);
//自动登录
if (!$isAjax) {
$this->autoLogin();
}
}
//客服配置
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';
}
/**
* 自动登录
*/
... ...
... ... @@ -14,7 +14,7 @@
<div class="return-prompt">
换货须知:<br>
<p>自您签收商品7日内可以退货,15日内可以换货,在商品不影响二次销售的情况下(包括产品吊牌和外包装),YOHO!有货将为您办理退换货服务,请在网站提交"退换货"申请。<span>特别提醒:非质量问题的退换货,来回运费由您承担。寄回商品时需垫付运费,到付件无法签收。</span>换货后VIP积分累计时间重新计算,以您收到换货订单后15个工作日累加,如有疑问,请联系 <a
href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info=" target="_blank"><i class="icon-onlineservice"></i> 在线客服</a></p>
href="{{@root.customerServiceSwitch}}" target="_blank"><i class="icon-onlineservice"></i> 在线客服</a></p>
{{# tips}}
{{> home/return-tips}}
{{/ tips}}
... ... @@ -148,7 +148,7 @@
<div class="return-prompt">
退货须知:<br>
<p>自您签收商品7日内可以退货,15日内可以换货,在商品不影响二次销售的情况下(包括产品吊牌和外包装),YOHO!有货将为您办理退换货服务,请在网站提交"退换货"申请。如您退货之后无法满足购买时参加的活动条件,请您将赠品同时申请退货。<span>特别提醒:非质量问题的退换货,来回运费由您承担,寄回商品时需垫付运费,到付件无法签收,如有疑问,请联系 <a
href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info=" target="_blank"><i class="icon-onlineservice"></i> 在线客服</a> </span></p>
href="{{@root.customerServiceSwitch}}" target="_blank"><i class="icon-onlineservice"></i> 在线客服</a> </span></p>
{{# tips}}
{{> home/returns-tips}}
{{/ tips}}
... ...
... ... @@ -22,7 +22,7 @@
<input type="submit" class="search-btn">
</label>
<span>或者</span>
<a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409" target="_blank" class="yoho-im-btn"></a>
<a href="{{@root.customerServiceSwitch}}" target="_blank" class="yoho-im-btn"></a>
</form>
</div>
<h2>所有问题一览</h2>
... ...
... ... @@ -189,7 +189,7 @@
</div>
<div class="left">
<span class="iconfont rgbf">&#xe63b;</span>
<a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&amp;configID=149091&amp;jid=8732423409" target="_blank">
<a href="{{@root.customerServiceSwitch}}" target="_blank">
<span class="red">便捷</span>
<span class="rgbf">在线客服</span>
</a>
... ...
{
"name": "web-yohobuy",
"version": "5.3.0",
"version": "5.3.1",
"description": "web yohobuy static",
"keywords": [],
"homepage": "",
... ...
... ... @@ -250,6 +250,18 @@ class ToolsController extends WebAction
echo 'skn不正确';
}
}
public function secretSwitchAction()
{
$val = intval($this->get('enabled', -1));
echo $val;
if ($val === -1) {
return false;
}
Cache::set('customerServiceSwitch', $val === 1, 0);
var_dump(Cache::get('customerServiceSwitch'));
}
}
?>
\ No newline at end of file
... ...
... ... @@ -9,6 +9,7 @@ use Configs\ChannelConfig;
use WebPlugin\Helpers;
use WebPlugin\Images;
use LibModels\Web\Home\MessageData;
use WebPlugin\Cache;
/**
* 个人中心-用户相关业务逻辑处理
... ... @@ -43,6 +44,9 @@ class UserModel
return $retNav;
}
public static function getCustomerServiceSwitch() {
return USE_CACHE && empty(Cache::get('customerServiceSwitch')) ? 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409' : '/service/client';
}
/**
* 个人中心-左侧导航
* @param string $activeName 当前选中导航的名称
... ... @@ -106,7 +110,7 @@ class UserModel
),
array(
'name' => '在线客服',
'href' => 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info=',
'href' => self::getCustomerServiceSwitch(),
'isBlank'=>true
)
)
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "5.3.0"
application.version = "5.3.1"
; 网站SEO信息
application.seo.title = "YOHO!BUY 有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "5.3.0"
application.version = "5.3.1"
; 网站SEO信息
application.seo.title = "YOHO!BUY 有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "5.3.0"
application.version = "5.3.1"
; 网站SEO信息
application.seo.title = "YOHO!BUY 有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "5.3.0"
application.version = "5.3.1"
; 网站SEO信息
application.seo.title = "YOHO!BUY 有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...