import { http } from "@/utils/request";
import browser from "@/utils/browser";

export const get_goods_list = (data) => {
  return http.get("/back/product/list", data);
};

export const get_category_list = (data) => {
  return http.get("/api/getShopCategory", data);
};

export const get_shop_list = (data) => {
  return http.get("/api/getShopByCategory", data);
};

export const get_tags_list = (data) => {
  return http.get("/service/scene/edit/tag/getHotJson", data);
};

export const get_product_info = (data) => {
  return http.get("/api/getProductInfo", data);
};

export const get_video = (data) => {
  return http.get("/api/getVideo", data);
};

export const inCat = (data) => {
  return http.get("/api/inCat", data);
};

export const getSign = (data) => {
  return http.get("/api/tencentYun/getSign", data);
};



export const burying_point = (data) => {
  let url = encodeURI(window.location.href)
  if (browser.getURLParam("AccessToken")) {
    return http.get("/api/point", {
      userId: browser.getURLParam("userId") || 1,
      AccessToken: browser.getURLParam("AccessToken")||'none',
      cookieId: browser.getURLParam("cookieId")||'none',
      isMiniApp: browser.getURLParam("isMiniApp")||'h5',
      whereUrl: url,
      type: data.type,
      productId: data.productId,
    });
  }

};
