Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
5de36826
ShopXO
项目概览
jcy2004x
/
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,体验更适合开发者的 AI 搜索 >>
提交
5de36826
编写于
6月 13, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
细节优化
上级
22c37242
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
60 addition
and
19 deletion
+60
-19
application/admin/view/default/goods/index.html
application/admin/view/default/goods/index.html
+3
-0
application/admin/view/default/goods/save_info.html
application/admin/view/default/goods/save_info.html
+4
-0
application/admin/view/default/order/index.html
application/admin/view/default/order/index.html
+6
-0
application/index/view/default/goods/index.html
application/index/view/default/goods/index.html
+4
-1
application/index/view/default/order/detail.html
application/index/view/default/order/detail.html
+9
-4
application/plugins/membershiplevel/Hook.php
application/plugins/membershiplevel/Hook.php
+11
-7
application/service/AppMiniService.php
application/service/AppMiniService.php
+1
-1
application/service/BuyService.php
application/service/BuyService.php
+3
-2
application/service/GoodsService.php
application/service/GoodsService.php
+8
-0
application/service/OrderService.php
application/service/OrderService.php
+1
-0
application/service/PluginsAdminService.php
application/service/PluginsAdminService.php
+6
-0
public/static/index/default/css/goods.css
public/static/index/default/css/goods.css
+2
-4
public/static/upload/images/plugins_distribution/.gitignore
public/static/upload/images/plugins_distribution/.gitignore
+2
-0
未找到文件。
application/admin/view/default/goods/index.html
浏览文件 @
5de36826
...
...
@@ -128,6 +128,9 @@
<dt>
标题名称
</dt>
<dd>
{{$v.title}}
</dd>
<dt>
商品简述
</dt>
<dd>
{{$v.simple_desc}}
</dd>
<dt>
销售价格(元)
</dt>
<dd>
{{$v.price}}
...
...
application/admin/view/default/goods/save_info.html
浏览文件 @
5de36826
...
...
@@ -57,6 +57,10 @@
</span>
</div>
</div>
<div
class=
"am-form-group"
>
<label>
商品简述
</label>
<input
type=
"text"
name=
"simple_desc"
placeholder=
"商品简述"
maxlength=
"60"
data-validation-message=
"商品简述格式 最多60个字符"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.simple_desc}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
商品型号
</label>
<input
type=
"text"
name=
"model"
placeholder=
"商品型号"
maxlength=
"30"
data-validation-message=
"商品型号格式 最多30个字符"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.model}}"
{{/
if
}}
/>
...
...
application/admin/view/default/order/index.html
浏览文件 @
5de36826
...
...
@@ -234,6 +234,12 @@
<a
href=
"{{:MyUrl('index/goods/index', ['id'=>$vs['goods_id']])}}"
target=
"_blank"
title=
"{{$vs.title}}"
{{
if
!
empty
($
vs
['
title_color
'])}}
style=
"color:{{$vs.title_color}};"
{{/
if
}}
>
{{$vs.title}}
</a>
</div>
<div
class=
"other"
>
<span
class=
"fl fs-12"
>
型号:
{{if !empty($vs.model)}}
{{$vs.model}}
{{/if}}
</span>
<span
class=
"fl fs-12"
>
规格:
{{if !empty($vs.spec_text)}}
...
...
application/index/view/default/goods/index.html
浏览文件 @
5de36826
...
...
@@ -107,7 +107,7 @@
<!--规格-->
<!--名称-->
<div
class=
"tb-detail-hd"
>
<h1
class=
"detail-title"
{{
if
!
empty
($
goods.title_color
)}}
style=
"color:{{$goods.title_color}};"
{{/
if
}}
>
<h1
class=
"detail-title
am-margin-bottom-xs
"
{{
if
!
empty
($
goods.title_color
)}}
style=
"color:{{$goods.title_color}};"
{{/
if
}}
>
{{$goods.title}}
<!-- 商品页面基础信息标题里面钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
...
...
@@ -123,6 +123,9 @@
{{/foreach}}
{{/if}}
</h1>
{{if !empty($goods['simple_desc'])}}
<p
class=
"simple-desc am-margin-bottom-xs"
>
{{$goods.simple_desc}}
</p>
{{/if}}
</div>
<div
class=
"tb-detail-list"
>
<!-- 商品页面基础信息顶部钩子 -->
...
...
application/index/view/default/order/detail.html
浏览文件 @
5de36826
...
...
@@ -273,11 +273,16 @@
</a>
<div
class=
"goods-base"
>
<a
href=
"{{$goods.goods_url}}"
target=
"_blank"
class=
"goods-title"
>
{{$goods.title}}
</a>
{{if !empty($goods.spec)}}
{{if !empty($goods.spec)
or !empty($goods['model'])
}}
<ul
class=
"am-margin-top-xs am-text-left goods-attr"
>
{{foreach $goods.spec as $spec}}
<li>
{{$spec.type}}:{{$spec.value}}
</li>
{{/foreach}}
{{if !empty($goods['model'])}}
<li>
型号:{{$goods.model}}
</li>
{{/if}}
{{if !empty($goods.spec)}}
{{foreach $goods.spec as $spec}}
<li>
{{$spec.type}}:{{$spec.value}}
</li>
{{/foreach}}
{{/if}}
</ul>
{{/if}}
</div>
...
...
application/plugins/membershiplevel/Hook.php
浏览文件 @
5de36826
...
...
@@ -153,16 +153,20 @@ class Hook extends Controller
$level
=
Service
::
UserLevelMatching
();
if
(
!
empty
(
$level
)
&&
$level
[
'discount_rate'
]
>
0
)
{
if
(
empty
(
$goods
[
'original_price'
]))
// 无价格字段则不处理
if
(
isset
(
$goods
[
'price'
]))
{
$goods
[
'original_price'
]
=
$goods
[
'price'
];
if
(
empty
(
$goods
[
'original_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>'
;
}
// 价格处理
$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>'
;
// 最低价最高价
if
(
isset
(
$goods
[
'min_price'
]))
{
...
...
application/service/AppMiniService.php
浏览文件 @
5de36826
...
...
@@ -101,7 +101,7 @@ class AppMiniService
public
static
function
Created
(
$params
=
[])
{
// 是否https
if
(
config
(
'shopxo.is_develop'
)
==
fals
e
)
if
(
config
(
'shopxo.is_develop'
)
!==
tru
e
)
{
if
(
__MY_HTTP__
!=
'https'
)
{
...
...
application/service/BuyService.php
浏览文件 @
5de36826
...
...
@@ -181,7 +181,7 @@ class BuyService
$where
=
(
!
empty
(
$params
[
'where'
])
&&
is_array
(
$params
[
'where'
]))
?
$params
[
'where'
]
:
[];
$where
[
'c.user_id'
]
=
$params
[
'user'
][
'id'
];
$field
=
'c.*, g.title, g.images, g.inventory_unit, g.is_shelves, g.is_delete_time, g.buy_min_number, g.buy_max_number'
;
$field
=
'c.*, g.title, g.images, g.inventory_unit, g.is_shelves, g.is_delete_time, g.buy_min_number, g.buy_max_number
, g.model
'
;
$data
=
Db
::
name
(
'Cart'
)
->
alias
(
'c'
)
->
join
([
'__GOODS__'
=>
'g'
],
'g.id=c.goods_id'
)
->
where
(
$where
)
->
field
(
$field
)
->
select
();
...
...
@@ -391,7 +391,7 @@ class BuyService
'is_delete_time'
=>
0
,
'is_shelves'
=>
1
,
],
'field'
=>
'id, id AS goods_id, title, images, inventory_unit, buy_min_number, buy_max_number'
,
'field'
=>
'id, id AS goods_id, title, images, inventory_unit, buy_min_number, buy_max_number
, model
'
,
];
$ret
=
GoodsService
::
GoodsList
(
$p
);
if
(
empty
(
$ret
[
'data'
][
0
]))
...
...
@@ -784,6 +784,7 @@ class BuyService
'spec_coding'
=>
empty
(
$v
[
'spec_coding'
])
?
''
:
$v
[
'spec_coding'
],
'spec_barcode'
=>
empty
(
$v
[
'spec_barcode'
])
?
''
:
$v
[
'spec_barcode'
],
'buy_number'
=>
intval
(
$v
[
'stock'
]),
'model'
=>
$v
[
'model'
],
'add_time'
=>
time
(),
];
if
(
Db
::
name
(
'OrderDetail'
)
->
insertGetId
(
$detail
)
<=
0
)
...
...
application/service/GoodsService.php
浏览文件 @
5de36826
...
...
@@ -975,6 +975,13 @@ class GoodsService
'checked_data'
=>
'2,60'
,
'error_msg'
=>
'标题名称格式 2~60 个字符'
,
],
[
'checked_type'
=>
'length'
,
'key_name'
=>
'simple_desc'
,
'checked_data'
=>
'60'
,
'is_checked'
=>
1
,
'error_msg'
=>
'商品简述格式 最多60个字符'
,
],
[
'checked_type'
=>
'length'
,
'key_name'
=>
'model'
,
...
...
@@ -1062,6 +1069,7 @@ class GoodsService
$data
=
[
'title'
=>
$params
[
'title'
],
'title_color'
=>
empty
(
$params
[
'title_color'
])
?
''
:
$params
[
'title_color'
],
'simple_desc'
=>
$params
[
'simple_desc'
],
'model'
=>
$params
[
'model'
],
'place_origin'
=>
isset
(
$params
[
'place_origin'
])
?
intval
(
$params
[
'place_origin'
])
:
0
,
'inventory_unit'
=>
$params
[
'inventory_unit'
],
...
...
application/service/OrderService.php
浏览文件 @
5de36826
...
...
@@ -763,6 +763,7 @@ class OrderService
$excel_export_items
.
=
'原价:'
.
$vs
[
'original_price'
]
.
"
\n
"
;
$excel_export_items
.
=
'销售价:'
.
$vs
[
'price'
]
.
"
\n
"
;
$excel_export_items
.
=
'总价:'
.
$vs
[
'total_price'
]
.
"
\n
"
;
$excel_export_items
.
=
'型号:'
.
$vs
[
'model'
]
.
"
\n
"
;
$excel_export_items
.
=
'规格:'
.
$vs
[
'spec_text'
]
.
"
\n
"
;
$excel_export_items
.
=
'重量:'
.
$vs
[
'spec_weight'
]
.
"
\n
"
;
$excel_export_items
.
=
'编码:'
.
$vs
[
'spec_coding'
]
.
"
\n
"
;
...
...
application/service/PluginsAdminService.php
浏览文件 @
5de36826
...
...
@@ -1085,6 +1085,12 @@ php;
{
return
DataReturn
(
$ret
,
-
1
);
}
// 是否开启开发者模式
if
(
config
(
'shopxo.is_develop'
)
!==
true
)
{
return
DataReturn
(
'请先开启开发者模式'
,
-
1
);
}
// 获取应用标记
$where
=
[
'id'
=>
intval
(
$params
[
'id'
])];
...
...
public/static/index/default/css/goods.css
浏览文件 @
5de36826
...
...
@@ -177,9 +177,7 @@ fieldset legend{margin-left:15px;padding-left:3px;padding-right:3px;color:#333;}
.tab
a
.cur
{
font-weight
:
bold
;}
/*商品详细页*/
/*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
;}
.simple-desc
{
color
:
#999
;
}
/*价格*/
.tb-detail-price
{
text-align
:
left
;
position
:
relative
;}
...
...
@@ -421,7 +419,7 @@ ul.detail-attr li {height: 26px;overflow: hidden;line-height: 26px;vertical-alig
/* 手机模式下 */
@media
only
screen
and
(
max-width
:
640px
)
{
.goods-detail
{
padding
:
0px
;
}
.detail-title
,
.detail-attr
{
padding
:
0px
5px
;
}
.detail-title
,
.detail-attr
,
.simple-desc
{
padding
:
0px
5px
;
}
.tb-detail-price
{
padding
:
10px
5px
;
}
.buy-nav
.buy-nav-opt
{
width
:
40%
;
}
ul
.tm-ind-panel
li
{
border-left
:
0px
;
}
...
...
public/static/upload/images/plugins_distribution/.gitignore
0 → 100644
浏览文件 @
5de36826
*
!.gitignore
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录