|  | @@ -0,0 +1,32 @@
 | 
	
		
			
				|  |  | +import OHeader from '@/components/o-header'
 | 
	
		
			
				|  |  | +import OSticky from '@/components/o-sticky'
 | 
	
		
			
				|  |  | +import request from '@/helpers/request'
 | 
	
		
			
				|  |  | +// import request from 'umi-request'
 | 
	
		
			
				|  |  | +import { Button } from 'vant'
 | 
	
		
			
				|  |  | +import { defineComponent } from 'vue'
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +export default defineComponent({
 | 
	
		
			
				|  |  | +  name: 'test',
 | 
	
		
			
				|  |  | +  setup() {
 | 
	
		
			
				|  |  | +    const onSubmit = async () => {
 | 
	
		
			
				|  |  | +      const { data } = await request.get(
 | 
	
		
			
				|  |  | +        'https://test.lexiaoya.cn/edu-app/open/sysArea/queryAllProvince',
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +          mode: 'cors'
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      )
 | 
	
		
			
				|  |  | +      console.log(data)
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    return () => (
 | 
	
		
			
				|  |  | +      <div>
 | 
	
		
			
				|  |  | +        <OSticky>
 | 
	
		
			
				|  |  | +          <OHeader title="测试接口请求" />
 | 
	
		
			
				|  |  | +        </OSticky>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <Button type="primary" onClick={onSubmit}>
 | 
	
		
			
				|  |  | +          请求接口
 | 
	
		
			
				|  |  | +        </Button>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +    )
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +})
 |