正在显示
4 个修改的文件
包含
29 行增加
和
5 行删除
| @@ -37,8 +37,6 @@ class ProjectController extends BaseController | @@ -37,8 +37,6 @@ class ProjectController extends BaseController | ||
| 37 | }else{ | 37 | }else{ |
| 38 | $map[] = ['type', $this->param['type']]; | 38 | $map[] = ['type', $this->param['type']]; |
| 39 | } | 39 | } |
| 40 | - | ||
| 41 | - | ||
| 42 | } | 40 | } |
| 43 | //搜索技术组 | 41 | //搜索技术组 |
| 44 | if(!empty($this->param['dep_id'])){ | 42 | if(!empty($this->param['dep_id'])){ |
| @@ -55,7 +55,7 @@ class ProductController extends BaseController | @@ -55,7 +55,7 @@ class ProductController extends BaseController | ||
| 55 | $map[] = ['status', $this->param['status']]; | 55 | $map[] = ['status', $this->param['status']]; |
| 56 | } | 56 | } |
| 57 | $sort = ['id' => 'desc']; | 57 | $sort = ['id' => 'desc']; |
| 58 | - $data = $logic->getList($map, $sort, ['id', 'project_id', 'title', 'thumb', 'product_type' ,'category_id', 'keyword_id', 'status', 'created_uid', 'created_at', 'updated_at']); | 58 | + $data = $logic->getList($map, $sort, ['id', 'project_id', 'title', 'thumb', 'product_type' ,'category_id', 'keyword_id', 'status', 'created_uid', 'created_at', 'updated_at'],$this->row); |
| 59 | return $this->success($data); | 59 | return $this->success($data); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| @@ -94,4 +94,16 @@ class ProductController extends BaseController | @@ -94,4 +94,16 @@ class ProductController extends BaseController | ||
| 94 | $data = $logic->getStatusNumber(); | 94 | $data = $logic->getStatusNumber(); |
| 95 | $this->response('success',Code::SUCCESS,$data); | 95 | $this->response('success',Code::SUCCESS,$data); |
| 96 | } | 96 | } |
| 97 | + | ||
| 98 | + /** | ||
| 99 | + * @remark :复制产品 | ||
| 100 | + * @name :copyProduct | ||
| 101 | + * @author :lyh | ||
| 102 | + * @method :post | ||
| 103 | + * @time :2023/7/29 14:59 | ||
| 104 | + */ | ||
| 105 | + public function copyProduct(ProductLogic $logic){ | ||
| 106 | + $rs = $logic->setCopyProduct(); | ||
| 107 | + $this->response('success',Code::SUCCESS,$rs); | ||
| 108 | + } | ||
| 97 | } | 109 | } |
| @@ -26,9 +26,9 @@ class ProductLogic extends BaseLogic | @@ -26,9 +26,9 @@ class ProductLogic extends BaseLogic | ||
| 26 | $this->model = new Product(); | 26 | $this->model = new Product(); |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | - public function getList(array $map = [], array $sort = ['id' => 'desc'], array $columns = ['*'], int $limit = 20) | 29 | + public function getList(array $map = [], array $sort = ['id' => 'desc'], array $columns = ['*'], int $row = 20) |
| 30 | { | 30 | { |
| 31 | - $data = parent::getList($map, $sort, $columns, $limit); | 31 | + $data = parent::getList($map, $sort, $columns, $row); |
| 32 | foreach ($data['list'] as &$v){ | 32 | foreach ($data['list'] as &$v){ |
| 33 | $v = $this->formatData($v); | 33 | $v = $this->formatData($v); |
| 34 | $v['thumb']['image_link'] = getImageUrl($v['thumb']['url']);//图片统一 | 34 | $v['thumb']['image_link'] = getImageUrl($v['thumb']['url']);//图片统一 |
| @@ -142,4 +142,17 @@ class ProductLogic extends BaseLogic | @@ -142,4 +142,17 @@ class ProductLogic extends BaseLogic | ||
| 142 | } | 142 | } |
| 143 | return $this->success($data); | 143 | return $this->success($data); |
| 144 | } | 144 | } |
| 145 | + | ||
| 146 | + /** | ||
| 147 | + * @remark :复制产品 | ||
| 148 | + * @name :setCopyProduct | ||
| 149 | + * @author :lyh | ||
| 150 | + * @method :post | ||
| 151 | + * @time :2023/7/29 15:03 | ||
| 152 | + */ | ||
| 153 | + public function setCopyProduct(){ | ||
| 154 | + $info = $this->model->read(['id'=>$this->param['id']]); | ||
| 155 | + var_dump($info); | ||
| 156 | + die(); | ||
| 157 | + } | ||
| 145 | } | 158 | } |
| @@ -335,6 +335,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -335,6 +335,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 335 | //无需登录验证的路由组 | 335 | //无需登录验证的路由组 |
| 336 | Route::group([], function () { | 336 | Route::group([], function () { |
| 337 | Route::any('/login', [\App\Http\Controllers\Bside\ComController::class, 'login'])->name('login'); | 337 | Route::any('/login', [\App\Http\Controllers\Bside\ComController::class, 'login'])->name('login'); |
| 338 | + Route::any('/copyProduct', [\App\Http\Controllers\Bside\Product\ProductController::class, 'copyProduct'])->name('product_copyProduct'); | ||
| 338 | // Route::any('/ceshi', [\App\Http\Controllers\Bside\ComController::class, 'ceshi'])->name('ceshi_ceshi'); | 339 | // Route::any('/ceshi', [\App\Http\Controllers\Bside\ComController::class, 'ceshi'])->name('ceshi_ceshi'); |
| 339 | Route::any('/stringTranslation', [\App\Http\Controllers\Bside\ComController::class, 'stringTranslation'])->name('com_stringTranslation'); | 340 | Route::any('/stringTranslation', [\App\Http\Controllers\Bside\ComController::class, 'stringTranslation'])->name('com_stringTranslation'); |
| 340 | Route::any('/sendLoginSms', [\App\Http\Controllers\Bside\ComController::class, 'sendLoginSms'])->name('sendLoginSms'); | 341 | Route::any('/sendLoginSms', [\App\Http\Controllers\Bside\ComController::class, 'sendLoginSms'])->name('sendLoginSms'); |
-
请 注册 或 登录 后发表评论