zhangchangchun 6 éve
szülő
commit
0054c26600

+ 1 - 1
app/Http/Controllers/V1/AuthController.php

@@ -55,7 +55,7 @@ class AuthController extends Controller {
         if ($validator->fails()) {
         if ($validator->fails()) {
             return $this->jsonError($validator->errors()->first());
             return $this->jsonError($validator->errors()->first());
         }
         }
-        $account = ShopAccount::where('account',$data['account'])->first();
+        $account = ShopAccount::where(['account'=>$data['account'],'status'=>1])->first();
         if(!$account){
         if(!$account){
             return $this->jsonError('登录失败,请重试');
             return $this->jsonError('登录失败,请重试');
         }
         }

+ 34 - 0
app/Http/Controllers/V1/ConfigController.php

@@ -0,0 +1,34 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: Administrator
+ * Date: 2019-04-26
+ * Time: 10:30
+ */
+
+namespace App\Http\Controllers\V1;
+
+
+use App\MemberAttr;
+
+class ConfigController extends Controller {
+
+    public function __construct( )
+    {
+    }
+    //公共参数
+    public function index(){
+        return [
+            //订单状态 0-待付款 1-待发货 2-已发货 3-配送中 4-待自提 5-已自提 6-已完成  7-已关闭
+            'status'=>[
+                '1' =>'正常' ,
+                '0' =>'禁用',
+
+            ],
+            'verify_type'=>[
+                '1' => '不需审核',
+                '0' =>'需要审核',
+            ],
+        ];
+    }
+}

+ 1 - 1
database/migrations/2019_04_28_172009_create_shops_table.php

@@ -26,7 +26,7 @@ class CreateShopsTable extends Migration
             $table->string('contact_mobile',16)->nullable()->default('')->comment('联系人电话');
             $table->string('contact_mobile',16)->nullable()->default('')->comment('联系人电话');
             $table->string('contact_name')->nullable()->default('')->comment('联系人名称');
             $table->string('contact_name')->nullable()->default('')->comment('联系人名称');
             $table->string('shop_desc')->nullable()->default('')->comment('商家介绍');
             $table->string('shop_desc')->nullable()->default('')->comment('商家介绍');
-            $table->tinyInteger('status')->default(1)->comment('状态 0启用 1禁用');
+            $table->tinyInteger('status')->default(1)->comment('状态 1启用 0禁用');
             $table->string('logo_img')->nullable()->default('')->comment('商家logo');
             $table->string('logo_img')->nullable()->default('')->comment('商家logo');
             $table->string('license_img')->comment('营业执照');
             $table->string('license_img')->comment('营业执照');
             $table->string('food_trans_license')->comment('食品流通许可证');
             $table->string('food_trans_license')->comment('食品流通许可证');

+ 1 - 1
database/migrations/2019_04_28_172025_create_shop_accounts_table.php

@@ -19,7 +19,7 @@ class CreateShopAccountsTable extends Migration
             $table->string('account')->nullable()->comment('账号');
             $table->string('account')->nullable()->comment('账号');
             $table->string('mobile',16)->nullable()->comment('手机号码');
             $table->string('mobile',16)->nullable()->comment('手机号码');
             $table->string('password')->nullable()->comment('密码');
             $table->string('password')->nullable()->comment('密码');
-            $table->integer('status')->default(0)->comment('状态 0启用 1禁用');
+            $table->integer('status')->default(1)->comment('状态 1启用 0禁用');
             $table->string('ip')->default('')->comment('登陆ip');
             $table->string('ip')->default('')->comment('登陆ip');
             $table->softDeletes();
             $table->softDeletes();
             $table->timestamps();
             $table->timestamps();