|
|
@@ -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
|