index.js 1.4 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. "https://cxzx.smcic.net/topic/activity/WorldCup.html?" + Date.now()
  16. );
  17. var SL = new window.SmcicLogger("shanshipin", "c6124d95");
  18. SL.Util.SetUrl("https://collect.smcic.net:8443/");
  19. SL.Systematic.Init({
  20. appid: "c6124d95",
  21. channel: "shanshipin",
  22. model: "",
  23. os: "",
  24. os_version: "",
  25. carrier: "",
  26. network_type: "",
  27. ip: "",
  28. app_name: "",
  29. app_version: "",
  30. build_version: "",
  31. platform_type: "",
  32. });
  33. SL.Content.CommodityDetail({
  34. commodity_detail_source: "活动",
  35. commodity_id: "",
  36. commodity_name: document.title,
  37. publisher_name: "",
  38. publisher_id: "",
  39. review_count: 0,
  40. comment_count: 0,
  41. collect_count: 0,
  42. share_count: 0,
  43. like_count: 0,
  44. tag: [],
  45. });
  46. !window.$shanshipin || !window.$shanshipin.Phone
  47. ? getUser(() => createApp(App).mount("#app"))
  48. : createApp(App).mount("#app");
  49. window.setUserSession = () => {
  50. console.log("登录");
  51. getUser(() => createApp(App).mount("#app"));
  52. };