index.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import App from "./index.vue";
  2. import "@/assets/js/common";
  3. import { createApp } from "vue";
  4. import { getPageParameters, environment } from "@/config/pageConfig.js";
  5. // 判断环境
  6. environment();
  7. window.$originData = getPageParameters();
  8. document.title = window.$originData.orginParames.title || "";
  9. // 分享
  10. window.weixin_Share_Init(
  11. "2023要出色?快来PICK你的新年开运色!",
  12. "限定新年礼,点击查收!",
  13. "https://cxzx.smcic.net/topic/tool/img/silvlogo.png",
  14. "https://cxzx.smcic.net/topic/activity/SilkRoadSpringFestivalGala.html?" + Date.now()
  15. );
  16. window.SL = new window.SmcicLogger("shanshipin", "c6124d95");
  17. window.SL.Util.SetUrl("https://collect.smcic.net:8443/");
  18. window.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. window.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. createApp(App).mount("#app");
  46. // 给元素添加playing属性
  47. Object.defineProperty(HTMLMediaElement.prototype, "playing", {
  48. get: function () {
  49. return !!(
  50. this.currentTime > 0 &&
  51. !this.paused &&
  52. !this.ended &&
  53. this.readyState > 2
  54. );
  55. },
  56. });