Merge pull request 'dev' (#162) from dev into master

Reviewed-on: #162
This commit is contained in:
mkm 2024-03-01 15:45:53 +08:00
commit 1353cc1b50
8 changed files with 7 additions and 6 deletions

View File

@ -57,6 +57,7 @@ class ProductLabelRepository extends BaseRepository
$form = Elm::createForm(is_null($id) ? Route::buildUrl($route)->build() : Route::buildUrl($route, ['id' => $id])->build());
$form->setRule([
Elm::input('label_name', '标签名称')->required(),
Elm::input('value', '标签值'),
Elm::input('info', '说明'),
Elm::number('sort', '排序', 0)->precision(0)->max(99999),
Elm::switches('status', '是否显示', 1)->activeValue(1)->inactiveValue(0)->inactiveText('关')->activeText('开'),

View File

@ -41,7 +41,7 @@ class ProductLabel extends BaseController
public function create(ProductLabelValidate $validate)
{
$data = $this->request->params(['label_name', 'status', 'sort', 'info']);
$data = $this->request->params(['label_name', 'status', 'sort', 'info', 'value']);
$validate->check($data);
if (!$this->repository->check($data['label_name'], 0))
return app('json')->fail('名称重复');
@ -56,7 +56,7 @@ class ProductLabel extends BaseController
public function update($id, ProductLabelValidate $validate)
{
$data = $this->request->params(['label_name', 'status', 'sort', 'info']);
$data = $this->request->params(['label_name', 'status', 'sort', 'info', 'value']);
$validate->check($data);
if (!$this->repository->check($data['label_name'], 0,$id))
return app('json')->fail('名称重复');

View File

@ -100,7 +100,7 @@ class ProductLabel extends BaseController
public function checkParams(ProductLabelValidate $validate)
{
$params = ['label_name', 'status', 'sort', 'info'];
$params = ['label_name', 'status', 'sort', 'info', 'value'];
$data = $this->request->params($params);
$validate->check($data);
return $data;

View File

@ -2,4 +2,4 @@
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
if(window.location.protocol == 'https:'){
document.write('<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">')
}</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.c6349b23.js></script><script src=/static/js/index.0bfdbb83.js></script></body></html>
}</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.c6349b23.js></script><script src=/static/js/index.30a26e36.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long