Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
00f730b9
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,发现更多精彩内容 >>
提交
00f730b9
编写于
3月 29, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into v1.4.0
上级
1e5244d9
9dabd864
变更
8
展开全部
显示空白变更内容
内联
并排
Showing
8 changed file
with
128 addition
and
25 deletion
+128
-25
application/admin/controller/Goodscategory.php
application/admin/controller/Goodscategory.php
+3
-0
application/admin/view/default/goodscategory/index.html
application/admin/view/default/goodscategory/index.html
+22
-1
application/service/BuyService.php
application/service/BuyService.php
+4
-4
application/service/GoodsService.php
application/service/GoodsService.php
+6
-0
application/service/OrderService.php
application/service/OrderService.php
+1
-1
application/service/PluginsAdminService.php
application/service/PluginsAdminService.php
+5
-0
config/shopxo.sql
config/shopxo.sql
+64
-18
public/static/common/js/common.js
public/static/common/js/common.js
+23
-1
未找到文件。
application/admin/controller/Goodscategory.php
浏览文件 @
00f730b9
...
...
@@ -55,6 +55,9 @@ class GoodsCategory extends Common
// 是否
$this
->
assign
(
'common_is_text_list'
,
lang
(
'common_is_text_list'
));
// 商品分类
$this
->
assign
(
'goods_category_list'
,
GoodsService
::
GoodsCategory
());
// 编辑器文件存放地址
$this
->
assign
(
'editor_path_type'
,
'goods_category'
);
...
...
application/admin/view/default/goodscategory/index.html
浏览文件 @
00f730b9
...
...
@@ -19,6 +19,28 @@
<div
class=
"am-popup-bd"
>
<!-- form start -->
<form
class=
"am-form form-validation admin-save"
action=
"{{:MyUrl('admin/goodscategory/save')}}"
method=
"POST"
request-type=
"ajax-reload"
request-value=
""
>
<div
class=
"am-form-group"
>
<label
class=
"block"
>
父级
</label>
<select
name=
"pid"
class=
"am-radius c-p chosen-select forth-selection-form-category"
data-placeholder=
"可选择..."
data-validation-message=
"请选择商品分类"
>
<option
value=
"0"
>
可选择...
</option>
{{if !empty($goods_category_list)}}
{{foreach $goods_category_list as $v}}
<option
value=
"{{$v.id}}"
>
一级 - {{$v.name}}
</option>
{{if !empty($v['items'])}}
{{foreach $v.items as $vs}}
<option
style=
"padding-left: 30px;"
value=
"{{$vs.id}}"
>
二级 - {{$vs.name}}
</option>
{{if !empty($vs['items'])}}
{{foreach $vs.items as $vss}}
<option
style=
"padding-left: 60px;"
value=
"{{$vss.id}}"
>
三级 - {{$vss.name}}
</option>
{{/foreach}}
{{/if}}
{{/foreach}}
{{/if}}
{{/foreach}}
{{/if}}
</select>
</div>
<div
class=
"am-form-group am-form-file"
>
<label
class=
"block"
>
icon图标
</label>
<ul
class=
"plug-file-upload-view goods-category-icon-images-view"
data-form-name=
"icon"
data-max-number=
"1"
data-dialog-type=
"images"
>
...
...
@@ -77,7 +99,6 @@
{{include file="lib/enable" /}}
<div
class=
"am-form-group am-form-group-refreshing"
>
<input
type=
"hidden"
name=
"id"
/>
<input
type=
"hidden"
name=
"pid"
value=
"0"
/>
<button
type=
"submit"
class=
"am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100"
data-am-loading=
"{loadingText:'处理中...'}"
>
保存
</button>
</div>
</form>
...
...
application/service/BuyService.php
浏览文件 @
00f730b9
...
...
@@ -777,10 +777,10 @@ class BuyService
'original_price'
=>
$v
[
'original_price'
],
'price'
=>
$v
[
'price'
],
'spec'
=>
empty
(
$v
[
'spec'
])
?
''
:
json_encode
(
$v
[
'spec'
]),
'spec_weight'
=>
$v
[
'spec_weight'
],
'spec_coding'
=>
$v
[
'spec_coding'
],
'spec_barcode'
=>
$v
[
'spec_barcode'
],
'buy_number'
=>
$v
[
'stock'
]
,
'spec_weight'
=>
empty
(
$v
[
'spec_weight'
])
?
0.00
:
(
float
)
$v
[
'spec_weight'
],
'spec_coding'
=>
empty
(
$v
[
'spec_coding'
])
?
''
:
$v
[
'spec_coding'
],
'spec_barcode'
=>
empty
(
$v
[
'spec_barcode'
])
?
''
:
$v
[
'spec_barcode'
],
'buy_number'
=>
intval
(
$v
[
'stock'
])
,
'add_time'
=>
time
(),
];
if
(
Db
::
name
(
'OrderDetail'
)
->
insertGetId
(
$detail
)
<=
0
)
...
...
application/service/GoodsService.php
浏览文件 @
00f730b9
...
...
@@ -2047,6 +2047,12 @@ class GoodsService
'big_images'
=>
$attachment
[
'data'
][
'big_images'
],
];
// 父级id宇当前id不能相同
if
(
!
empty
(
$params
[
'id'
])
&&
$params
[
'id'
]
==
$data
[
'pid'
])
{
return
DataReturn
(
'父级不能与当前相同'
,
-
10
);
}
// 添加
if
(
empty
(
$params
[
'id'
]))
{
...
...
application/service/OrderService.php
浏览文件 @
00f730b9
...
...
@@ -114,7 +114,7 @@ class OrderService
'total_price'
=>
$order
[
'total_price'
],
'notify_url'
=>
$url
.
'_notify.php'
,
'call_back_url'
=>
$call_back_url
,
'site_name'
=>
MyC
(
'home_s
eo_site_titl
e'
,
'ShopXO'
,
true
),
'site_name'
=>
MyC
(
'home_s
ite_nam
e'
,
'ShopXO'
,
true
),
);
$pay_name
=
'payment\\'
.
$payment
[
0
][
'payment'
];
$ret
=
(
new
$pay_name
(
$payment
[
0
][
'config'
]))
->
Pay
(
$pay_data
);
...
...
application/service/PluginsAdminService.php
浏览文件 @
00f730b9
...
...
@@ -905,6 +905,11 @@ php;
// 开始解压文件
$resource
=
zip_open
(
$_FILES
[
'file'
][
'tmp_name'
]);
if
(
!
is_resource
(
$resource
))
{
return
DataReturn
(
'压缩包打开失败['
.
$resource
.
']'
,
-
10
);
}
while
((
$temp_resource
=
zip_read
(
$resource
))
!==
false
)
{
if
(
zip_entry_open
(
$resource
,
$temp_resource
))
...
...
config/shopxo.sql
浏览文件 @
00f730b9
此差异已折叠。
点击以展开。
public/static/common/js/common.js
浏览文件 @
00f730b9
...
...
@@ -470,6 +470,16 @@ function FormDataFill(json, tag)
});
}
// 是否存在pid和当前id相同
if
(
$form
.
find
(
'
select[name="pid"]
'
).
length
>
0
)
{
$form
.
find
(
'
select[name="pid"]
'
).
find
(
'
option
'
).
removeAttr
(
'
disabled
'
);
if
((
json
[
'
id
'
]
||
null
)
!=
null
)
{
$form
.
find
(
'
select[name="pid"]
'
).
find
(
'
option[value="
'
+
json
[
'
id
'
]
+
'
"]
'
).
attr
(
'
disabled
'
,
true
);
}
}
// 多选插件事件更新
if
(
$
(
'
.chosen-select
'
).
length
>
0
)
{
...
...
@@ -1378,7 +1388,13 @@ $(function()
// 父节点赋值
var
id
=
parseInt
(
$
(
this
).
data
(
'
id
'
))
||
0
;
$
(
'
#data-save-win
'
).
find
(
'
input[name="pid"]
'
).
val
(
id
);
$
(
'
#data-save-win
'
).
find
(
'
input[name="pid"], select[name="pid"]
'
).
val
(
id
);
// 多选插件事件更新
if
(
$
(
'
.chosen-select
'
).
length
>
0
)
{
$
(
'
.chosen-select
'
).
trigger
(
'
chosen:updated
'
);
}
});
/**
...
...
@@ -1461,6 +1477,12 @@ $(function()
{
$
(
this
).
blur
();
});
// 多选插件事件更新
if
(
$
(
'
.chosen-select
'
).
length
>
0
)
{
$
(
'
.chosen-select
'
).
trigger
(
'
chosen:updated
'
);
}
}
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录