import { request } from 'umi';
import { getDataBaseUrl,getgroupmealUrl } from '@/global_data';


/** 获取平台授权码  */
export async function PageStoreAuthorization(data) {
     return request(getgroupmealUrl()+`/api/authorization/pagestoreauthorization`, {
      method: 'POST',
      data: data,
    });
  }

  /** 添加平台授权码  */
export async function AddStoreAuthorization(data) {
    return request(getgroupmealUrl()+`/api/authorization/addstoreauthorization?storeId=`+data, {
     method: 'POST',
     data: data,
   });
 }

   /** 修改平台授权码  */
export async function UpdateStoreAuthorization(data) {
  return request(getgroupmealUrl()+`/api/authorization/updatestoreauthorization?id=`+data, {
   method: 'POST',
   data: data,
 });
}

   /** 修改平台授权码时间 */
   export async function UpdateStoreAuthTime(data) {
    return request(getgroupmealUrl()+`/api/authorization/updatestoreauthtime`, {
     method: 'POST',
     data: data,
   });
  }

   /** 删除店铺授权码 */
   export async function DelStoreAuthTime(data) {
    return request(getgroupmealUrl()+`/api/authorization/delstoreauthorization?id=`+data, {
     method: 'POST',
     data: data,
   });
  }


  


/** 获取店铺列表  */
export async function GetStoreList(data) {
  return request(getgroupmealUrl()+'/api/shop/alllist', {
    method: 'GET',
  });
}
