diff --git a/Application/Admin/Controller/BoonController.class.php b/Application/Admin/Controller/BoonController.class.php index 1bce8f145..e4612f7e6 100644 --- a/Application/Admin/Controller/BoonController.class.php +++ b/Application/Admin/Controller/BoonController.class.php @@ -98,8 +98,17 @@ class BoonController extends ThinkController { } else { $map['id'] = $_REQUEST['id']; $data = D(self::model_name)->where($map)->find(); +// if(!empty($data['cover'])) { +// $data['cover_data'] = explode(',', $data['cover']); +// } if(!empty($data['cover'])) { - $data['cover_data'] = explode(',', $data['cover']); + $valueArr = explode(',', $data['cover']); + $str = ''; + foreach ($valueArr as $key1 => $value1) { + $a = get_cover($value1, 'path'); + $str .= $a.','; + } + $data['valuedata'] = rtrim($str, ','); } $this->assign('data',$data); diff --git a/Application/Admin/Controller/GuessController.class.php b/Application/Admin/Controller/GuessController.class.php index d7760b158..ba9b376d7 100644 --- a/Application/Admin/Controller/GuessController.class.php +++ b/Application/Admin/Controller/GuessController.class.php @@ -100,9 +100,18 @@ class GuessController extends ThinkController { } else { $map['id'] = $_REQUEST['id']; $data = D(self::model_name)->where($map)->find(); - if(!empty($data['icon'])) { - $data['icon_data'] = explode(',', $data['icon']); - } +// if(!empty($data['icon'])) { +// $data['icon_data'] = explode(',', $data['icon']); +// } + if(!empty($data['icon'])) { + $valueArr = explode(',', $data['icon']); + $str = ''; + foreach ($valueArr as $key1 => $value1) { + $a = get_cover($value1, 'path'); + $str .= $a.','; + } + $data['valuedata'] = rtrim($str, ','); + } $this->assign('data',$data); $this->meta_title = '编辑链接'; diff --git a/Application/Admin/Controller/PointShopController.class.php b/Application/Admin/Controller/PointShopController.class.php index c6fef4ed2..9fdcc98e2 100644 --- a/Application/Admin/Controller/PointShopController.class.php +++ b/Application/Admin/Controller/PointShopController.class.php @@ -79,9 +79,18 @@ class PointShopController extends ThinkController } } else { $data = $model->getData($id); +// if(!empty($data['cover'])) { +// $data['cover_data'] = explode(',', $data['cover']); +// } if(!empty($data['cover'])) { - $data['cover_data'] = explode(',', $data['cover']); - } + $valueArr = explode(',', $data['cover']); + $str = ''; + foreach ($valueArr as $key1 => $value1) { + $a = get_cover($value1, 'path'); + $str .= $a.','; + } + $data['valuedata'] = rtrim($str, ','); + } $this->assign("data",$data); diff --git a/Application/Admin/View/Boon/add.html b/Application/Admin/View/Boon/add.html index 57e4e9126..79434c408 100644 --- a/Application/Admin/View/Boon/add.html +++ b/Application/Admin/View/Boon/add.html @@ -9,6 +9,8 @@ + +