切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
anyv
6 years ago
提交
8b84f5353cd64abaee0948a6fc9ecb5c86089487
1 个父辈
2b3dc1e0
1 个管道 的构建
通过
耗费 1 秒
54
变更
6
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
6 个修改的文件
包含
62 行增加
和
15 行删除
app/portal/controller/SalesmangoodsController.php
public/themes/simpleboot3/portal/salesmangoods/salesman_goods_add.html
public/themes/simpleboot3/portal/salesmangoods/salesman_goods_edit.html
public/uploads/20190617/4b10d367891c8f6f09614c5325e1348c.png
public/uploads/20190617/968334d91e87c7201fc928f02a603ad2.png
public/uploads/20190617/cf81d90c596c56adc0c5f56216a949b9.png
app/portal/controller/SalesmangoodsController.php
查看文件 @
8b84f53
...
...
@@ -117,11 +117,18 @@ class SalesmangoodsController extends WeChatBaseController{
$data
[
'suit'
]
=
$_POST
[
'suit'
];
$data
[
'grade'
]
=
$_POST
[
'grade'
];
$data
[
'printing'
]
=
$_POST
[
'printing'
];
$det_img
[
0
]
=
$_POST
[
'img0'
];
$det_img
[
1
]
=
$_POST
[
'img1'
];
$det_img
[
2
]
=
$_POST
[
'img2'
];
/* $data['det_img'] = $_POST['img0'].','.$_POST['img1'].','.$_POST['img2'];*/
$data
[
'det_img'
]
=
json_encode
(
$det_img
);
if
(
$_POST
[
'img0'
]
!=
''
){
$det_img
[
0
]
=
$_POST
[
'img0'
];
}
if
(
$_POST
[
'img1'
]
!=
''
){
$det_img
[
1
]
=
$_POST
[
'img1'
];
}
if
(
$_POST
[
'img2'
]
!=
''
){
$det_img
[
2
]
=
$_POST
[
'img2'
];
}
if
(
!
empty
(
$det_img
)){
$data
[
'det_img'
]
=
json_encode
(
$det_img
);
}
$data
[
'create_time'
]
=
time
();
$data
[
'type'
]
=
2
;
$data
[
'uid'
]
=
cmf_get_current_user_id
();
...
...
@@ -161,10 +168,18 @@ class SalesmangoodsController extends WeChatBaseController{
$data
[
'suit'
]
=
$_POST
[
'suit'
];
$data
[
'grade'
]
=
$_POST
[
'grade'
];
$data
[
'printing'
]
=
$_POST
[
'printing'
];
$a
[
0
]
=
$_POST
[
'img0'
];
$a
[
1
]
=
$_POST
[
'img1'
];
$a
[
2
]
=
$_POST
[
'img2'
];
$data
[
'det_img'
]
=
json_encode
(
$a
);
if
(
$_POST
[
'img0'
]
!=
''
){
$det_img
[
0
]
=
$_POST
[
'img0'
];
}
if
(
$_POST
[
'img1'
]
!=
''
){
$det_img
[
1
]
=
$_POST
[
'img1'
];
}
if
(
$_POST
[
'img2'
]
!=
''
){
$det_img
[
2
]
=
$_POST
[
'img2'
];
}
if
(
!
empty
(
$det_img
)){
$data
[
'det_img'
]
=
json_encode
(
$det_img
);
}
$data
[
'id'
]
=
$_POST
[
'id'
];
$up_data
=
Db
::
name
(
'goods'
)
->
update
(
$data
);
if
(
$up_data
){
...
...
@@ -175,9 +190,11 @@ class SalesmangoodsController extends WeChatBaseController{
}
else
{
$id
=
$this
->
request
->
param
();
$goods_data
=
Db
::
name
(
'goods'
)
->
where
(
'id'
,
$id
[
'goods_id'
])
->
find
();
$goods_data
[
'det_img'
]
=
json_decode
(
$goods_data
[
'det_img'
],
true
);
foreach
(
$goods_data
[
'det_img'
]
as
$key
=>
$val
){
$goods_data
[
'det_img'
][
$key
]
=
cmf_get_image_url
(
$goods_data
[
'det_img'
][
$key
]);
if
(
!
empty
(
$goods_data
[
'det_img'
])){
$goods_data
[
'det_img'
]
=
json_decode
(
$goods_data
[
'det_img'
],
true
);
foreach
(
$goods_data
[
'det_img'
]
as
$key
=>
$val
){
$goods_data
[
'det_img'
][
$key
]
=
cmf_get_image_url
(
$goods_data
[
'det_img'
][
$key
]);
}
}
$this
->
assign
(
'goods_data'
,
$goods_data
);
return
$this
->
fetch
();
...
...
public/themes/simpleboot3/portal/salesmangoods/salesman_goods_add.html
查看文件 @
8b84f53
...
...
@@ -135,7 +135,7 @@
商品说明
</div>
<div
class=
"log_six_input_contant"
>
<textarea
cols=
"20"
rows=
"3"
placeholder=
"
在此填写您的留言
"
id=
"instr"
></textarea>
<textarea
cols=
"20"
rows=
"3"
placeholder=
"
请输入商品说明
"
id=
"instr"
></textarea>
</div>
</div>
<div
class=
"log_two_input_one"
>
...
...
@@ -295,7 +295,13 @@
*/
function
Sure_add
(){
show_img
=
$
(
'#show_img'
)[
0
].
src
;
if
(
show_img
==
"http://www.xkeasy.com/themes/simpleboot3/public/assets/images/jiahao.png"
){
show_img
=
''
;
}
thumbnail
=
$
(
'#thumbnail'
)[
0
].
src
;
if
(
thumbnail
==
"http://www.xkeasy.com/themes/simpleboot3/public/assets/images/jiahao.png"
){
thumbnail
=
''
;
}
book_name
=
$
(
"input[name='book_name']"
).
val
();
money
=
$
(
"input[name='money']"
).
val
();
price
=
$
(
"input[name='price']"
).
val
();
...
...
@@ -312,8 +318,17 @@
printing
=
$
(
"input[name='printing']"
).
val
();
grade
=
$
(
"#grade"
).
text
();
img0
=
$
(
'#img0'
)[
0
].
src
;
if
(
img0
==
"http://www.xkeasy.com/themes/simpleboot3/public/assets/images/jiahao.png"
){
img0
=
''
;
}
img1
=
$
(
'#img1'
)[
0
].
src
;
if
(
img1
==
"http://www.xkeasy.com/themes/simpleboot3/public/assets/images/jiahao.png"
){
img1
=
''
;
}
img2
=
$
(
'#img2'
)[
0
].
src
;
if
(
img2
==
"http://www.xkeasy.com/themes/simpleboot3/public/assets/images/jiahao.png"
){
img2
=
''
;
}
$
.
post
(
"{:url('Salesmangoods/Salesman_goods_add')}"
,{
show_img
:
show_img
,
thumbnail
:
thumbnail
,
book_name
:
book_name
,
money
:
money
,
price
:
price
,
pricing
:
pricing
,
instr
:
instr
,
book_number
:
book_number
,
paper
:
paper
,
book_size
:
book_size
,
binding
:
binding
,
author
:
author
,
press
:
press
,
press_time
:
press_time
,
suit
:
suit
,
grade
:
grade
,
img0
:
img0
,
img1
:
img1
,
img2
:
img2
,
printing
:
printing
},
function
(
data
){
if
(
data
){
...
...
public/themes/simpleboot3/portal/salesmangoods/salesman_goods_edit.html
查看文件 @
8b84f53
...
...
@@ -144,7 +144,7 @@
商品说明
</div>
<div
class=
"log_six_input_contant"
>
<textarea
cols=
"20"
rows=
"3"
placeholder=
"
在此填写您的留言
"
id=
"instr"
>
{$goods_data.instr}
</textarea>
<textarea
cols=
"20"
rows=
"3"
placeholder=
"
请输入商品说明
"
id=
"instr"
>
{$goods_data.instr}
</textarea>
</div>
</div>
<div
class=
"log_two_input_one"
>
...
...
@@ -318,7 +318,13 @@
*/
function
Sure_add
(){
show_img
=
$
(
'#show_img'
)[
0
].
src
;
if
(
show_img
==
"http://www.xkeasy.com/themes/simpleboot3/public/assets/images/jiahao.png"
){
show_img
=
''
;
}
thumbnail
=
$
(
'#thumbnail'
)[
0
].
src
;
if
(
thumbnail
==
"http://www.xkeasy.com/themes/simpleboot3/public/assets/images/jiahao.png"
){
thumbnail
=
''
;
}
book_name
=
$
(
"input[name='book_name']"
).
val
();
money
=
$
(
"input[name='money']"
).
val
();
price
=
$
(
"input[name='price']"
).
val
();
...
...
@@ -336,12 +342,21 @@
printing
=
$
(
"input[name='printing']"
).
val
();
grade
=
$
(
"#grade"
).
text
();
img0
=
$
(
'#img0'
)[
0
].
src
;
if
(
img0
==
"http://www.xkeasy.com/themes/simpleboot3/public/assets/images/jiahao.png"
){
img0
=
''
;
}
img1
=
$
(
'#img1'
)[
0
].
src
;
if
(
img1
==
"http://www.xkeasy.com/themes/simpleboot3/public/assets/images/jiahao.png"
){
img1
=
''
;
}
img2
=
$
(
'#img2'
)[
0
].
src
;
if
(
img2
==
"http://www.xkeasy.com/themes/simpleboot3/public/assets/images/jiahao.png"
){
img2
=
''
;
}
$
.
post
(
"{:url('Salesmangoods/Salesman_goods_edit')}"
,{
id
:
id
,
show_img
:
show_img
,
thumbnail
:
thumbnail
,
book_name
:
book_name
,
money
:
money
,
price
:
price
,
pricing
:
pricing
,
instr
:
instr
,
book_number
:
book_number
,
paper
:
paper
,
book_size
:
book_size
,
binding
:
binding
,
author
:
author
,
press
:
press
,
press_time
:
press_time
,
suit
:
suit
,
grade
:
grade
,
img0
:
img0
,
img1
:
img1
,
img2
:
img2
,
printing
:
printing
},
function
(
data
){
if
(
data
){
location
.
reload
()
;
window
.
location
.
href
=
"{:url('Salesmangoods/salesman_goods')}"
;
}
else
{
alert
(
'更新失败!'
);
}
...
...
public/uploads/20190617/4b10d367891c8f6f09614c5325e1348c.png
0 → 100644
查看文件 @
8b84f53
852 字节
public/uploads/20190617/968334d91e87c7201fc928f02a603ad2.png
0 → 100644
查看文件 @
8b84f53
188.1 KB
public/uploads/20190617/cf81d90c596c56adc0c5f56216a949b9.png
0 → 100644
查看文件 @
8b84f53
35.7 KB
请
注册
或
登录
后发表评论