| 
									
										
										
										
											2022-08-01 03:47:37 +00:00
										 |  |  | import response from './response'; | 
					
						
							|  |  |  | import moduleHelper from './module-helper'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default { | 
					
						
							|  |  |  |   WXToTempFilePathSync(conf) { | 
					
						
							|  |  |  |     return canvas.toTempFilePathSync(JSON.parse(conf)); | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   WXToTempFilePath(conf, s, f, c) { | 
					
						
							|  |  |  |     canvas.toTempFilePath({ | 
					
						
							|  |  |  |       ...JSON.parse(conf), | 
					
						
							|  |  |  |       ...response.handleText(s, f, c), | 
					
						
							|  |  |  |       success: (res) => { | 
					
						
							|  |  |  |         moduleHelper.send('ToTempFilePathCallback', JSON.stringify({ | 
					
						
							|  |  |  |           callbackId: s, | 
					
						
							|  |  |  |           errMsg: res.errMsg, | 
					
						
							|  |  |  |           errCode: res.errCode, | 
					
						
							|  |  |  |           tempFilePath: res.tempFilePath, | 
					
						
							|  |  |  |         })); | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | }; |