/*
 * @Author: saiyi_lch 982492702@qq.com
 * @Date: 2023-06-30 11:37:52
 * @LastEditors: saiyi_lch 982492702@qq.com
 * @LastEditTime: 2023-07-04 10:57:20
 * @FilePath: /lowcode-material/src/utils/api.ts
 * @Description: 这是接口api
 */
import request from "./request";
//统一页面查询接口

export function getUniFormList(obj, current, size) {
  var url = '/api/gzmpc-lowcode/uniForm/getList';
  if (current) {
    url += "?current=" + current + "&size=" + size;
  }
  return new Promise(function (resolve, reject) {
    request({
      url: url,
      method: 'post',
      data: obj
    }).then(function (res) {
      resolve(res.data);
    })["catch"](function (err) {
      reject();
    });
  });
}

// 统一保存接口

// 统一保存接口
export function saveStoreAdd(obj) {
  var url = '/api/gzmpc-lowcode/uniForm/save';
  return new Promise(function (resolve, reject) {
    request({
      url: url,
      method: 'post',
      data: obj
    }).then(function (res) {
      resolve(res.data);
    })["catch"](function (err) {
      reject();
    });
  });
}