Jelajahi Sumber

增加商铺申请时店铺名称喝图片

moonsflyer 4 bulan lalu
induk
melakukan
c5f76eb03b
1 mengubah file dengan 17 tambahan dan 0 penghapusan
  1. 17 0
      phalapi/src/app/Api/Shop.php

+ 17 - 0
phalapi/src/app/Api/Shop.php

@@ -26,6 +26,8 @@ class Shop extends Api {
 			'shopApply'=>array(
 				'uid' => array('name' => 'uid', 'type' => 'int', 'desc' => '用户ID'),
                 'token' => array('name' => 'token', 'type' => 'string', 'desc' => '用户token'),
+                'name' => array('name' => 'name', 'type' => 'string', 'desc' => '店铺名称'),
+                'thumb' => array('name' => 'thumb', 'type' => 'string', 'desc' => '店铺图片'),
                 'username' => array('name' => 'username', 'type' => 'string', 'desc' => '姓名'),
                 'cardno' => array('name' => 'cardno', 'type' => 'string', 'desc' => '身份证号'),
                 'classid' => array('name' => 'classid', 'type' => 'string', 'desc' => '经营类目'),
@@ -352,6 +354,9 @@ class Shop extends Api {
 		
 		$uid=\App\checkNull($this->uid);
         $token=\App\checkNull($this->token);
+        $name=\App\checkNull($this->name);
+        $thumb=\App\checkNull($this->thumb);
+        $username=\App\checkNull($this->username);
         $username=\App\checkNull($this->username);
         $cardno=\App\checkNull($this->cardno);
         $classid=\App\checkNull($this->classid);
@@ -391,6 +396,16 @@ class Shop extends Api {
         	return $rs;
 		}
 
+        if(!$name){
+            $rs['code']=1001;
+            $rs['msg']=\PhalApi\T('请填写店铺名称');
+            return $rs;
+        }
+        if(!$thumb){
+            $rs['code']=1001;
+            $rs['msg']=\PhalApi\T('请上传店铺图片');
+            return $rs;
+        }
         if(!$username){
         	$rs['code']=1001;
         	$rs['msg']=\PhalApi\T('请填写姓名');
@@ -587,6 +602,8 @@ class Shop extends Api {
 
 
 		$data=array(
+            'name'=>$name,
+            'thumb'=>\App\setCloudType($thumb),
 			'username'=>$username,
 	        'cardno'=>$cardno,
 	        'contact'=>$contact,