Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-Server
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
李帅
2023-05-18 22:05:41 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1fd367c29714f805d8212cf4b925e3e2f3e2c3b2
1fd367c2
1 parent
f4beb6e4
1.修复一些bug
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
app/Jobs/AdminMakeImmerse.php
app/Jobs/UserMakeImmerse.php
app/Jobs/AdminMakeImmerse.php
View file @
1fd367c
...
...
@@ -228,7 +228,7 @@ class AdminMakeImmerse implements ShouldQueue
if
(
$item
->
content
){
if
(
$item
->
source
){
$contents
[]
=
[
"text"
=>
$this
->
autoEnter
(
$item
->
content
,
$font_size
,
$this
->
output_width
)
.
"
\n
"
.
$
this
->
autoCenter
(
$item
->
source
,
$font_size
,
$this
->
output_width
)
,
"text"
=>
$this
->
autoEnter
(
$item
->
content
,
$font_size
,
$this
->
output_width
)
.
"
\n
"
.
$
item
->
source
,
"tag"
=>
"source"
];
}
else
{
...
...
@@ -399,7 +399,7 @@ class AdminMakeImmerse implements ShouldQueue
public
function
autoEnter
(
$string
,
$font_width
,
$video_width
)
{
$video_width
=
$video_width
-
2
*
$font_width
;
// 两侧留出空隙
$video_width
=
$video_width
-
1
*
$font_width
;
// 两侧留出空隙
$row_count
=
floor
(
$video_width
/
$font_width
);
echo
$string
.
"#"
.
$row_count
.
PHP_EOL
;
$str_len
=
mb_strlen
(
$string
);
...
...
@@ -418,7 +418,7 @@ class AdminMakeImmerse implements ShouldQueue
public
function
autoCenter
(
$string
,
$font_width
,
$video_width
)
{
$video_width
=
$video_width
-
2
*
$font_width
;
// 两侧留出空隙
$video_width
=
$video_width
-
1
*
$font_width
;
// 两侧留出空隙
$row_count
=
floor
(
$video_width
/
$font_width
);
$arr
=
explode
(
"
\n
"
,
$string
);
$title
=
$arr
[
0
]
??
" "
;
...
...
app/Jobs/UserMakeImmerse.php
View file @
1fd367c
...
...
@@ -692,7 +692,7 @@ class UserMakeImmerse implements ShouldQueue
public
function
autoEnter
(
$string
,
$font_width
,
$video_width
)
{
$video_width
=
$video_width
-
2
*
$font_width
;
// 两侧留出空隙
$video_width
=
$video_width
-
1
*
$font_width
;
// 两侧留出空隙
$row_count
=
floor
(
$video_width
/
$font_width
);
echo
$row_count
;
$str_len
=
mb_strlen
(
$string
);
...
...
@@ -711,7 +711,7 @@ class UserMakeImmerse implements ShouldQueue
public
function
autoCenter
(
$string
,
$font_width
,
$video_width
)
{
$video_width
=
$video_width
-
2
*
$font_width
;
// 两侧留出空隙
$video_width
=
$video_width
-
1
*
$font_width
;
// 两侧留出空隙
$row_count
=
floor
(
$video_width
/
$font_width
);
$arr
=
explode
(
"
\n
"
,
$string
);
$title
=
$arr
[
0
];
...
...
Please
register
or
login
to post a comment