Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
纵之格
ShopXO
提交
31a895fa
ShopXO
项目概览
纵之格
/
ShopXO
通知
394
Star
16
Fork
11
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
31a895fa
编写于
6月 14, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
细节优化
上级
eac65407
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
13 deletion
+11
-13
application/plugins/membershiplevel/Hook.php
application/plugins/membershiplevel/Hook.php
+5
-7
application/plugins/membershiplevel/service/Service.php
application/plugins/membershiplevel/service/Service.php
+4
-1
application/service/PluginsAdminService.php
application/service/PluginsAdminService.php
+2
-5
未找到文件。
application/plugins/membershiplevel/Hook.php
浏览文件 @
31a895fa
...
...
@@ -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>'
;
...
...
application/plugins/membershiplevel/service/Service.php
浏览文件 @
31a895fa
...
...
@@ -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
:
...
...
application/service/PluginsAdminService.php
浏览文件 @
31a895fa
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录