|
|
@@ -55,6 +55,8 @@ class ShowTemplate extends BaseController{
|
|
|
->select();
|
|
|
foreach($data as $k=>$v){
|
|
|
$data[$k]["time"] = date("Y-m-d H:i:s",$v["time"]);
|
|
|
+ $data[$k]["imgs"] = getImageAr($v["imgs"]);
|
|
|
+ $data[$k]["img"] = getImageAr($v["imgs"],0);
|
|
|
}
|
|
|
}
|
|
|
$data = empty($data)?[]:$data;
|
|
|
@@ -73,7 +75,7 @@ class ShowTemplate extends BaseController{
|
|
|
['title','','empty','请填写模板标题'],
|
|
|
['price','0','is_numeric','请输入正确的模板售价'],
|
|
|
['old_price','0','is_numeric','请输入正确的模板原价'],
|
|
|
- ['img','','empty','请上传模板展示图'],
|
|
|
+ ['imgs',[],'empty','请上传商品主图'],
|
|
|
['is_hot','0'],
|
|
|
['is_recommend','0'],
|
|
|
['code','','empty','请输入CODE'],
|
|
|
@@ -85,9 +87,9 @@ class ShowTemplate extends BaseController{
|
|
|
$save["price"] = floatval($post["price"]);
|
|
|
$save["old_price"] = floatval($post["old_price"]);
|
|
|
$save["status"] = (int)$post["status"]==1?1:0;
|
|
|
- $save["img"] = empty($post["img"]) ? "" : $post["img"];
|
|
|
+ $save["imgs"] = empty($post["imgs"]) ? "" : implode(",", $post["imgs"]);
|
|
|
$save["is_hot"] = (int)$post["is_hot"]==1?1:0;
|
|
|
- $save["is_recommend"] = (int)$post["is_ip"]==1?1:0;
|
|
|
+ $save["is_recommend"] = (int)$post["is_recommend"]==1?1:0;
|
|
|
$save["code"] = $post["code"];
|
|
|
$save["unreal_sales"] = (int)$post["unreal_sales"];
|
|
|
$save["admin_time"] = time();
|