From 021673f657353ff3c50121fa661c6274e3e22c98 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 29 Oct 2019 11:04:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E8=A1=A5?= =?UTF-8?q?=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/BoonController.class.php | 11 +- .../Controller/GuessController.class.php | 15 +- .../Controller/PointShopController.class.php | 13 +- Application/Admin/View/Boon/add.html | 267 +-------- Application/Admin/View/Boon/edit.html | 269 +-------- Application/Admin/View/Guess/add.html | 531 +----------------- Application/Admin/View/Guess/edit.html | 431 +------------- Application/Admin/View/PointShop/add.html | 333 +---------- Application/Admin/View/PointShop/edit.html | 272 +-------- 9 files changed, 61 insertions(+), 2081 deletions(-) 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 @@ + +