index.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import App from "./index.vue";
  2. import "@/assets/js/common";
  3. import { createApp } from "vue";
  4. import { getUser } from "@/utils/tool.js";
  5. import { getPageParameters, environment } from "../../config/pageConfig";
  6. // 判断环境
  7. environment();
  8. window.$originData = getPageParameters();
  9. document.title = window.$originData.orginParames.title || "";
  10. // 分享
  11. window.weixin_Share_Init(
  12. "世界杯",
  13. "这是世界杯",
  14. "https://cxzx.smcic.net/topic/highSpeed/img/logo3.png"
  15. );
  16. var SL = new window.SmcicLogger("shanshipin", "c6124d95");
  17. SL.Util.SetUrl("https://collect.smcic.net:8443/");
  18. SL.Systematic.Init({
  19. appid: "c6124d95",
  20. channel: "shanshipin",
  21. model: "",
  22. os: "",
  23. os_version: "",
  24. carrier: "",
  25. network_type: "",
  26. ip: "",
  27. app_name: "",
  28. app_version: "",
  29. build_version: "",
  30. platform_type: "",
  31. });
  32. SL.Content.CommodityDetail({
  33. commodity_detail_source: "活动",
  34. commodity_id: "",
  35. commodity_name: document.title,
  36. publisher_name: "",
  37. publisher_id: "",
  38. review_count: 0,
  39. comment_count: 0,
  40. collect_count: 0,
  41. share_count: 0,
  42. like_count: 0,
  43. tag: [],
  44. });
  45. !window.$shanshipin || !window.$shanshipin.Phone
  46. ? getUser(() => createApp(App).mount("#app"))
  47. : createApp(App).mount("#app");
  48. window.setUserSession = () => {
  49. console.log("登录");
  50. getUser(() => createApp(App).mount("#app"));
  51. };