// config.js
/**
 * 小程序后端接口配置文件
 */
var host = "http://127.0.0.1:8000/api";
var root_host = "http://127.0.0.1:8000";
//var host = "http://localhost/api";
//var root_host = "http://localhost";
var api = {
  // 下面的地址配合 Server 工作
  host,        
  root_host,                                                        
  //配置
  categories: `${host}/categories`,
  //商品详情
  detail: `${host}/products/`,
  //用户信息
  personal_msg: `${host}/members`,
  //删除评论
  delete_comment: `${host}/comments`,
  //订单删除
  delete_order: `${host}/orders`,
  //用户评价列表
  comment_list: `${host}/members`,
  //评论操作
  comment_action: `${host}/members`,
  //评论
  comment: `${host}/products`,
  //评论操作
  comment_action: `${host}/members`,
  //完善信息
  member: `${host}/members`,
  //登录
  login: `${host}/login`,
  //我的订单
  records: `${host}/`,
  //用户的学习记录
  reports: `${host}/reports/`,
  //我的学习统计
  myReports: `${host}/my/reports/`,
  //所有自习室
  studyRooms: `${host}/study_rooms`,
  recordAction: `${host}/records/`,
  //行业资讯
  news: `${host}/news`,
  news_detail: `${host}/news`,

  //上传
  uploadImage: `${host}/file/upload`,
  
  // 意见反馈
  feedback: `${host}/members`,
  // home
  hot: `${host}/hot/products`,
  garbage: `${host}/garbage`,
  garbage1: `${host}/garbage/keyword`,
  //答题列表
  answers: `${host}/answer`,
  post_answers: `${host}/post_answer/`,
  answers_result: `${host}/answers_result/`
};
  //对外把对象config返回
module.exports = api;