浏览代码

Merge branch 'develop' of http://git.caihongxingqiu.net/rainbow/config-manage into develop

caihongxingqiu 5 年之前
父节点
当前提交
d23abbcdb2

+ 0 - 1
.rocketeer/hooks.php

@@ -26,7 +26,6 @@ return [
         'setup'   => [],
         'deploy'  => [
             'composer dumpautoload',
-            'php artisan route:clear',
             'chmod -R 777 bootstrap',
             'chmod -R 777 storage',
             'chmod -R 777 public'

+ 1 - 0
app/Http/Controllers/V2/PlatformContentController.php

@@ -67,6 +67,7 @@ class PlatformContentController extends BaseController
         $validator = Validator::make($request->all(), [
             'id' => 'required|exists:platform_content',
             'content' => 'required',
+            'title' => 'string',
         ]);
 
         if ($validator->fails()) {

+ 3 - 0
app/Repositories/PlatformContentRepository.php

@@ -53,6 +53,9 @@ class PlatformContentRepository
         $platforms = $this->platformContent->where('id', $request['id'])->first();
         $platforms->content = $request['content'];
         $platforms->updated_at = date('Y-m-d H:i:s');
+        if (isset($request['title'])){
+            $platforms->title = $request['title'];
+        }
 
         $res = $platforms->save();
         if (!$res) {

+ 3 - 3
config/filesystems.php

@@ -66,9 +66,9 @@ return [
 
         'oss' => [
             'driver' => 'oss',
-            'access_id' => 'LTAIGTDKUOVQf2Ln',
-            'access_key' => 'HzY9r2gDPbURQ0Vp69A7THV0RmxMkb',
-            'bucket' => 'rainbowstar',
+            'access_id' => 'LTAIG2eCY5UdheM1',
+            'access_key' => '4RJTcJkZsOJIby2oewUFHqUJxUR1vm',
+            'bucket' => 'uptoyo',
             'endpoint' => 'oss-cn-zhangjiakou.aliyuncs.com', // OSS 外网节点或自定义外部域名
 //            'endpoint_internal' => '<internal endpoint [OSS内网节点] 如:oss-cn-shenzhen-internal.aliyuncs.com>', // v2.0.4 新增配置属性,如果为空,则默认使用 endpoint 配置(由于内网上传有点小问题未解决,请大家暂时不要使用内网节点上传,正在与阿里技术沟通中)
             'cdnDomain' => '', // 如果isCName为true, getUrl会判断cdnDomain是否设定来决定返回的url,如果cdnDomain未设置,则使用endpoint来生成url,否则使用cdn

+ 32 - 0
database/migrations/2019_08_14_011709_add_idx_status_to_star_news_table.php

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddIdxStatusToStarNewsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('star_news', function (Blueprint $table) {
+            $table->index('status','idx_status');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('star_news', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 25 - 1
database/seeds/PlatformContentTableSeeder.php

@@ -46,7 +46,13 @@ class PlatformContentTableSeeder extends Seeder
                 'updated_at'    => $date
             ],
             [
-                'title'   => '用户协议',
+                'title'   => '“由你”用户协议',
+                'content'    => '这里有好多好多的内容~',
+                'created_at'    => $date,
+                'updated_at'    => $date
+            ],
+            [
+                'title'   => '“由你”隐私政策',
                 'content'    => '这里有好多好多的内容~',
                 'created_at'    => $date,
                 'updated_at'    => $date
@@ -57,6 +63,24 @@ class PlatformContentTableSeeder extends Seeder
                 'created_at'    => $date,
                 'updated_at'    => $date
             ],
+            [
+                'title'   => '《中国联通认证服务条款》',
+                'content'    => '这里有好多好多的内容~',
+                'created_at'    => $date,
+                'updated_at'    => $date
+            ],
+            [
+                'title'   => '《中国电信认证服务条款》',
+                'content'    => '这里有好多好多的内容~',
+                'created_at'    => $date,
+                'updated_at'    => $date
+            ],
+            [
+                'title'   => '《中国移动认证服务条款》',
+                'content'    => '这里有好多好多的内容~',
+                'created_at'    => $date,
+                'updated_at'    => $date
+            ],
         ]);
     }
 }

+ 1 - 1
routes/web.php

@@ -12,7 +12,7 @@
 */
 
 $router->get('/', function () use ($router) {
-    return $router->app->version().'-admin-11112222';
+    return '欢迎来到由你';
 });
 
 $router->post('/auth/login','AuthController@login');