Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
6a419a66
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,发现更多精彩内容 >>
提交
6a419a66
编写于
12月 25, 2018
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
goods
上级
7790be58
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
182 addition
and
119 deletion
+182
-119
application/admin/view/default/goods/save_info.html
application/admin/view/default/goods/save_info.html
+105
-112
application/admin/view/default/public/header.html
application/admin/view/default/public/header.html
+3
-0
public/static/admin/default/css/goods.css
public/static/admin/default/css/goods.css
+14
-2
public/static/admin/default/js/goods.js
public/static/admin/default/js/goods.js
+60
-5
未找到文件。
application/admin/view/default/goods/save_info.html
浏览文件 @
6a419a66
...
...
@@ -153,13 +153,13 @@
</div>
<!-- 规格 -->
<div
id=
"goods-nav-operations"
class=
"division-block
goods-specifications
"
>
<div
id=
"goods-nav-operations"
class=
"division-block"
>
<label
class=
"block nav-detail-title"
>
商品规格
</label>
<
span
class=
"business-operations-submit specifications-nav-title-add"
>
+添加规格
</span
>
<
div
class=
"goods-specifications"
>
<div
class=
"spec-images-tips"
>
<label
class=
"am-checkbox c-p"
>
<input
type=
"checkbox"
value=
"1"
data-am-ucheck
/>
<span
class=
"fs-12
"
>
首个规格选择添加图片
</span>
<span
class=
"fs-12 msg-tips
"
>
首个规格选择添加图片
</span>
</label>
</div>
<table
class=
"am-table am-table-bordered am-table-centered specifications-table m-t-10 m-b-10"
>
...
...
@@ -250,28 +250,21 @@
{{/if}}
</tbody>
</table>
<span
class=
"business-operations-submit specifications-nav-title-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>
<ul class="plug-file-upload-view spec-images-view" data-form-name="spec_images[]" data-max-number="1" data-delete='0'
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>
</li> -->
</ul>
</div>
</div>
<!-- 相册 -->
<div
id=
"goods-nav-photo"
class=
"division-block"
>
...
...
application/admin/view/default/public/header.html
浏览文件 @
6a419a66
...
...
@@ -16,4 +16,7 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{$Think.__MY_ROOT__}}static/{{$module_css}}"
/>
{{/if}}
</head>
<script
type=
"text/javascript"
>
var
__image_host__
=
'
{{$image_host}}
'
;
</script>
<body>
\ No newline at end of file
public/static/admin/default/css/goods.css
浏览文件 @
6a419a66
...
...
@@ -66,8 +66,8 @@
}
.spec-images-tips
{
position
:
absolute
;
left
:
100
px
;
top
:
6
0px
;
left
:
9
px
;
top
:
3
0px
;
z-index
:
2
;
padding
:
2px
5px
;
white-space
:
nowrap
;
...
...
@@ -101,10 +101,20 @@
.spec-images-tips
.am-checkbox
{
margin
:
0px
;
min-height
:
auto
;
height
:
15px
;
line-height
:
15px
;
}
.spec-images-tips
.am-ucheck-icons
{
width
:
15px
;
height
:
15px
;
line-height
:
15px
;
}
.spec-images-tips
.am-checkbox
input
[
type
=
"checkbox"
]
{
margin
:
0
0
0
-4px
;
}
.spec-images-tips
.msg-tips
{
vertical-align
:
super
;
}
.spec-images-list
{
border
:
1px
solid
#eee
;
padding
:
10px
;
...
...
@@ -112,6 +122,8 @@
}
.spec-images-list
li
{
display
:
inline-block
;
width
:
100px
;
margin
:
0
10px
3px
0
;
}
/**
...
...
public/static/admin/default/js/goods.js
浏览文件 @
6a419a66
...
...
@@ -29,6 +29,9 @@ $(function()
html
+=
'
<input type="text" name="specifications_value_
'
+
index
+
'
[]" placeholder="规格值" />
'
;
html
+=
'
</td>
'
;
$
(
'
.value-start
'
).
before
(
html
);
// 规格图片
SpecImagesHandle
();
});
// 规格列移除
...
...
@@ -42,6 +45,9 @@ $(function()
{
$
(
'
.specifications-table tr.line-not-first
'
).
remove
();
}
// 规格图片
SpecImagesHandle
();
});
// 添加一行规格值
...
...
@@ -66,6 +72,9 @@ $(function()
{
$
(
this
).
attr
(
'
value
'
,
''
);
});
// 规格图片
SpecImagesHandle
();
});
// 规格行复制
...
...
@@ -77,6 +86,9 @@ $(function()
$
(
this
).
attr
(
'
value
'
,
$
(
this
).
val
());
});
$parent
.
after
(
$parent
.
prop
(
'
outerHTML
'
));
// 规格图片
SpecImagesHandle
();
});
// 规格行移除
...
...
@@ -89,19 +101,62 @@ $(function()
$
(
'
.specifications-table th.table-title
'
).
remove
();
$
(
'
.specifications-table td.table-value
'
).
remove
();
}
// 规格图片
SpecImagesHandle
();
});
// 规格首列事件
$
(
'
.spec-images-tips
'
).
on
(
'
change
'
,
'
input
'
,
function
()
{
if
(
$
(
this
).
prop
(
'
checked
'
))
// 规格图片
SpecImagesHandle
();
});
// 规格第一列输入事件
$
(
'
.specifications-table tbody tr
'
).
on
(
'
change
'
,
'
td:eq(0) input
'
,
function
()
{
console
.
log
(
1
);
}
else
{
console
.
log
(
0
);
}
// 规格图片
SpecImagesHandle
();
});
// 规格图片
function
SpecImagesHandle
()
{
if
(
$
(
'
.spec-images-tips input
'
).
prop
(
'
checked
'
))
{
var
temp_spec_all
=
{},
spec_all
=
[];
$
(
'
.specifications-table tbody tr
'
).
each
(
function
(
k
,
v
)
{
var
value
=
$
(
this
).
find
(
'
td:eq(0) input
'
).
val
();
temp_spec_all
[
value
]
=
value
;
});
spec_all
=
Object
.
keys
(
temp_spec_all
);
if
(
spec_all
.
length
>
0
)
{
for
(
var
i
in
spec_all
)
{
var
temp_class
=
'
spec-images-items-
'
+
spec_all
[
i
];
if
(
$
(
'
ul.spec-images-list
'
).
find
(
'
.
'
+
temp_class
).
length
<=
0
)
{
var
html
=
'
<li class="
'
+
temp_class
+
'
">
'
;
html
+=
'
<input type="text" value="
'
+
spec_all
[
i
]
+
'
" disabled="disabled" />
'
html
+=
'
<ul class="plug-file-upload-view spec-images-view-
'
+
spec_all
[
i
]
+
'
" data-form-name="spec_images[]" data-max-number="1" data-delete="0" data-dialog-type="images">
'
;
html
+=
'
<li>
'
;
html
+=
'
<input type="hidden" name="spec_images[]" value="" />
'
;
html
+=
'
<img src="
'
+
__image_host__
+
'
/static/admin/default/images/default-images.png" />
'
;
html
+=
'
</li>
'
;
html
+=
'
</ul>
'
;
html
+=
'
<div class="plug-file-upload-submit" data-view-tag="ul.spec-images-view-
'
+
spec_all
[
i
]
+
'
">+上传图片</div>
'
;
html
+=
'
</li>
'
;
$
(
'
ul.spec-images-list
'
).
append
(
html
);
}
}
}
}
else
{
$
(
'
ul.spec-images-list
'
).
html
(
''
);
}
}
// 手机详情添加
$
(
document
).
on
(
'
click
'
,
'
.content-app-items-add-sub
'
,
function
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录