Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
7790be58
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,发现更多精彩内容 >>
提交
7790be58
编写于
12月 24, 2018
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商品规格图片
上级
f78bc4fe
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
99 addition
and
10 deletion
+99
-10
application/admin/view/default/goods/save_info.html
application/admin/view/default/goods/save_info.html
+27
-7
public/static/admin/default/css/goods.css
public/static/admin/default/css/goods.css
+52
-0
public/static/admin/default/js/goods.js
public/static/admin/default/js/goods.js
+19
-2
public/static/common/css/common.css
public/static/common/css/common.css
+1
-1
未找到文件。
application/admin/view/default/goods/save_info.html
浏览文件 @
7790be58
...
@@ -156,6 +156,12 @@
...
@@ -156,6 +156,12 @@
<div
id=
"goods-nav-operations"
class=
"division-block goods-specifications"
>
<div
id=
"goods-nav-operations"
class=
"division-block goods-specifications"
>
<label
class=
"block nav-detail-title"
>
商品规格
</label>
<label
class=
"block nav-detail-title"
>
商品规格
</label>
<span
class=
"business-operations-submit specifications-nav-title-add"
>
+添加规格
</span>
<span
class=
"business-operations-submit specifications-nav-title-add"
>
+添加规格
</span>
<div
class=
"spec-images-tips"
>
<label
class=
"am-checkbox c-p"
>
<input
type=
"checkbox"
value=
"1"
data-am-ucheck
/>
<span
class=
"fs-12"
>
首个规格选择添加图片
</span>
</label>
</div>
<table
class=
"am-table am-table-bordered am-table-centered specifications-table m-t-10 m-b-10"
>
<table
class=
"am-table am-table-bordered am-table-centered specifications-table m-t-10 m-b-10"
>
<thead
class=
"title-nav"
>
<thead
class=
"title-nav"
>
<tr>
<tr>
...
@@ -206,7 +212,7 @@
...
@@ -206,7 +212,7 @@
{{if isset($v['data_type'])}}
{{if isset($v['data_type'])}}
{{switch v.data_type}}
{{switch v.data_type}}
{{case spec}}
{{case spec}}
<td
class=
"table-value-{{$v.data.key}}"
>
<td
class=
"table-value
table-value
-{{$v.data.key}}"
>
<input
type=
"text"
name=
"specifications_value_{{$v.data.key}}[]"
placeholder=
"规格值"
value=
"{{$v.data.value}}"
/>
<input
type=
"text"
name=
"specifications_value_{{$v.data.key}}[]"
placeholder=
"规格值"
value=
"{{$v.data.value}}"
/>
</td>
</td>
{{/case}}
{{/case}}
...
@@ -245,6 +251,26 @@
...
@@ -245,6 +251,26 @@
</tbody>
</tbody>
</table>
</table>
<span
class=
"business-operations-submit specifications-line-add"
>
+添加一行
</span>
<span
class=
"business-operations-submit specifications-line-add"
>
+添加一行
</span>
<ul
class=
"spec-images-list"
>
<li>
<ul
class=
"plug-file-upload-view spec-images-view"
data-form-name=
"spec_images[]"
data-max-number=
"1"
data-dialog-type=
"images"
>
<li>
<input
type=
"hidden"
name=
"spec_images[]"
value=
""
/>
<img
src=
"{{$image_host}}/static/admin/default/images/default-images.png"
/>
</li>
</ul>
<div
class=
"plug-file-upload-submit"
data-view-tag=
"ul.spec-images-view"
>
+上传图片
</div>
</li>
<li>
<ul
class=
"plug-file-upload-view spec-images-view"
data-form-name=
"spec_images[]"
data-max-number=
"1"
data-dialog-type=
"images"
>
<li>
<input
type=
"hidden"
name=
"spec_images[]"
value=
""
/>
<img
src=
"{{$image_host}}/static/admin/default/images/default-images.png"
/>
</li>
</ul>
<div
class=
"plug-file-upload-submit"
data-view-tag=
"ul.spec-images-view"
>
+上传图片
</div>
</li>
</ul>
</div>
</div>
<!-- 相册 -->
<!-- 相册 -->
...
@@ -348,11 +374,5 @@ $(function()
...
@@ -348,11 +374,5 @@ $(function()
$
(
'
ul.attribute-items-ul-{{$v.id}}
'
).
dragsort
({
dragSelector
:
'
i.drag-sort-submit
'
,
placeHolderTemplate
:
'
<li class="drag-sort-dotted"></li>
'
});
$
(
'
ul.attribute-items-ul-{{$v.id}}
'
).
dragsort
({
dragSelector
:
'
i.drag-sort-submit
'
,
placeHolderTemplate
:
'
<li class="drag-sort-dotted"></li>
'
});
{{
/
foreach
}}
{{
/
foreach
}}
{{
/
if
}}
{{
/
if
}}
{{
if
!
empty
(
$data
[
'
content_app
'
])}}
{{
foreach
$data
.
content_app
as
$v
}}
ImageFileUploadShow
(
'
.images-file-tag-{{$v.id}}
'
);
{{
/
foreach
}}
{{
/
if
}}
});
});
</script>
</script>
\ No newline at end of file
public/static/admin/default/css/goods.css
浏览文件 @
7790be58
...
@@ -61,6 +61,58 @@
...
@@ -61,6 +61,58 @@
.specifications-table
>
tbody
>
tr
>
td
{
.specifications-table
>
tbody
>
tr
>
td
{
vertical-align
:
middle
;
vertical-align
:
middle
;
}
}
#goods-nav-operations
{
position
:
relative
;
}
.spec-images-tips
{
position
:
absolute
;
left
:
100px
;
top
:
60px
;
z-index
:
2
;
padding
:
2px
5px
;
white-space
:
nowrap
;
border
:
solid
1px
#FDEF9D
;
border-radius
:
2px
;
background-color
:
#FEFBE6
;
color
:
#593C07
;
box-shadow
:
2px
2px
0
rgba
(
0
,
0
,
0
,
0.05
);
}
.spec-images-tips
::before
{
position
:
absolute
;
z-index
:
2
;
left
:
15px
;
bottom
:
-5px
;
overflow
:
hidden
;
width
:
6px
;
height
:
6px
;
margin-top
:
-54px
;
background-color
:
#FEFBE6
;
border-style
:
solid
;
border-width
:
0
1px
1px
0
;
border-color
:
#FDEF9D
;
font-size
:
0
;
content
:
""
;
-webkit-transform
:
rotate
(
45deg
);
-moz-transform
:
rotate
(
45deg
);
-ms-transform
:
rotate
(
45deg
);
transform
:
rotate
(
45deg
);
box-shadow
:
2px
2px
0
rgba
(
0
,
0
,
0
,
0.05
);
}
.spec-images-tips
.am-checkbox
{
margin
:
0px
;
min-height
:
auto
;
}
.spec-images-tips
.am-checkbox
input
[
type
=
"checkbox"
]
{
margin
:
0
0
0
-4px
;
}
.spec-images-list
{
border
:
1px
solid
#eee
;
padding
:
10px
;
margin-top
:
15px
;
}
.spec-images-list
li
{
display
:
inline-block
;
}
/**
/**
* 属性
* 属性
...
...
public/static/admin/default/js/goods.js
浏览文件 @
7790be58
...
@@ -25,7 +25,7 @@ $(function()
...
@@ -25,7 +25,7 @@ $(function()
$
(
'
.title-start
'
).
before
(
html
);
$
(
'
.title-start
'
).
before
(
html
);
// value
// value
html
=
'
<td class="table-value-
'
+
index
+
'
">
'
;
html
=
'
<td class="table-value
table-value
-
'
+
index
+
'
">
'
;
html
+=
'
<input type="text" name="specifications_value_
'
+
index
+
'
[]" placeholder="规格值" />
'
;
html
+=
'
<input type="text" name="specifications_value_
'
+
index
+
'
[]" placeholder="规格值" />
'
;
html
+=
'
</td>
'
;
html
+=
'
</td>
'
;
$
(
'
.value-start
'
).
before
(
html
);
$
(
'
.value-start
'
).
before
(
html
);
...
@@ -83,6 +83,24 @@ $(function()
...
@@ -83,6 +83,24 @@ $(function()
$
(
'
.specifications-table
'
).
on
(
'
click
'
,
'
.line-remove
'
,
function
()
$
(
'
.specifications-table
'
).
on
(
'
click
'
,
'
.line-remove
'
,
function
()
{
{
$
(
this
).
parents
(
'
tr
'
).
remove
();
$
(
this
).
parents
(
'
tr
'
).
remove
();
if
(
$
(
'
.specifications-table tbody tr
'
).
length
<=
1
)
{
$
(
'
.specifications-table th.table-title
'
).
remove
();
$
(
'
.specifications-table td.table-value
'
).
remove
();
}
});
// 规格首列事件
$
(
'
.spec-images-tips
'
).
on
(
'
change
'
,
'
input
'
,
function
()
{
if
(
$
(
this
).
prop
(
'
checked
'
))
{
console
.
log
(
1
);
}
else
{
console
.
log
(
0
);
}
});
});
// 手机详情添加
// 手机详情添加
...
@@ -123,7 +141,6 @@ $(function()
...
@@ -123,7 +141,6 @@ $(function()
$content_tag
.
append
(
html
);
$content_tag
.
append
(
html
);
$content_tag
.
attr
(
'
index
'
,
index
);
$content_tag
.
attr
(
'
index
'
,
index
);
$
(
this
).
attr
(
'
index
'
,
i
+
1
);
$
(
this
).
attr
(
'
index
'
,
i
+
1
);
ImageFileUploadShow
(
'
.images-file-tag-
'
+
index
);
});
});
// 手机详情删除
// 手机详情删除
...
...
public/static/common/css/common.css
浏览文件 @
7790be58
...
@@ -165,7 +165,7 @@ ul.plug-file-upload-view li {
...
@@ -165,7 +165,7 @@ ul.plug-file-upload-view li {
float
:
left
;
float
:
left
;
width
:
100px
;
width
:
100px
;
height
:
100px
;
height
:
100px
;
margin
:
0
10px
10
px
0
;
margin
:
0
10px
3
px
0
;
padding
:
5px
;
padding
:
5px
;
text-align
:
center
;
text-align
:
center
;
border
:
1px
dashed
#c2c2c2
;
border
:
1px
dashed
#c2c2c2
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录