Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
纵之格
ShopXO
提交
3961ee52
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,发现更多精彩内容 >>
提交
3961ee52
编写于
11月 14, 2018
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化
上级
04c0ecf2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
69 addition
and
4 deletion
+69
-4
service/Application/Home/View/Default/Article/Index.html
service/Application/Home/View/Default/Article/Index.html
+1
-1
service/Application/Service/OrderService.class.php
service/Application/Service/OrderService.class.php
+52
-0
service/Public/Common/Css/Common.css
service/Public/Common/Css/Common.css
+13
-0
service/Public/Common/Images/am-icon-alipay.png
service/Public/Common/Images/am-icon-alipay.png
+0
-0
service/Public/Home/Default/Css/Common.css
service/Public/Home/Default/Css/Common.css
+3
-3
未找到文件。
service/Application/Home/View/Default/Article/Index.html
浏览文件 @
3961ee52
...
...
@@ -27,7 +27,7 @@
<div
class=
"am-article"
>
{{$article.content}}
</div>
</div>
<!--
右
侧内容 -->
<!--
左
侧内容 -->
<div
class=
"am-u-md-2 am-u-md-pull-10 article-sidebar"
>
<div
class=
"am-offcanvas"
id=
"article-nav-sidebar"
>
<div
class=
"am-offcanvas-bar am-offcanvas-bar-overlay"
>
...
...
service/Application/Service/OrderService.class.php
浏览文件 @
3961ee52
...
...
@@ -853,6 +853,15 @@ class OrderService
return
DataReturn
(
$ret
[
'msg'
],
-
10
);
}
// 订单商品销量增加
$ret
=
self
::
GoodsSalesCountInc
([
'order_id'
=>
$order
[
'id'
]]);
if
(
$ret
[
'status'
]
!=
0
)
{
// 事务回滚
$m
->
rollback
();
return
DataReturn
(
$ret
[
'msg'
],
-
10
);
}
// 用户消息
MessageService
::
MessageAdd
(
$order
[
'user_id'
],
'订单收货'
,
'订单收货成功'
,
1
,
$order
[
'id'
]);
...
...
@@ -1301,5 +1310,48 @@ class OrderService
return
DataReturn
(
'没有需要操作的数据'
,
0
);
}
/**
* 订单商品销量添加
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-11-14
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
GoodsSalesCountInc
(
$params
=
[])
{
// 请求参数
$p
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'order_id'
,
'error_msg'
=>
'订单id有误'
,
]
];
$ret
=
params_checked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
// 获取订单商品
$order_detail
=
M
(
'OrderDetail'
)
->
field
(
'goods_id,buy_number'
)
->
where
([
'order_id'
=>
$params
[
'order_id'
]])
->
select
();
if
(
!
empty
(
$order_detail
))
{
$goods_m
=
M
(
'Goods'
);
foreach
(
$order_detail
as
$v
)
{
if
(
!
$goods_m
->
where
([
'id'
=>
$v
[
'goods_id'
]])
->
setInc
(
'sales_count'
,
$v
[
'buy_number'
]))
{
return
DataReturn
(
'订单商品销量增加失败['
.
$params
[
'order_id'
]
.
'-'
.
$v
[
'goods_id'
]
.
']'
,
-
10
);
}
}
return
DataReturn
(
'操作成功'
,
0
);
}
else
{
return
DataReturn
(
'订单有误,没有找到相关商品'
,
-
100
);
}
}
}
?>
\ No newline at end of file
service/Public/Common/Css/Common.css
浏览文件 @
3961ee52
...
...
@@ -158,4 +158,17 @@ button.colorpicker-submit:active {
}
button
.colorpicker-submit
img
{
margin-right
:
10px
;
}
/**
* 自定义icon
*/
.am-icon-alipay
{
background-image
:
url('../Images/am-icon-alipay.png')
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
-moz-background-size
:
100%
100%
;
width
:
15px
;
height
:
15px
;
vertical-align
:
middle
;
}
\ No newline at end of file
service/Public/Common/Images/am-icon-alipay.png
0 → 100644
浏览文件 @
3961ee52
2.1 KB
service/Public/Home/Default/Css/Common.css
浏览文件 @
3961ee52
...
...
@@ -83,9 +83,9 @@ color: #555555;background:none;border-color:transparent;cursor: default;}
/*搜索框*/
.search-bar
{
height
:
36px
;
width
:
calc
(
100%
-
103px
);
display
:
-webkit-inline-box
;}
.search-bar
form
{
border
:
2px
solid
#d2364c
;
width
:
100%
;}
.search-bar
input
{
height
:
32px
;
width
:
7
8
%
;
outline
:
none
;
font-size
:
12px
;
border
:
none
}
.search-bar
input
{
height
:
32px
;
width
:
7
2
%
;
outline
:
none
;
font-size
:
12px
;
border
:
none
}
#search-input
{
padding-left
:
8px
;
}
#ai-topsearch
{
width
:
2
0
%
;
height
:
32px
;
border
:
none
;
float
:
right
;
background
:
#d2364c
none
repeat
scroll
0%
0%
;
#ai-topsearch
{
width
:
2
7
%
;
height
:
32px
;
border
:
none
;
float
:
right
;
background
:
#d2364c
none
repeat
scroll
0%
0%
;
color
:
#F5F5F2
;
font-size
:
14px
;
cursor
:
pointer
;
border-radius
:
0px
0px
;
}
.search-hot-keywords
{
margin-top
:
5px
;
height
:
16px
;
overflow
:
hidden
;
display
:
none
;
}
.search-hot-keywords
li
{
float
:
left
;
}
...
...
@@ -137,7 +137,7 @@ color: #F5F5F2;font-size: 14px;cursor:pointer;border-radius:0px 0px; }
.classified
{
display
:
none
;}
.mobile-navigation
{
display
:
none
;}
.nav-search
{
position
:
relative
;
top
:
0px
;
z-index
:
0
;
margin-bottom
:
5px
;
margin-top
:
5px
;}
#ai-topsearch
{
font-size
:
14px
;
height
:
36px
;
line-height
:
22px
;
font-weight
:
500
;
}
#ai-topsearch
{
font-size
:
14px
;
height
:
36px
;
line-height
:
22px
;
font-weight
:
500
;
width
:
20%
;
}
/*底部*/
.am-footer
{
text-align
:
center
;
display
:
block
;
position
:
relative
;
margin
:
0px
auto
;
padding
:
7px
0px
9px
;
margin-top
:
20px
;}
.am-footer
.footer-bd
p
,
.footer
.footer-hd
p
{
margin-bottom
:
8px
;
line-height
:
27px
;
border-bottom
:
1px
solid
#DDD
;
text-align
:
left
;}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录