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
李帅
2022-12-26 16:12:17 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
26af4b6de7d396eab8077c409f70f237cca8f4c2
26af4b6d
1 parent
5ebf927e
1.微调一下接口,打印参数
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
83 additions
and
15 deletions
app/Admin/Controllers/PickPoetryVerseController.php
app/Admin/bootstrap.php
app/Jobs/SendVerificationMessage.php
app/Models/Push.php
database/migrations/2022_12_26_160224_create_pushes_table.php
resources/views/admin/form/membership.blade.php
resources/views/admin/form/phone.blade.php
resources/views/admin/form/push.blade.php
resources/views/mail/verify_code.blade.php
app/Admin/Controllers/PickPoetryVerseController.php
View file @
26af4b6
...
...
@@ -69,8 +69,7 @@ class PickPoetryVerseController extends AdminController
// 设置字段宽度
$form
->
width
(
8
,
3
);
$form
->
radio
(
'plant'
)
->
addElementClass
(
'plant'
)
$form
->
radio
(
'terminal'
)
->
addElementClass
(
'terminal'
)
->
options
([
1
=>
'Android'
,
2
=>
'IOS'
])
->
default
(
2
);
$form
->
text
(
'title'
)
->
addElementClass
(
'title'
);
...
...
@@ -86,7 +85,7 @@ class PickPoetryVerseController extends AdminController
$form
->
radio
(
'user_type'
,
'目标人群'
)
->
options
([
1
=>
'所有人'
,
2
=>
'指定用户'
])
->
default
(
1
)
->
when
(
2
,
function
(
Form\BlockForm
$form
)
{
$form
->
text
(
'user_id'
);
$form
->
text
(
'user_id'
)
->
placeholder
(
"多个用户用逗号,分开"
)
;
});
});
...
...
app/Admin/bootstrap.php
View file @
26af4b6
...
...
@@ -32,4 +32,4 @@ Admin::asset()->alias('@css', '/asset/css');
Column
::
extend
(
'gallery'
,
Gallery
::
class
);
//grid列扩展 - 多图浏览
Map
::
requireAssets
();
// 引入地图资源
//
Map::requireAssets(); // 引入地图资源
...
...
app/Jobs/SendVerificationMessage.php
View file @
26af4b6
...
...
@@ -75,7 +75,13 @@ class SendVerificationMessage implements ShouldQueue
$context
=
stream_context_create
(
$options
);
$result_json
=
file_get_contents
(
$api
,
FILE_TEXT
,
$context
);
Log
::
channel
(
'daily'
)
->
debug
(
$result_json
);
$result
=
json_decode
(
$result_json
,
true
);
if
(
$result
[
'result'
]
==
false
){
Log
::
channel
(
'daily'
)
->
debug
(
$result_json
);
// 用开发模板发送。
Mail
::
to
(
$this
->
email
)
->
send
(
new
SendVerifyCode
(
$code
));
}
}
}
...
...
app/Models/Push.php
0 → 100644
View file @
26af4b6
<?php
namespace
App\Models
;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\Model
;
class
Push
extends
Model
{
use
HasFactory
;
}
database/migrations/2022_12_26_160224_create_pushes_table.php
0 → 100644
View file @
26af4b6
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreatePushesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'pushes'
,
function
(
Blueprint
$table
)
{
$table
->
id
();
$table
->
string
(
'title'
)
->
comment
(
'标题'
);
$table
->
unsignedTinyInteger
(
'terminal'
)
->
comment
(
'1=Android,2=IOS'
);
$table
->
unsignedTinyInteger
(
'push_type'
)
->
comment
(
'1=立即,2=定时'
);
$table
->
timestamp
(
'push_time'
)
->
comment
(
'推送时间'
);
$table
->
string
(
'action_type'
)
->
comment
(
'动作类型'
);
$table
->
unsignedTinyInteger
(
'user_type'
)
->
comment
(
'目标人群1=所有人,2=指定用户'
);
$table
->
string
(
'user_id'
)
->
comment
(
'用户id'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'pushes'
);
}
}
resources/views/admin/form/membership.blade.php
View file @
26af4b6
...
...
@@ -73,7 +73,7 @@
<div
class=
"box-card"
>
<div
class=
"phone-content"
>
<div
class=
"text"
>
会员页
</div>
<img
src=
"{{asset('storage/image/mobile-head.png')}}"
alt=
""
width=
"338"
height=
"80"
>
<img
src=
"{{asset('storage/image
s
/mobile-head.png')}}"
alt=
""
width=
"338"
height=
"80"
>
<div
style=
"min-height: 625px;"
>
<img
width=
"338"
height=
"625"
class=
"bg_img"
src=
"{{asset('storage/images/a5fe2ba2bd71b543cbf4c6fb3968ab64.png')}}"
>
</div>
...
...
resources/views/admin/form/phone.blade.php
View file @
26af4b6
...
...
@@ -62,7 +62,7 @@
<div
class=
"box-card"
>
<div
class=
"phone-content"
>
<div
class=
"text"
>
模板
</div>
<img
src=
"{{asset('storage/image/mobile-head.png')}}"
alt=
""
width=
"360"
height=
"80"
>
<img
src=
"{{asset('storage/image
s
/mobile-head.png')}}"
alt=
""
width=
"360"
height=
"80"
>
<div
class=
"bg-box"
>
<img
width=
"360"
height=
"625"
class=
"bg_img"
style=
"display: none"
>
<video
width=
"360"
height=
"625"
id=
"bg_video"
style=
"display: none"
></video>
...
...
resources/views/admin/form/push.blade.php
View file @
26af4b6
...
...
@@ -50,7 +50,7 @@
<hr>
<div
class=
"box-card"
>
<div
class=
"phone-content"
>
<img
src=
"{{asset('storage/image/ios1-2.png')}}"
alt=
""
width=
"358"
height=
"625"
id=
"bg_img"
>
<img
src=
"{{asset('storage/image
s
/ios1-2.png')}}"
alt=
""
width=
"358"
height=
"625"
id=
"bg_img"
>
<div
class=
"notification-app-name"
>
一言-临境
</div>
<div
class=
"notification-title"
>
Demo 标题
</div>
<div
class=
"notification-detail"
>
开发者249d42a097c1944e进行了广播推送,这是一条广播
</div>
...
...
@@ -62,14 +62,14 @@
var
asset
=
"{{asset('/storage/')}}"
;
$
(
document
).
off
(
'click'
,
'.sync'
).
on
(
'click'
,
'.sync'
,
function
()
{
let
plant
=
parseInt
(
$
(
'.plant
:checked'
).
val
());
if
(
plant
===
1
)
{
$
(
'#bg_img'
).
attr
(
'src'
,
asset
+
'/image/android-2.png'
);
let
terminal
=
parseInt
(
$
(
'.terminal
:checked'
).
val
());
if
(
terminal
===
1
)
{
$
(
'#bg_img'
).
attr
(
'src'
,
asset
+
'/image
s
/android-2.png'
);
$
(
'.notification-app-name'
).
css
(
'top'
,
'244px'
).
css
(
'left'
,
'80px'
);
$
(
'.notification-title'
).
css
(
'top'
,
'264px'
).
css
(
'left'
,
'57px'
);
$
(
'.notification-detail'
).
css
(
'top'
,
'287px'
).
css
(
'left'
,
'57px'
);
}
else
{
$
(
'#bg_img'
).
attr
(
'src'
,
asset
+
'/image/ios1-2.png'
);
$
(
'#bg_img'
).
attr
(
'src'
,
asset
+
'/image
s
/ios1-2.png'
);
$
(
'.notification-app-name'
).
css
(
'top'
,
'222px'
).
css
(
'left'
,
'92px'
);
$
(
'.notification-title'
).
css
(
'top'
,
'242px'
).
css
(
'left'
,
'67px'
);
$
(
'.notification-detail'
).
css
(
'top'
,
'265px'
).
css
(
'left'
,
'67px'
);
...
...
resources/views/mail/verify_code.blade.php
View file @
26af4b6
<body>
<h5>
Set up your account verify code
</h5>
<p>
your code: {{$code}}
</p>
<p>
The code will expire in 30 minutes.
</p>
<div
style=
"width:700px;margin:0 auto;border-bottom:1px solid #ccc; border-top:1px solid #ccc; padding:30px"
>
<div
style=
"line-height:1.5;font-size:14px;margin-bottom:25px;color:#4d4d4d;"
>
<p
style=
"margin-bottom:15px;"
>
尊敬的用户:您好!(Dear User)
</p>
<p
style=
"margin-bottom:15px;"
>
您正在进行注册账号操作,请在验证码输入框中输入:(You are registering an account, please enter in the verification code input box: )
<span
style=
"color:#000b16;font-size: 24px"
>
{{$code}}
</span>
,以完成操作。(,to complete the operation.)
</p>
<p>
验证码有效期为30分钟(The code will expire in 30 minutes.)
</p>
</div>
<div
style=
"padding:10px 10px 0;margin-bottom:20px;line-height:1.3em;font-size:12px;"
>
<p>
此为系统邮件,请勿回复(This is a system email, please do not reply.)
<br>
请保管好您的邮箱,避免账号被他人盗用(Please take good care of your email to prevent your account from being stolen by others.)
</p>
<p>
Parlando Network Technology Team
</p>
</div>
</div>
</body>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment