liyongli 2 năm trước cách đây
mục cha
commit
68e02cfe2b

+ 9 - 1
src/view/CalligraphyAndPaintingCompetition/index.js

@@ -1,6 +1,7 @@
 import App from './index.vue';
 import '@/assets/js/common';
 import { createApp } from 'vue';
+import { getUser } from '@/utils/tool.js';
 import { getPageParameters, environment } from '../../config/pageConfig';
 // 判断环境
 environment();
@@ -17,7 +18,14 @@ window.weixin_Share_Init(
 );
 
 
-createApp(App).mount('#app')
+!window.$shanshipin || !window.$shanshipin.Phone
+  ? getUser(() => createApp(App).mount('#app'), true)
+  : createApp(App).mount('#app');
+
+window.setUserSession = () => {
+  console.log('登录');
+  getUser(() => createApp(App).mount('#app'), true);
+};
 
 var SL = new window.SmcicLogger("shanshipin", "c6124d95");
 SL.Util.SetUrl("https://collect.smcic.net:8443/");

+ 2 - 4
src/view/CalligraphyAndPaintingCompetition/index.vue

@@ -154,11 +154,9 @@ function toShanshipinFunc() {
 }
 
 function tougao() {
-  getToupiaoUrl().then(r => {
-    const res = r || { toxuanshouurl: '' };
-    if (res.toxuanshouurl) openShanshipinDetail(res.toxuanshouurl);
+    console.log(window.$shanshipin)
+  if(window.$shanshipin && window.$shanshipin.invitedIp) openShanshipinDetail('https://ssp-api.sxtvs.com.cn/tapi/form/index.html?ChannelID=20441');
     else toShanshipin.value = true;
-  });
 }
 
 function openxuanshou() {