mirror of
				https://gitee.com/technical-laohu/mpay.git
				synced 2025-11-04 16:53:44 +08:00 
			
		
		
		
	修复安装时模板引用报错问题,
添加二维码图片上传功能,可以支持远程图片地址和生成二维码图片。
This commit is contained in:
		@@ -143,7 +143,22 @@ class PayManageController extends BaseController
 | 
			
		||||
            unlink($path);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // 上传二维码图片
 | 
			
		||||
    public function uploadQrcode()
 | 
			
		||||
    {
 | 
			
		||||
        $img = $this->request->file('codeimg');
 | 
			
		||||
        $path = public_path() . '/files/qrcode/';
 | 
			
		||||
        if (!is_dir($path)) {
 | 
			
		||||
            mkdir($path, 0777, true);
 | 
			
		||||
        }
 | 
			
		||||
        $info = $img->move($path, 'img' . time() . '.' . $img->getOriginalExtension());
 | 
			
		||||
        if ($info) {
 | 
			
		||||
            $imgpath = '/files/qrcode/';
 | 
			
		||||
            return json(backMsg(0, '上传成功', ['imgpath' => $imgpath . $info->getFilename()]));
 | 
			
		||||
        } else {
 | 
			
		||||
            return json(backMsg(1, '上传失败'));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    // 生成账号配置
 | 
			
		||||
    private function createAccountConfig($acc)
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user