wesmiler 2 rokov pred
rodič
commit
cb6e12d58b

+ 5 - 0
app/Http/Controllers/Api/v1/LoginController.php

@@ -127,6 +127,11 @@ class LoginController extends webApp
                     return showJson(2009, false, ['app_url' => ConfigService::make()->getConfigByCode("app_{$appSources}_url"),], 406);
                 }
                 break;
+            case 'modify_email':
+                if (MemberService::make()->checkExists('email', $email)) {
+                    return showJson(2009, false, ['app_url' => ConfigService::make()->getConfigByCode("app_{$appSources}_url"),], 406);
+                }
+                break;
             case 'login':
                 if (!MemberService::make()->checkExists('email',$email)) {
                     return showJson(2001, false, ['app_url' => ConfigService::make()->getConfigByCode("app_{$appSources}_url"),], 406);

+ 0 - 62
app/Http/Controllers/Api/v1/MemberController.php

@@ -95,68 +95,6 @@ class MemberController extends webApp
     }
 
     /**
-     * 设置微信收款码
-     * @return array
-     */
-    public function setWxpay(Request $request)
-    {
-        // 上传单图统一调取方法
-        $result = upload_image($request, 'file','payment');
-        if (!$result['success']) {
-            return showJson($result['msg'],false,['url'=>'']);
-        }
-
-        // 文件路径
-        $file_path = $result['data']['img_path'];
-        if (!$file_path) {
-            return showJson('上传失败',false,['url'=>'']);
-        }
-
-        // 网络域名拼接
-        if ($file_path && strpos($file_path, IMG_URL) === false) {
-            $file_path = get_image_url($file_path);
-        }
-
-        $qrcode = $result['data']['img_path'];
-        if(MemberService::make()->saveQrcode($this->userId, ['wxpay'=> $qrcode])){
-            return showJson(1013,true,['url'=> $file_path,'path'=> $qrcode]);
-        }else{
-            return showJson(1014,false,['url'=>'']);
-        }
-    }
-
-    /**
-     * 设置支付宝收款码
-     * @return array
-     */
-    public function setAlipay(Request $request)
-    {
-        // 上传单图统一调取方法
-        $result = upload_image($request, 'file','payment');
-        if (!$result['success']) {
-            return showJson($result['msg'],false,['url'=>'']);
-        }
-
-        // 文件路径
-        $file_path = $result['data']['img_path'];
-        if (!$file_path) {
-            return showJson('上传失败',false,['url'=>'']);
-        }
-
-        // 网络域名拼接
-        if ($file_path && strpos($file_path, IMG_URL) === false) {
-            $file_path = get_image_url($file_path);
-        }
-
-        $qrcode = $result['data']['img_path'];
-        if(MemberService::make()->saveQrcode($this->userId, ['alipay'=> $qrcode])){
-            return showJson(1013,true,['url'=> $file_path,'path'=> $qrcode]);
-        }else{
-            return showJson(1014,false,['url'=>'']);
-        }
-    }
-
-    /**
      * 修改账号信息
      * @param MemberValidator $validator
      * @return array

+ 1 - 1
app/Http/Validator/MemberValidator.php

@@ -55,7 +55,7 @@ class MemberValidator extends BaseValidator
         'transfer'=> ['money','coin_type','to_user_id'],
         'withdraw'=> ['money','coin_type'],
         'trade'=> ['email','pay_password','code'],
-        'modifyEmail'=> ['email','new_email']
+        'modify_email'=> ['email','new_email']
     ];
 
     /**