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
aee73773
authored
May 13, 2020
by
肖康
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://119.23.72.7/sunlong_v5/note-library
parents
869994ef
8de6803d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
22 deletions
app/Http/Controllers/WebController.php
app/Http/Controllers/WebController.php
View file @
aee73773
...
@@ -99,28 +99,19 @@ class WebController extends Controller
...
@@ -99,28 +99,19 @@ class WebController extends Controller
$tmpRelation
->
tmpRelation
=
$tmpRelation
->
template
->
template_extend
;
$tmpRelation
->
tmpRelation
=
$tmpRelation
->
template
->
template_extend
;
$tmpRelation
->
saleOrder
=
$tmpRelation
->
saleOrder
;
$tmpRelation
->
saleOrder
=
$tmpRelation
->
saleOrder
;
// dump($tmpRelation);
// dump($tmpRelation->template);
// dump($tmpRelation->template->template_extend);
// dump($tmpRelation->saleOrder);
// dump($tmpRelation->tmpRelation->html);
// dump($tmpRelation->saleOrder);
$info
[
'templateInfo'
]
=
$tmpRelation
;
$info
[
'templateInfo'
]
=
$tmpRelation
;
$info
[
"ichunt2020"
][
"sale_order_sn"
]
=
$tmpRelation
->
saleOrder
->
sale_order_sn
;
$info
[
"ichunt2020"
][
"sale_order_sn"
]
=
$tmpRelation
->
saleOrder
->
sale_order_sn
;
$info
[
"ichunt2020"
][
"goods_type"
]
=
$tmpRelation
->
saleOrder
->
goods_type
;
$info
[
"ichunt2020"
][
"goods_type"
]
=
$tmpRelation
->
saleOrder
->
goods_type
;
$info
[
"ichunt2020"
][
"goods_brand"
]
=
$tmpRelation
->
saleOrder
->
goods_brand
;
$info
[
"ichunt2020"
][
"goods_brand"
]
=
$tmpRelation
->
saleOrder
->
goods_brand
;
$info
[
"ichunt2020"
][
"goods_number"
]
=
$tmpRelation
->
saleOrder
->
goods_number
;
$info
[
"ichunt2020"
][
"goods_number"
]
=
$tmpRelation
->
saleOrder
->
goods_number
;
$info
[
"ichunt2020"
][
"sku_code"
]
=
$tmpRelation
->
saleOrder
->
customer_code
;
$info
[
"ichunt2020"
][
"sku_code"
]
=
$tmpRelation
->
saleOrder
->
customer_code
;
$info
[
"ichunt2020"
][
"customer_type"
]
=
$tmpRelation
->
saleOrder
->
customer_type
;
$info
[
"ichunt2020"
][
"customer_code"
]
=
$tmpRelation
->
saleOrder
->
customer_code
;
// dump($info["ichunt2020"]);
$info
[
"ichunt2020"
][
"customer_com"
]
=
$tmpRelation
->
saleOrder
->
customer_com
;
try
{
$matches
=
[];
$matches
=
[];
$a
=
preg_match_all
(
'/<<<(.*?)>>>/i'
,
$tmpRelation
->
tmpRelation
->
html
,
$matches
);
$a
=
preg_match_all
(
'/<<<(.*?)>>>/i'
,
$tmpRelation
->
tmpRelation
->
html
,
$matches
);
// dump($matches);
foreach
(
$matches
[
1
]
as
$k
=>
$field
){
foreach
(
$matches
[
1
]
as
$k
=>
$field
){
$arr
[
$k
]
=
$info
[
"ichunt2020"
][
$field
]
;
$arr
[
$k
]
=
isset
(
$info
[
"ichunt2020"
][
$field
])
?
$info
[
"ichunt2020"
][
$field
]
:
''
;
}
}
if
(
!
empty
(
$matches
)){
if
(
!
empty
(
$matches
)){
$html
=
str_replace
(
$matches
[
0
],
$arr
,
$tmpRelation
->
tmpRelation
->
html
);
$html
=
str_replace
(
$matches
[
0
],
$arr
,
$tmpRelation
->
tmpRelation
->
html
);
...
@@ -140,10 +131,6 @@ class WebController extends Controller
...
@@ -140,10 +131,6 @@ class WebController extends Controller
$yiweimaits
=
$dom
->
find
(
"div[name='yiweimait']"
);
$yiweimaits
=
$dom
->
find
(
"div[name='yiweimait']"
);
foreach
(
$yiweimaits
as
$k
=>
$yiweimait
){
foreach
(
$yiweimaits
as
$k
=>
$yiweimait
){
// dump($yiweimait->imagesurl);
// dump($yiweimait->style);
// dump($yiweimait->datatypes);
// dump(DNS1D::getBarcodePNG($yiweimait->datatypes, "C128"));
$a
=
$yiweimait
->
style
;
$a
=
$yiweimait
->
style
;
$b
=
'data:image/png;base64,'
.
DNS1D
::
getBarcodePNG
(
$yiweimait
->
datatypes
,
"C128"
);
$b
=
'data:image/png;base64,'
.
DNS1D
::
getBarcodePNG
(
$yiweimait
->
datatypes
,
"C128"
);
...
@@ -156,16 +143,15 @@ class WebController extends Controller
...
@@ -156,16 +143,15 @@ class WebController extends Controller
$erweimas
=
$dom
->
find
(
"div[name='erweimait']"
);
$erweimas
=
$dom
->
find
(
"div[name='erweimait']"
);
foreach
(
$erweimas
as
$k
=>
$erweima
){
foreach
(
$erweimas
as
$k
=>
$erweima
){
// dump($erweima->datatypes);
$a
=
$erweima
->
style
;
$a
=
$erweima
->
style
;
$b
=
'data:image/png;base64,'
.
DNS2D
::
getBarcodePNG
(
$erweima
->
datatypes
,
"QRCODE"
);
$b
=
'data:image/png;base64,'
.
DNS2D
::
getBarcodePNG
(
$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
);
// dump($c);
$erweima
->
style
=
$c
;
$erweima
->
style
=
$c
;
}
}
//exit;
// dump($dom);
}
catch
(
\Exception
$e
){
// exit;
dump
(
$e
->
getMessage
());
}
// \View::make('admin.messages', $info["ichunt2020"]);
// \View::make('admin.messages', $info["ichunt2020"]);
// dump($html);exit;
// dump($html);exit;
...
...
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