提交 31a895fa 编写于 作者: D devil_gong

细节优化

上级 eac65407
......@@ -58,7 +58,10 @@ class Hook extends Controller
// 商品数据处理后
case 'plugins_service_goods_handle_end' :
$this->GoodsHandleEnd($params['goods']);
if($module_name != 'admin')
{
$this->GoodsHandleEnd($params['goods']);
}
break;
// 商品规格基础数据
......@@ -156,12 +159,7 @@ class Hook extends Controller
// 无价格字段则不处理
if(isset($goods['price']))
{
if(empty($goods['original_price']))
{
$goods['original_price'] = $goods['price'];
}
// 价格处理
$goods['original_price'] = $goods['price'];
$goods['price'] = Service::PriceCalculate($goods['price'], $level['discount_rate'], 0);
$price_title = empty($level['name']) ? '会员价' : $level['name'];
$goods['show_field_price_text'] = '<span class="plugins-membershiplevel-goods-price-icon" title="'.$price_title.'">'.$price_title.'</span>';
......
......@@ -395,9 +395,12 @@ class Service
$base = PluginsService::PluginsData('membershiplevel', Service::$base_config_attachment_field);
if(!empty($base['data']['level_list']))
{
// 规则
$level_rules = isset($base['data']['level_rules']) ? $base['data']['level_rules'] : 0;
// 匹配类型
$value = 0;
switch($base['data']['level_rules'])
switch($level_rules)
{
// 积分(可用积分)
case 0 :
......
......@@ -1001,9 +1001,6 @@ php;
}
}
// 去除包名
$file = substr($file, strpos($file, '/')+1);
// 排除临时文件和临时目录
if(strpos($file, '/.') === false && strpos($file, '__') === false)
{
......@@ -1013,7 +1010,7 @@ php;
{
if(strpos($file, $dir_key) !== false)
{
$file = str_replace($dir_key.'/', '', $dir_value.$file);
$file = str_replace($plugins_name.'/'.$dir_key.'/', '', $dir_value.$file);
$is_has_find = true;
break;
}
......@@ -1027,7 +1024,7 @@ php;
// 截取文件路径
$file_path = substr($file, 0, strrpos($file, '/'));
// 路径不存在则创建
\base\FileUtil::CreateDir($file_path);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册