dyjh il y a 6 ans
Parent
commit
320392ecb6

+ 3 - 3
app/Http/Controllers/Api/V1/AlbumPosterController.php

xqd
@@ -215,13 +215,13 @@ class AlbumPosterController extends Controller
             $name = $agent_check->realname;
             $phone = $agent_check->phone;
         }
-        $editor->text($image_poster, $phone, 12, 29, 264, new Color("#eb7a48"), $font, 0);
-        $editor->text($image_poster, '长按识别二维码 展示家具画册', 8, 5, 309, new Color("#666666"), $font, 0);
+        $editor->text($image_poster, $phone, 12, 29, 274, new Color("#eb7a48"), $font, 0);
+        $editor->text($image_poster, '长按识别二维码 展示家具画册', 8, 5, 316, new Color("#666666"), $font, 0);
         $editor->open($image_qrcode, str_replace(env('CDN_URL'), public_path(), $info['qrcode']));
         $editor->resizeExactWidth($image_qrcode, 70);
         $editor->resizeExactHeight($image_qrcode, 70);
         $editor->blend($image_poster, $image_qrcode, 'normal', 1, 'top-left', 150, 235);
-        $editor->text($image_poster, $name, 8, 155, 316, new Color("#666666"), $font, 0);
+        $editor->text($image_poster, $name, 8, 188 - (11 * (mb_strlen($name) / 2)), 316, new Color("#666666"), $font, 0);
         $editor->save($image_poster, public_path() . '/base/poster/download/' . $userAuth->id . '.png');
         $real_url = env('CDN_URL') . '/base/poster/download/' . $userAuth->id . '.png';
         return $this->api(compact('real_url'));

+ 34 - 0
database/migrations/2019_03_06_095038_add_colunm__a_p_p_i_d_to_album_manufacturer.php

xqd
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddColunmAPPIDToAlbumManufacturer extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('album_manufacturer', function (Blueprint $table) {
+            //
+            $table->string('G_app_id', 100)->comment('公众号appid');
+            $table->string('G_app_secret', 150)->comment('公众号appsecret');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('album_manufacturer', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 25 - 0
resources/views/admin/album/manufacturer/edit.blade.php

xqd
@@ -113,6 +113,31 @@
                                             </div>
 
                                         </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">公众号appID</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_service_app_id" name="data[service_app_id]"
+                                                   class="form-control"
+                                                   value="{{ $data['service_app_id'] or ''}}" required=""
+                                                   aria-required="true"
+                                                   placeholder="">
+                                        </div>
+
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">公众号appSecret</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_service_app_secret" name="data[service_app_secret]"
+                                                   class="form-control"
+                                                   value="{{ $data['g_app_secret'] or ''}}" required=""
+                                                   aria-required="true" placeholder="">
+                                        </div>
+
+                                    </div>
                                         <div class="form-group">
 
                                             <label class="control-label col-sm-3">打印机型号</label>