Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
15a6592c
ShopXO
项目概览
jamesyang1999
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
15a6592c
编写于
4月 27, 2019
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
会员等级
上级
e323d0fb
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
66 addition
and
30 deletion
+66
-30
application/plugins/membershiplevel/Hook.php
application/plugins/membershiplevel/Hook.php
+38
-0
application/plugins/membershiplevel/config.json
application/plugins/membershiplevel/config.json
+3
-0
application/tags.php
application/tags.php
+1
-0
public/static/index/default/css/common.css
public/static/index/default/css/common.css
+3
-3
public/static/index/default/css/goods.css
public/static/index/default/css/goods.css
+19
-25
public/static/plugins/css/membershiplevel/style.css
public/static/plugins/css/membershiplevel/style.css
+2
-2
未找到文件。
application/plugins/membershiplevel/Hook.php
浏览文件 @
15a6592c
...
...
@@ -68,6 +68,11 @@ class Hook extends Controller
case
'plugins_service_goods_spec_base'
:
$this
->
GoodsSpecBase
(
$params
[
'spec_base'
]);
break
;
// 满减优惠
case
'plugins_service_buy_handle'
:
$ret
=
$this
->
FullReductionCalculate
(
$params
);
break
;
}
return
$ret
;
}
else
{
...
...
@@ -75,6 +80,39 @@ class Hook extends Controller
}
}
/**
* 满减计算
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-03-21
* @desc description
* @param [array] $params [输入参数]
*/
public
function
FullReductionCalculate
(
$params
=
[])
{
// 用户等级
$level
=
Service
::
UserLevelMatching
();
if
(
!
empty
(
$level
)
&&
$level
[
'order_price'
]
>
0
&&
$level
[
'full_reduction_price'
]
>
0
&&
$params
[
'data'
][
'base'
][
'total_price'
]
>=
$level
[
'order_price'
])
{
// 扩展展示数据
$show_name
=
$level
[
'name'
]
.
'-满减'
;
$params
[
'data'
][
'extension_data'
][]
=
[
'name'
=>
$show_name
,
'price'
=>
$level
[
'full_reduction_price'
],
'type'
=>
1
,
'tips'
=>
'-¥'
.
$level
[
'full_reduction_price'
]
.
'元'
,
];
// 金额
$params
[
'data'
][
'base'
][
'preferential_price'
]
+=
$level
[
'full_reduction_price'
];
$params
[
'data'
][
'base'
][
'actual_price'
]
-=
$level
[
'full_reduction_price'
];
return
DataReturn
(
'处理成功'
,
0
);
}
return
DataReturn
(
'无需处理'
,
0
);
}
/**
* 商品处理结束钩子
* @author Devil
...
...
application/plugins/membershiplevel/config.json
浏览文件 @
15a6592c
...
...
@@ -29,6 +29,9 @@
],
"plugins_service_goods_spec_base"
:[
"app
\\
plugins
\\
membershiplevel
\\
Hook"
],
"plugins_service_buy_handle"
:[
"app
\\
plugins
\\
membershiplevel
\\
Hook"
]
}
}
\ No newline at end of file
application/tags.php
浏览文件 @
15a6592c
...
...
@@ -113,6 +113,7 @@ return array (
array
(
0
=>
'app\\plugins\\freightfee\\Hook'
,
1
=>
'app\\plugins\\newuserreduction\\Hook'
,
2
=>
'app\\plugins\\membershiplevel\\Hook'
,
),
'plugins_view_goods_detail_title'
=>
array
(
...
...
public/static/index/default/css/common.css
浏览文件 @
15a6592c
...
...
@@ -66,12 +66,12 @@ input.add,input.min{width:15px}
color
:
#555555
;
background
:
none
;
border-color
:
transparent
;
cursor
:
default
;}
.am-nav-tabs
>
li
{
border-bottom
:
2px
solid
transparent
;}
.am-nav-tabs
>
li
.am-active
{
border-bottom
:
2px
solid
#d2364c
;}
.am-tabs-nav
li
{
height
:
36px
;
font-size
:
1
6
px
;
line-height
:
36px
;}
.am-tabs-nav
li
{
height
:
36px
;
font-size
:
1
4
px
;
line-height
:
36px
;}
.am-tabs-nav
li
a
,
.am-tabs-nav
li
.am-active
a
,
.am-tabs-nav
li
{
cursor
:
pointer
;}
/*选项卡样式*/
.am-nav-tabs
>
li
.am-active
span
{
color
:
#E4393C
;
font-size
:
16px
;}
.am-nav-tabs
>
li
span
{
font-size
:
16px
;
font-weight
:
500
;}
.am-nav-tabs
>
li
span
{
font-size
:
14px
;
font-weight
:
500
;}
.am-nav-tabs
>
li
.am-active
span
{
color
:
#E4393C
;}
/* 商品分类 */
#goods-category
{
position
:
relative
;
top
:
-45px
;
}
...
...
public/static/index/default/css/goods.css
浏览文件 @
15a6592c
...
...
@@ -129,7 +129,9 @@ fieldset {padding:0px;padding-left:7px;padding-right:7px;padding-bottom:7px;}
fieldset
legend
{
margin-left
:
15px
;
padding-left
:
3px
;
padding-right
:
3px
;
color
:
#333
;}
.introduce-main
.am-nav
>
li
>
a
{
padding
:
4px
0px
;
font-size
:
12px
;}
.introduce-main
.am-nav-tabs
>
li
>
a
{
margin-right
:
0px
;}
.introduce-main
.am-nav-tabs
>
li
{
border-top
:
2px
solid
transparent
;
border-bottom
:
2px
solid
transparent
;}
.introduce-main
.am-nav-tabs
>
li
{
border-top
:
2px
solid
#f5f5f5
;}
.introduce-main
.am-nav-tabs
>
li
.am-active
{
border-bottom
:
2px
solid
#F03726
;
}
/*导航固定*/
ul
.am-tabs-nav.am-nav.am-nav-tabs
{
background
:
#F5F5F5
;}
...
...
@@ -144,19 +146,23 @@ ul.am-tabs-nav.am-nav.am-nav-tabs {background: #F5F5F5;}
/*商品详细页*/
/*iteminfo*/
.clearfix-right
{
font-size
:
12px
;}
.tb-detail-hd
h1
{
padding-bottom
:
0.4em
;
line-height
:
1
;
font-size
:
14px
;
font-weight
:
600
;
color
:
#333
;
line-height
:
24px
;}
/*价格*/
.tb-detail-price
{
text-align
:
left
;
position
:
relative
;}
.tb-detail-price
.price
em
{
font-family
:
arial
;}
.iteminfo_price
.sys_item_mktprice
{
text-decoration
:
line-through
;
padding-top
:
7px
;
padding-bottom
:
0px
;}
.tb-detail-price
.price
em
{
font-family
:
arial
;}
.iteminfo_price
.sys_item_mktprice
{
text-decoration
:
line-through
;
padding-top
:
7px
;
padding-bottom
:
0px
;
font-size
:
14px
;
}
.iteminfo_mktprice
{
padding-top
:
10px
;}
.iteminfo_mktprice
em
,
.sys_item_price
{
color
:
#c00
;}
.sys_item_price
{
font-size
:
20px
;}
.tb-detail-price
dd
{
display
:
inline-block
;}
.sys_item_price
{
font-size
:
20px
;}
.tb-detail-price
dd
{
display
:
inline-block
;}
.goods-favor-count
{
color
:
#999
;
}
.iteminfo_parameter
a
:hover
{
text-decoration
:
none
;
color
:
initial
;}
.tm-indcon
.tm-label
,
.tb-detail-price
dt
{
display
:
inline
;
width
:
60px
;
white-space
:
nowrap
;
text-align
:
right
;
color
:
#888
;}
.tb-detail-price
.items
{
display
:
inline-block
;
}
.tb-detail-price
.items
:not
(
:first-child
)
{
margin-left
:
10px
;
}
.tm-indcon
.tm-label
,
.tb-detail-price
dt
{
white-space
:
nowrap
;
color
:
#888
;}
.tb-detail-price
{
background
:
#fcf1e3
url(../images/goods_meta_bg.png)
;
background-size
:
cover
;
-moz-background-size
:
cover
;
background-repeat
:
no-repeat
;
height
:
75px
;
padding
:
10px
;
}
.tb-detail-price
.items
{
display
:
block
;
margin-left
:
0
!important
;}
.tb-detail-price
.items
dt
{
min-width
:
65px
;
float
:
left
;
text-align
:
left
;}
.sys_item_price
{
font-size
:
24px
;
font-weight
:
bold
;
line-height
:
16px
;}
/* 二维码 */
.goods-qrcode
{
position
:
absolute
;
bottom
:
5px
;
right
:
10px
;
cursor
:
pointer
;
color
:
#666
;
width
:
150px
;
text-align
:
right
;}
...
...
@@ -196,6 +202,7 @@ flex: 1 1 0%;line-height: 16px;cursor: pointer;}
.theme-signin
.btn-op.act
.btn
{
width
:
50%
;
float
:
left
;}
.buy-event
.cart-title
{
width
:
100%
;
padding
:
5px
;}
.buy-event
.cart-title
.am-icon-angle-right
{
float
:
right
;}
/*数量*/
.iteminfo_parameter.munber
,
.iteminfo_parameter.freight
{
display
:
none
;}
.iteminfo_parameter.munber
dd
{
margin-left
:
5px
;}
...
...
@@ -213,8 +220,6 @@ color:#F03726;font-size: 14px;text-align: center;border: 0;}
.buy-nav
div
.submit
{
width
:
30%
;
}
.buy-nav
span
{
display
:
inline-block
;
width
:
50%
;
float
:
left
;
;
cursor
:
pointer
;
border-top
:
1px
solid
#f5f5f5
;
border-left
:
1px
solid
#f5f5f5
;}
.tb-detail-hd
h1
{
padding-bottom
:
0.4em
;
line-height
:
1
;
font-size
:
14px
;
font-weight
:
600
;
color
:
#333
;
line-height
:
24px
;}
li
.am-active
hr
{
border-top
:
1px
solid
#f00
;}
/*搭配*/
...
...
@@ -325,7 +330,6 @@ li.am-comment{ width:100%}
.like_list
.plus_icon
i
.am-icon-angle-right
{
display
:
none
;}
.theme-signin-left
{
float
:
none
;
padding-bottom
:
0
;
margin
:
0
;}
.iteminfo_mktprice
{
padding-top
:
10px
;}
.iteminfo_parameter
{
padding-left
:
50px
;}
.tb-detail-hd
,
.tb-detail-price
{
text-align
:
left
;}
.tb-detail-hd
h1
{
font-size
:
16px
;}
...
...
@@ -373,17 +377,6 @@ li.am-comment{ width:100%}
div
.zoomDiv
{
z-index
:
999
;
position
:
absolute
;
top
:
0px
;
left
:
0px
;
width
:
400px
;
height
:
400px
;
background
:
#ffffff
;
border
:
1px
solid
#CCCCCC
;
display
:
none
;
text-align
:
center
;
overflow
:
hidden
;
}
div
.zoomDiv
img
{
min-width
:
1000px
;
display
:
block
;
}
div
.zoomMask
{
position
:
absolute
;
background
:
url(../images/mask.png)
repeat
scroll
0
0
rgba
(
210
,
54
,
76
,
0.42
);
cursor
:
move
;
z-index
:
1
;
}
/*价格*/
.tb-detail-hd
h1
{
font-size
:
18px
;}
.tb-detail-price
{
height
:
75px
;
padding
:
10px
;
}
/*.tb-detail-price{background: #F7F7F7 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAggAAADGCAMAAACAX4i8AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEhQTFRF7Ovr5+fn8vHx7e3t6ejo8/Ly5uXl7u3t6unp5+bm6urq9PT09fX18fDw9PPz7u7u8fHx8/Pz7ezs5eTk7+7u8O/v9vX16enpNd0tWQAABxVJREFUeNrs3GFy2zgMBWBomWyiNNt0s459/5vW3jZNHNsSJYEAHvh0AP/AfAM+DEjLsOC7e3iL+v21P37f/lH8xV2RFt/hP8Pv77tD7SeJHOyf/9WU8FY6crAEQngHp57wI3ZPCOtgAQQEB/v997fIEuI6qIeA4WD/rNoTlE+HwA6qIYA4OJ0OYXtCZAe1EHAcxE2MoR1UQgByoD5FvnbhoA4CloNjTwh4OgR3UAUBzIH2FKlyOkR3UAMBz0G8KTK8gwoIiA72z99DJcb4DuYhQDoIlhgBHMxCQHWwf75/i9ITEBzMQYB1EGjvAOFgBgKygyiJEcPBNARsB8fEGGCKBHEwCQHcQYibKigOpiDgO/DfO8A4mICQwIF7T8BxcBtCDgf7vefeAcjBTQhZHHjeVEFycAtCGgeOUySUgxsQMjnw2jtgObgOIZUDp8QI5uAqhGwOPPYOaA6uQUjnwOGmCpyDKxAyOrBOjHgOLiHkdGC7dwB0cAEhqQPTxIjo4CuEvA7s9g6QDr5ASOzA7KYKpoNzCLkd2CRGUAdnELI7sNg7oDr4DCG9A4OeAOvgE4QeHLROjLgOPiB04aDxFAns4A+EXhy0fCGL7OAdQjcOGu4doB38htCTg1aJEdvBLwh9OWizdwB38D+Ezhw0SYzoDk4Q+nOwf75XniLhHRwhdOhAfe/wBO/gIH060E2M5W5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gerv5dMewehgw1fotNB6GCTBEKgg1x7B6GDjT3hkRDoINHeQeiAPaEJhO4cJEmMQgcKEp4IgQ6S9AShAyZGdQi9OsiQGIUOVD74mypCB0yMuhA6d4CeGIUO1E4H6J4gdMDEqAiBDtBfyAodMDGqQaAD/MQodMDEqASBDjL0BKED7cSIOTsIHXCK1IBAB83/mRMCAh1kmSKFDpgYN0OggzwvZIUOmBg3QqCDTHsHoQMmxk0Q6CBXYhQ64N5hAwQ6yNYThA64d1gNgQ7yTZFCB9w7rIRABxmnSKEDJsZVEOggZ2IUOmBiXAGBDrK+kBU6YGJcDIEO8iZGoQPuHRZCoIPMiVHogDdVFkGgg9yJUeiAiXEBBDrInhiFDtgTqiHQQf69g9ABp8hKCHTQw95B6IBTZBUEOugjMQodcIqsgEAHvSRGoQPuHWYh0EE/iVHogIlxBgId9JQYhQ7YEyYh0EFfewehA06RExDowCYnRIdAB91NkUIHTIy3INBBh4lR6ICJ8ToEOujyporQARPjNQh00GliFDrg3uESAh10mxiFDjhFfoVABx33BKEDJsZzCHTQdWIUOmBP+AyBDjpPjEIHTIwfEOig+5sqQgfcO7xDoAMmxhMEOuAUeTj8FGAACqmqUagiyncAAAAASUVORK5CYII=); }*/
.tb-detail-price
{
background
:
#fcf1e3
url(../images/goods_meta_bg.png)
;
background-size
:
cover
;
-moz-background-size
:
cover
;
background-repeat
:
no-repeat
;
}
.tb-detail-price
.items
{
display
:
block
;
margin-left
:
0
!important
;}
.tb-detail-price
.items
dt
{
width
:
70px
;
float
:
left
;
text-align
:
left
;}
.sys_item_price
{
font-size
:
24px
;
font-weight
:
bold
;
line-height
:
16px
;}
.sys_item_mktprice
{
font-size
:
14px
;}
/*规格*/
.theme-popover
{
display
:
block
;
position
:
static
;
border
:
none
;
box-shadow
:
none
;
width
:
100%
;}
...
...
@@ -402,7 +395,6 @@ li.am-comment{ width:100%}
.freight
{
width
:
400px
;
float
:
left
;}
.iteminfo_parameter.freight
dt
{
padding-top
:
6px
;
padding-bottom
:
0px
;}
/*介绍*/
.introduce-main
{
width
:
80%
;
float
:
left
;
background
:
#fff
;}
.browse
{
display
:
block
;
float
:
left
;
width
:
20%
;}
...
...
@@ -414,7 +406,8 @@ li.am-comment{ width:100%}
.browse
li
.p-price
strong
{
color
:
#E4393C
;
font-weight
:
600
;}
/*导航固定*/
ul
.am-tabs-nav.am-nav.am-nav-tabs
{
left
:
20%
;
max-width
:
960px
;
margin-right
:
0px
;
margin-left
:
0px
;}
.am-nav-tabs
>
li
.am-active
{
border-top
:
2px
solid
#F03726
;
border-bottom
:
none
;}
.introduce-main
.am-nav-tabs
>
li
.am-active
{
border-bottom
:
none
;}
.introduce-main
.am-nav-tabs
>
li
.am-active
{
border-top
:
2px
solid
#F03726
;}
/*评论*/
.tb-r-filter-bar
{
border
:
1px
solid
#F5F5F5
;
background-color
:
#FAFAFA
;}
...
...
@@ -450,7 +443,8 @@ li.am-comment{ width:100%}
/* 手机模式下 */
@media
only
screen
and
(
max-width
:
640px
)
{
.goods-detail
{
padding
:
0px
;
}
.detail-title
,
.tb-detail-price
,
.detail-attr
{
padding
:
0px
5px
;
}
.detail-title
,
.detail-attr
{
padding
:
0px
5px
;
}
.tb-detail-price
{
padding
:
10px
5px
;
}
.buy-nav
.buy-nav-opt
{
width
:
40%
;
}
ul
.tm-ind-panel
li
{
border-left
:
0px
;
}
ul
.tm-ind-panel
li
:first-child
{
text-align
:
left
;
}
...
...
public/static/plugins/css/membershiplevel/style.css
浏览文件 @
15a6592c
.plugins-membershiplevel-goods-price-icon
{
padding
:
3px
5px
;
background
:
#f
fc31e
;
color
:
#
fff
;
background
:
#f
ee85c
;
color
:
#
d19432
;
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录