|
|
@@ -3,13 +3,6 @@ import request from '@/utils/request'
|
|
|
/**
|
|
|
* 获取搜索地址
|
|
|
*/
|
|
|
-
|
|
|
-// export const searchplace = (cityid, value) => fetch('/v1/pois', {
|
|
|
-// type: 'search',
|
|
|
-// city_id: cityid,
|
|
|
-// keyword: value
|
|
|
-// });
|
|
|
-
|
|
|
export function searchplace(cityid, value) {
|
|
|
return request({
|
|
|
url: '/v1/pois',
|
|
|
@@ -26,8 +19,6 @@ export function searchplace(cityid, value) {
|
|
|
* category 种类列表
|
|
|
*/
|
|
|
|
|
|
-// export const foodCategory = (latitude, longitude) => fetch('/shopping/v2/restaurant/category');
|
|
|
-
|
|
|
export function foodCategory(params) {
|
|
|
return request({
|
|
|
url: '/shopping/v2/restaurant/category',
|
|
|
@@ -39,8 +30,6 @@ export function foodCategory(params) {
|
|
|
* 获取餐馆列表
|
|
|
*/
|
|
|
|
|
|
-// export const getResturants = data => fetch('/shopping/restaurants', data);
|
|
|
-
|
|
|
export function getResturants(params) {
|
|
|
return request({
|
|
|
url: '/shopping/restaurants',
|
|
|
@@ -52,8 +41,6 @@ export function getResturants(params) {
|
|
|
/**
|
|
|
* 获取餐馆数量
|
|
|
*/
|
|
|
-// export const getResturantsCount = () => fetch('/shopping/restaurants/count');
|
|
|
-
|
|
|
export function getResturantsCount(params) {
|
|
|
return request({
|
|
|
url: '/shopping/restaurants/count',
|
|
|
@@ -65,7 +52,6 @@ export function getResturantsCount(params) {
|
|
|
* 添加商铺
|
|
|
*/
|
|
|
|
|
|
-// export const addShop = data => fetch('/shopping/addShop', data, 'POST')
|
|
|
export function addShop(params) {
|
|
|
return request({
|
|
|
url: '/shopping/addShop',
|
|
|
@@ -78,7 +64,6 @@ export function addShop(params) {
|
|
|
* 更新餐馆信息
|
|
|
*/
|
|
|
|
|
|
-// export const updateResturant = data => fetch('/shopping/updateshop', data, 'POST');
|
|
|
export function updateResturant(params) {
|
|
|
return request({
|
|
|
url: '/shopping/updateshop',
|
|
|
@@ -91,11 +76,9 @@ export function updateResturant(params) {
|
|
|
* 删除餐馆
|
|
|
*/
|
|
|
|
|
|
-// export const deleteResturant = restaurant_id => fetch('/shopping/restaurant/' + restaurant_id, {}, 'DELETE');
|
|
|
-
|
|
|
export function deleteResturant(id) {
|
|
|
return request({
|
|
|
- url: '/shopping/restaurant/' + id,
|
|
|
+ url: '/shopping/restaurants/' + id,
|
|
|
method: 'delete'
|
|
|
})
|
|
|
}
|
|
|
@@ -104,7 +87,6 @@ export function deleteResturant(id) {
|
|
|
* 获取餐馆详细信息
|
|
|
*/
|
|
|
|
|
|
-// export const getResturantDetail = restaurant_id => fetch('/shopping/restaurant/' + restaurant_id);
|
|
|
export function getResturantDetail(id) {
|
|
|
return request({
|
|
|
url: '/shopping/restaurant/' + id,
|
|
|
@@ -116,7 +98,6 @@ export function getResturantDetail(id) {
|
|
|
* 获取menu列表
|
|
|
*/
|
|
|
|
|
|
-// export const getMenu = data => fetch('/shopping/v2/menu', data);
|
|
|
export function getMenu(params) {
|
|
|
return request({
|
|
|
url: '/shopping/v2/menu/',
|
|
|
@@ -129,7 +110,6 @@ export function getMenu(params) {
|
|
|
* 获取menu详情
|
|
|
*/
|
|
|
|
|
|
-// export const getMenuById = category_id => fetch('/shopping/v2/menu/' + category_id);
|
|
|
export function getMenuById(category_id) {
|
|
|
return request({
|
|
|
url: '/shopping/v2/menu/' + category_id,
|