|
@@ -53,17 +53,18 @@ class ShopController extends Controller {
|
|
|
'proportion'=>'required|digits_between:1,100|integer',
|
|
|
'verify_type'=>['required',Rule::in([0,1])],
|
|
|
'account'=>'string|max:20',
|
|
|
- 'password'=>'string|min:6|max:18'
|
|
|
+ 'password'=>'string|min:6|max:18',
|
|
|
+ 'shop_id'=>'integer',
|
|
|
]);
|
|
|
if ($validator->fails()) {
|
|
|
return $this->jsonError($validator->errors()->first());
|
|
|
}
|
|
|
- if($data['account']){
|
|
|
- $shop_account = ShopAccount::where(['account'=>$data['account']])->first();
|
|
|
- if($shop_account){
|
|
|
- return $this->jsonError('该账号已存在,请重新输入');
|
|
|
- }
|
|
|
- }
|
|
|
+// if($data['account']){
|
|
|
+// $shop_account = ShopAccount::where(['account'=>$data['account']])->first();
|
|
|
+// if($shop_account){
|
|
|
+// return $this->jsonError('该账号已存在,请重新输入');
|
|
|
+// }
|
|
|
+// }
|
|
|
$shopRepository = new ShopRepository();
|
|
|
$res = $shopRepository->saveShopAccount($data);
|
|
|
if($res){
|