dyjh 6 年 前
コミット
38aa47edbf

+ 6 - 1
app/Http/Controllers/Admin/Album/ManufacturerController.php

xqd xqd
@@ -180,7 +180,9 @@ class ManufacturerController extends Controller
         if (!empty($data['logo'])) {
             $data['logo'] = $this->formatImgUrl($data['logo']);
         }
-
+        if (!empty($data['qrcode'])) {
+            $data['qrcode'] = $this->formatImgUrl($data['qrcode']);
+        }
         if (!empty($data['share_image'])) {
             $data['share'] = $this->formatImgUrl($data['share_image']);
         }
@@ -245,6 +247,9 @@ class ManufacturerController extends Controller
         if (!empty($data['share_image'])) {
             $data['share'] = $this->formatImgUrl($data['share_image']);
         }
+        if (!empty($data['qrcode'])) {
+            $data['qrcode'] = $this->formatImgUrl($data['qrcode']);
+        }
         if (!empty($data['notice_icon'])) {
             $data['notice_icon'] = $this->formatImgUrl($data['notice_icon']);
            // $this->deleteUrl($saveData->notice_icon);

+ 1 - 0
app/Models/AlbumManufacturerModel.php

xqd
@@ -37,6 +37,7 @@ class AlbumManufacturerModel extends BaseModel
         'app_id',
         'app_secret',
         'banner',
+        'qrcode',
         'logo',
         'service_app_secret',
         'wxFurniture_template_id',

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

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddQrcodeToAlbumManufacturer extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('album_manufacturer', function (Blueprint $table) {
+            $table->string('qrcode', 255)->nullable()->default(null);
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('album_manufacturer', function (Blueprint $table) {
+            //
+        });
+    }
+}

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

xqd
@@ -59,7 +59,14 @@
 
                                         </div>
 
+                                    <div class="form-group">
 
+                                        <label class="control-label col-sm-3">厂家二维码(430像素 * 430像素)</label>
+                                        <div class="col-sm-9">
+                                            {!!  widget('Tools.ImgUpload')->single2('/upload/qrcode','qrcode',"qrcode",  isset($data['qrcode'])? $data['qrcode'] : '',array("sizex"=>430,"sizey"=>430)) !!}
+                                        </div>
+
+                                    </div>