| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -104,20 +104,22 @@ class MiniProgramUpload extends RowAction | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$audit_err_code = $this->auditErrorCode(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								if (isset($res['errcode'], $res['errmsg']) && $res['errcode'] == 0 && $res['errmsg'] == 'ok') { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									$filename = "mini_program_qrcode/{$agent->id}-{$agent->appid}-demo.jpg"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									//保存上传记录
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									MiniProgramUploadLog::insert([ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										'agent_id' => $agent->id, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										'appid' => $agent->appid, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										'user_version' => $template->user_version, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										'template_id' => $templateId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										'qrcode' => "mini_program_qrcode/{$agent->id}-{$agent->appid}.jpg", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										'qrcode' => $filename, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										'audit_id' => $res['auditid'], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										'created_at' => now(), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									]); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									//获取体验二维码并保存
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									$qrcode = $code->getQrCode(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									Storage::put("public/mini_program_qrcode/{$agent->id}-{$agent->appid}.jpg", $qrcode); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									Storage::put("public/$filename", $qrcode); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									return $this->response()->success("上传成功,并已提交审核")->refresh(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								} else if (isset($audit_err_code[$res['errcode']])) { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |