/**
 * @name: util
 * @author: alan
 * @date: 2022-09-16 16:18
 * @description：util
 * @update: 2022-09-16 16:18
 */
const sendModule = (response) => {
  return {
    code: '000000',
    data: response
  }
}

const sendAction = (result, customerData) => {
  if (result) {
    return sendModule({});
  } else {
    return sendModule(customerData ? customerData : {message: '操作失败'});
  }
}

module.exports = {
  sendModule,
  sendAction
};
