import {request} from '../request'
export default {
	// 获取商品列表
	getProductList(data){
		return new Promise((resolve, reject) => {
			request.get('/mall/product/list',data)
			.then((res) =>{
				resolve(res);
			}).catch(err =>{
				reject(err);
			})
		})
	},
	// 获取商品详情
	getProductDetail(id){
		return new Promise((resolve, reject) => {
			request.get('/mall/product/' + id)
				.then((res) =>{
					resolve(res);
				}).catch(err =>{
					reject(err);
				})
		})
	},
}