Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
note-library
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6f574514
authored
Aug 11, 2023
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
标签换行
parent
d848284d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
app/Http/Controllers/AjaxController.php
app/Services/LabelService.php
app/Http/Controllers/AjaxController.php
View file @
6f574514
...
@@ -234,7 +234,7 @@ Class AjaxController extends Controller
...
@@ -234,7 +234,7 @@ Class AjaxController extends Controller
return
$this
->
ajaxReturn
(
-
1
,
"模板名称已经存在,请修改模板名称再提交!"
);
return
$this
->
ajaxReturn
(
-
1
,
"模板名称已经存在,请修改模板名称再提交!"
);
}
}
}
}
//dd($data['html']);
$data
[
't_id'
]
=
intval
(
$id
);
$data
[
't_id'
]
=
intval
(
$id
);
try
{
try
{
DB
::
Connection
(
"label"
)
->
transaction
(
function
()
use
(
$data
,
$request
)
{
DB
::
Connection
(
"label"
)
->
transaction
(
function
()
use
(
$data
,
$request
)
{
...
@@ -264,7 +264,7 @@ Class AjaxController extends Controller
...
@@ -264,7 +264,7 @@ Class AjaxController extends Controller
}
}
exit
;
exit
;
}
}
//dd($data);
// --------------------------新增模板------------------------------------------------------------
// --------------------------新增模板------------------------------------------------------------
//新增模板
//新增模板
...
...
app/Services/LabelService.php
View file @
6f574514
...
@@ -126,6 +126,7 @@ class LabelService {
...
@@ -126,6 +126,7 @@ class LabelService {
}
}
$html
=
str_replace
(
"箜"
,
" "
,
$html
);
$html
=
str_replace
(
"箜"
,
" "
,
$html
);
$html
=
str_replace
(
"蒯"
,
" %0A "
,
$html
);
$dom
=
HtmlDomParser
::
str_get_html
(
$html
);
$dom
=
HtmlDomParser
::
str_get_html
(
$html
);
...
@@ -168,7 +169,8 @@ class LabelService {
...
@@ -168,7 +169,8 @@ class LabelService {
if
(
empty
(
$erweima
->
datatypes
)){
if
(
empty
(
$erweima
->
datatypes
)){
$erweima
->
datatypes
=
"暂无数据"
;
$erweima
->
datatypes
=
"暂无数据"
;
}
}
$b
=
'data:image/png;base64,'
.
DNS2D
::
getBarcodePNG
(
$erweima
->
datatypes
,
"QRCODE"
);
// dump($erweima->datatypes);
$b
=
'data:image/png;base64,'
.
DNS2D
::
getBarcodePNG
(
urldecode
(
$erweima
->
datatypes
),
"QRCODE"
);
$c
=
preg_replace
(
'/background: url\((.*?)\) 0% 0% \/ 100% 100%/'
,
" background: url(
{
$b
}
) 0% 0% / 100% 100% "
,
$a
);
$c
=
preg_replace
(
'/background: url\((.*?)\) 0% 0% \/ 100% 100%/'
,
" background: url(
{
$b
}
) 0% 0% / 100% 100% "
,
$a
);
$erweima
->
style
=
$c
;
$erweima
->
style
=
$c
;
}
catch
(
\Exception
$e
){
}
catch
(
\Exception
$e
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment