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
f088f2e0
authored
May 12, 2020
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
7247edee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
5 deletions
app/Http/Controllers/WebController.php
resources/views/web/showPage.blade.php
app/Http/Controllers/WebController.php
View file @
f088f2e0
...
...
@@ -103,10 +103,29 @@ class WebController extends Controller
// dump($tmpRelation->template->template_extend);
// dump($tmpRelation->saleOrder);
dump
(
$tmpRelation
->
tmpRelation
->
html
);
dump
(
$tmpRelation
->
saleOrder
);
//
dump($tmpRelation->tmpRelation->html);
//
dump($tmpRelation->saleOrder);
$info
[
'templateInfo'
]
=
$tmpRelation
;
// dump($info);
$info
[
"ichunt2020"
][
"sale_order_sn"
]
=
$tmpRelation
->
saleOrder
->
sale_order_sn
;
$info
[
"ichunt2020"
][
"goods_type"
]
=
$tmpRelation
->
saleOrder
->
goods_type
;
$info
[
"ichunt2020"
][
"goods_brand"
]
=
$tmpRelation
->
saleOrder
->
goods_brand
;
$info
[
"ichunt2020"
][
"goods_number"
]
=
$tmpRelation
->
saleOrder
->
goods_number
;
$info
[
"ichunt2020"
][
"sku_code"
]
=
$tmpRelation
->
saleOrder
->
customer_code
;
$info
[
"ichunt2020"
][
"customer_type"
]
=
$tmpRelation
->
saleOrder
->
customer_type
;
// dump($info["ichunt2020"]);
$matches
=
[];
$a
=
preg_match_all
(
'/<<<(.*?)>>>/i'
,
$tmpRelation
->
tmpRelation
->
html
,
$matches
);
// dump($matches);
foreach
(
$matches
[
1
]
as
$k
=>
$field
){
$arr
[
$k
]
=
$info
[
"ichunt2020"
][
$field
];
}
$html
=
str_replace
(
$matches
[
0
],
$arr
,
$tmpRelation
->
tmpRelation
->
html
);
// \View::make('admin.messages', $info["ichunt2020"]);
// dump($html);exit;
$info
[
"html"
]
=
$html
;
return
view
(
'web'
,
$info
);
}
...
...
resources/views/web/showPage.blade.php
View file @
f088f2e0
{
!!
$templateInfo
->
tmpRelation
->
html
!!
}
\ No newline at end of file
{
!!
$html
!!
}
<
script
>
// alert(567)
</
script
>
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