You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							51 lines
						
					
					
						
							1.0 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							51 lines
						
					
					
						
							1.0 KiB
						
					
					
				| import {HTTP, Method} from '../utils/http.js' | |
| 
 | |
| const HOMEConst = { | |
|   home_banner_url: '/api/content/getListByCode', | |
|   home_hot_url: '/api/content/getListByCode', | |
|   home_list_url: '/api/content/getListByCode', | |
| } | |
| 
 | |
| class HomeModel extends HTTP { | |
|   constructor () { | |
|     super() | |
|   } | |
|   // 获取 Banner 数据 | |
|   getHomeBanner(success) { | |
|     let params = { | |
|       url:  HOMEConst.home_banner_url, | |
|       method: Method.POST, | |
|       data: { | |
|         typeCode: 'sc-banner', | |
|       }, | |
|       success: success | |
|     } | |
|     this.request(params) | |
|   } | |
|   // 获取首页热点数据 | |
|   getHomeHot(success) { | |
|     let params = { | |
|       url:  HOMEConst.home_hot_url, | |
|       method: Method.POST, | |
|       data: { | |
|         typeCode: 'sc-jdtz', | |
|       }, | |
|       success: success | |
|     } | |
|     this.request(params) | |
|   } | |
|   // 首页列表 | |
|   getHomeList(page, success){ | |
|     let params = { | |
|       url: HOMEConst.home_list_url + '?pageNo=' + page, | |
|       method: Method.POST, | |
|       data: { | |
|         typeCode: 'sc-tzgg', | |
|       }, | |
|       success: success | |
|     } | |
|     this.request(params) | |
|   } | |
| } | |
| 
 | |
| export {HomeModel} |