mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 04:08:43 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			359 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			359 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import config from '@/config'
 | 
						|
const baseUrl = config.baseUrl
 | 
						|
export const myRequest = (option = {}) => {
 | 
						|
	return new Promise((reslove, reject) => {
 | 
						|
		uni.request({
 | 
						|
			url: baseUrl + option.url,
 | 
						|
			data: option.data,
 | 
						|
			method: option.method || "GET",
 | 
						|
			success: (result) => {
 | 
						|
				reslove(result)
 | 
						|
			},
 | 
						|
			fail: (error) => {
 | 
						|
				reject(error)
 | 
						|
			}
 | 
						|
		})
 | 
						|
	})
 | 
						|
}
 |