index.js 1.6 KB

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