/**
 * @Description: 
 * @Author: gcz
 * @Date: 2024-03-20 09:27:41
 * @LastEditors: gcz
 * @LastEditTime: 2024-03-20 09:32:01
 * @FilePath: \tourism_admin_ui\src\api\merchant.js
 * @Copyright: Copyright (c) 2016~2024 by gcz, All Rights Reserved. 
 */
import request from '@/utils/request'

// 表单列表
export const pageList = (query) => {
  return request({
    url: '/merchant/merchantInfo/pageList',
    method: 'get',
    params: query
  })
}

// 新增/修改
export const insertOrUpdate = (data) => {
    return request({
      url: '/merchant/merchantInfo/insertOrUpdate',
      method: 'post',
      data: data
    })
  }

// ID获取信息
export function getSelectById(id) {
    return request({
      url: '/merchant/merchantInfo/selectById?id=' + id,
      method: 'get'
    })
  }

// 删除
export const deleteById = (id) => {
  return request({
    url: '/merchant/merchantInfo/deleteById',
    method: 'delete',
    params: {id:id}
  })
}

// 启用禁用
export const enable = (data) => {
    return request({
      url: '/merchant/merchantInfo/enable',
      method: 'post',
      data: data
    })
  }

  // 重置密码
export const resetPwd = (data) => {
    return request({
      url: '/merchant/merchantInfo/resetPwd',
      method: 'post',
      data: data
    })
  }
