Showing
9 changed files
with
83 additions
and
15 deletions
| ... | @@ -69,8 +69,7 @@ class PickPoetryVerseController extends AdminController | ... | @@ -69,8 +69,7 @@ class PickPoetryVerseController extends AdminController |
| 69 | // 设置字段宽度 | 69 | // 设置字段宽度 |
| 70 | $form->width(8, 3); | 70 | $form->width(8, 3); |
| 71 | 71 | ||
| 72 | - | 72 | + $form->radio('terminal')->addElementClass('terminal') |
| 73 | - $form->radio('plant')->addElementClass('plant') | ||
| 74 | ->options([1 => 'Android', 2 => 'IOS'])->default(2); | 73 | ->options([1 => 'Android', 2 => 'IOS'])->default(2); |
| 75 | 74 | ||
| 76 | $form->text('title')->addElementClass('title'); | 75 | $form->text('title')->addElementClass('title'); |
| ... | @@ -86,7 +85,7 @@ class PickPoetryVerseController extends AdminController | ... | @@ -86,7 +85,7 @@ class PickPoetryVerseController extends AdminController |
| 86 | 85 | ||
| 87 | $form->radio('user_type', '目标人群')->options([1 => '所有人', 2 => '指定用户'])->default(1) | 86 | $form->radio('user_type', '目标人群')->options([1 => '所有人', 2 => '指定用户'])->default(1) |
| 88 | ->when(2, function (Form\BlockForm $form) { | 87 | ->when(2, function (Form\BlockForm $form) { |
| 89 | - $form->text('user_id'); | 88 | + $form->text('user_id')->placeholder("多个用户用逗号,分开"); |
| 90 | }); | 89 | }); |
| 91 | }); | 90 | }); |
| 92 | 91 | ... | ... |
| ... | @@ -32,4 +32,4 @@ Admin::asset()->alias('@css', '/asset/css'); | ... | @@ -32,4 +32,4 @@ Admin::asset()->alias('@css', '/asset/css'); |
| 32 | 32 | ||
| 33 | Column::extend('gallery', Gallery::class); //grid列扩展 - 多图浏览 | 33 | Column::extend('gallery', Gallery::class); //grid列扩展 - 多图浏览 |
| 34 | 34 | ||
| 35 | -Map::requireAssets(); // 引入地图资源 | 35 | +//Map::requireAssets(); // 引入地图资源 | ... | ... |
| ... | @@ -75,7 +75,13 @@ class SendVerificationMessage implements ShouldQueue | ... | @@ -75,7 +75,13 @@ class SendVerificationMessage implements ShouldQueue |
| 75 | $context = stream_context_create($options); | 75 | $context = stream_context_create($options); |
| 76 | $result_json = file_get_contents($api, FILE_TEXT, $context); | 76 | $result_json = file_get_contents($api, FILE_TEXT, $context); |
| 77 | 77 | ||
| 78 | - Log::channel('daily')->debug($result_json); | 78 | + $result = json_decode($result_json,true); |
| 79 | + if ($result['result'] == false){ | ||
| 80 | + Log::channel('daily')->debug($result_json); | ||
| 81 | + | ||
| 82 | + // 用开发模板发送。 | ||
| 83 | + Mail::to($this->email)->send(new SendVerifyCode($code)); | ||
| 84 | + } | ||
| 79 | 85 | ||
| 80 | } | 86 | } |
| 81 | } | 87 | } | ... | ... |
app/Models/Push.php
0 → 100644
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +use Illuminate\Database\Migrations\Migration; | ||
| 4 | +use Illuminate\Database\Schema\Blueprint; | ||
| 5 | +use Illuminate\Support\Facades\Schema; | ||
| 6 | + | ||
| 7 | +class CreatePushesTable extends Migration | ||
| 8 | +{ | ||
| 9 | + /** | ||
| 10 | + * Run the migrations. | ||
| 11 | + * | ||
| 12 | + * @return void | ||
| 13 | + */ | ||
| 14 | + public function up() | ||
| 15 | + { | ||
| 16 | + Schema::create('pushes', function (Blueprint $table) { | ||
| 17 | + $table->id(); | ||
| 18 | + $table->string('title')->comment('标题'); | ||
| 19 | + $table->unsignedTinyInteger('terminal')->comment('1=Android,2=IOS'); | ||
| 20 | + $table->unsignedTinyInteger('push_type')->comment('1=立即,2=定时'); | ||
| 21 | + $table->timestamp('push_time')->comment('推送时间'); | ||
| 22 | + $table->string('action_type')->comment('动作类型'); | ||
| 23 | + $table->unsignedTinyInteger('user_type')->comment('目标人群1=所有人,2=指定用户'); | ||
| 24 | + $table->string('user_id')->comment('用户id'); | ||
| 25 | + $table->timestamps(); | ||
| 26 | + }); | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * Reverse the migrations. | ||
| 31 | + * | ||
| 32 | + * @return void | ||
| 33 | + */ | ||
| 34 | + public function down() | ||
| 35 | + { | ||
| 36 | + Schema::dropIfExists('pushes'); | ||
| 37 | + } | ||
| 38 | +} |
| ... | @@ -73,7 +73,7 @@ | ... | @@ -73,7 +73,7 @@ |
| 73 | <div class="box-card"> | 73 | <div class="box-card"> |
| 74 | <div class="phone-content"> | 74 | <div class="phone-content"> |
| 75 | <div class="text">会员页</div> | 75 | <div class="text">会员页</div> |
| 76 | - <img src="{{asset('storage/image/mobile-head.png')}}" alt="" width="338" height="80"> | 76 | + <img src="{{asset('storage/images/mobile-head.png')}}" alt="" width="338" height="80"> |
| 77 | <div style="min-height: 625px;"> | 77 | <div style="min-height: 625px;"> |
| 78 | <img width="338" height="625" class="bg_img" src="{{asset('storage/images/a5fe2ba2bd71b543cbf4c6fb3968ab64.png')}}"> | 78 | <img width="338" height="625" class="bg_img" src="{{asset('storage/images/a5fe2ba2bd71b543cbf4c6fb3968ab64.png')}}"> |
| 79 | </div> | 79 | </div> | ... | ... |
| ... | @@ -62,7 +62,7 @@ | ... | @@ -62,7 +62,7 @@ |
| 62 | <div class="box-card"> | 62 | <div class="box-card"> |
| 63 | <div class="phone-content"> | 63 | <div class="phone-content"> |
| 64 | <div class="text">模板</div> | 64 | <div class="text">模板</div> |
| 65 | - <img src="{{asset('storage/image/mobile-head.png')}}" alt="" width="360" height="80"> | 65 | + <img src="{{asset('storage/images/mobile-head.png')}}" alt="" width="360" height="80"> |
| 66 | <div class="bg-box"> | 66 | <div class="bg-box"> |
| 67 | <img width="360" height="625" class="bg_img" style="display: none"> | 67 | <img width="360" height="625" class="bg_img" style="display: none"> |
| 68 | <video width="360" height="625" id="bg_video" style="display: none"></video> | 68 | <video width="360" height="625" id="bg_video" style="display: none"></video> | ... | ... |
| ... | @@ -50,7 +50,7 @@ | ... | @@ -50,7 +50,7 @@ |
| 50 | <hr> | 50 | <hr> |
| 51 | <div class="box-card"> | 51 | <div class="box-card"> |
| 52 | <div class="phone-content"> | 52 | <div class="phone-content"> |
| 53 | - <img src="{{asset('storage/image/ios1-2.png')}}" alt="" width="358" height="625" id="bg_img"> | 53 | + <img src="{{asset('storage/images/ios1-2.png')}}" alt="" width="358" height="625" id="bg_img"> |
| 54 | <div class="notification-app-name"> 一言-临境 </div> | 54 | <div class="notification-app-name"> 一言-临境 </div> |
| 55 | <div class="notification-title"> Demo 标题 </div> | 55 | <div class="notification-title"> Demo 标题 </div> |
| 56 | <div class="notification-detail"> 开发者249d42a097c1944e进行了广播推送,这是一条广播 </div> | 56 | <div class="notification-detail"> 开发者249d42a097c1944e进行了广播推送,这是一条广播 </div> |
| ... | @@ -62,14 +62,14 @@ | ... | @@ -62,14 +62,14 @@ |
| 62 | var asset = "{{asset('/storage/')}}"; | 62 | var asset = "{{asset('/storage/')}}"; |
| 63 | 63 | ||
| 64 | $(document).off('click', '.sync').on('click', '.sync', function () { | 64 | $(document).off('click', '.sync').on('click', '.sync', function () { |
| 65 | - let plant = parseInt($('.plant:checked').val()); | 65 | + let terminal = parseInt($('.terminal:checked').val()); |
| 66 | - if (plant === 1) { | 66 | + if (terminal === 1) { |
| 67 | - $('#bg_img').attr('src', asset + '/image/android-2.png'); | 67 | + $('#bg_img').attr('src', asset + '/images/android-2.png'); |
| 68 | $('.notification-app-name').css('top','244px').css('left','80px'); | 68 | $('.notification-app-name').css('top','244px').css('left','80px'); |
| 69 | $('.notification-title').css('top','264px').css('left','57px'); | 69 | $('.notification-title').css('top','264px').css('left','57px'); |
| 70 | $('.notification-detail').css('top','287px').css('left','57px'); | 70 | $('.notification-detail').css('top','287px').css('left','57px'); |
| 71 | }else{ | 71 | }else{ |
| 72 | - $('#bg_img').attr('src', asset + '/image/ios1-2.png'); | 72 | + $('#bg_img').attr('src', asset + '/images/ios1-2.png'); |
| 73 | $('.notification-app-name').css('top','222px').css('left','92px'); | 73 | $('.notification-app-name').css('top','222px').css('left','92px'); |
| 74 | $('.notification-title').css('top','242px').css('left','67px'); | 74 | $('.notification-title').css('top','242px').css('left','67px'); |
| 75 | $('.notification-detail').css('top','265px').css('left','67px'); | 75 | $('.notification-detail').css('top','265px').css('left','67px'); | ... | ... |
| 1 | <body> | 1 | <body> |
| 2 | - <h5>Set up your account verify code</h5> | 2 | +<div style="width:700px;margin:0 auto;border-bottom:1px solid #ccc; border-top:1px solid #ccc; padding:30px"> |
| 3 | - <p>your code: {{$code}}</p> | 3 | + <div style="line-height:1.5;font-size:14px;margin-bottom:25px;color:#4d4d4d;"> |
| 4 | - <p>The code will expire in 30 minutes.</p> | 4 | + <p style="margin-bottom:15px;">尊敬的用户:您好!(Dear User)</p> |
| 5 | + <p style="margin-bottom:15px;"> | ||
| 6 | + 您正在进行注册账号操作,请在验证码输入框中输入:(You are registering an account, please enter in the verification code input box: ) | ||
| 7 | + <span style="color:#000b16;font-size: 24px">{{$code}}</span>,以完成操作。(,to complete the operation.) | ||
| 8 | + </p> | ||
| 9 | + | ||
| 10 | + <p>验证码有效期为30分钟(The code will expire in 30 minutes.)</p> | ||
| 11 | + </div> | ||
| 12 | + <div style="padding:10px 10px 0;margin-bottom:20px;line-height:1.3em;font-size:12px;"> | ||
| 13 | + <p>此为系统邮件,请勿回复(This is a system email, please do not reply.)<br> | ||
| 14 | + 请保管好您的邮箱,避免账号被他人盗用(Please take good care of your email to prevent your account from being stolen by others.) | ||
| 15 | + </p> | ||
| 16 | + <p>Parlando Network Technology Team</p> | ||
| 17 | + </div> | ||
| 18 | +</div> | ||
| 5 | </body> | 19 | </body> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment