|
@@ -6,12 +6,14 @@ import { useToggle } from "@vant/use";
|
|
import { useRoute } from "vue-router";
|
|
import { useRoute } from "vue-router";
|
|
import { isDingTalk, isWeChat } from "@/helpers/utils";
|
|
import { isDingTalk, isWeChat } from "@/helpers/utils";
|
|
import wx_bg from "@/assets/wx_bg.png";
|
|
import wx_bg from "@/assets/wx_bg.png";
|
|
|
|
+import TheDown from '../TheDown'
|
|
|
|
|
|
export const [footerAppShow, toggleFooterApp] = useToggle(false);
|
|
export const [footerAppShow, toggleFooterApp] = useToggle(false);
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: "TheFooterApp",
|
|
name: "TheFooterApp",
|
|
setup() {
|
|
setup() {
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
|
+ const downRef = ref()
|
|
const firstShow = () => {
|
|
const firstShow = () => {
|
|
if (route.name == "index") {
|
|
if (route.name == "index") {
|
|
toggleFooterApp(true);
|
|
toggleFooterApp(true);
|
|
@@ -19,6 +21,16 @@ export default defineComponent({
|
|
};
|
|
};
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
firstShow();
|
|
firstShow();
|
|
|
|
+ window.addEventListener('error', (e) => {
|
|
|
|
+ console.log(e)
|
|
|
|
+ console.log(e.message)
|
|
|
|
+ // console.log(e.source)
|
|
|
|
+ console.log(e.lineno)
|
|
|
|
+ console.log(e.colno)
|
|
|
|
+ console.log(e.error)
|
|
|
|
+ // 禁止默认错误提示
|
|
|
|
+ e.preventDefault();
|
|
|
|
+ }, true);
|
|
});
|
|
});
|
|
const btns = [
|
|
const btns = [
|
|
{
|
|
{
|
|
@@ -55,15 +67,23 @@ export default defineComponent({
|
|
window.location.href = `ColexiuStudent://linkUrl=${iosStr}`;
|
|
window.location.href = `ColexiuStudent://linkUrl=${iosStr}`;
|
|
} else if (/(Android)/i.test(navigator.userAgent)) {
|
|
} else if (/(Android)/i.test(navigator.userAgent)) {
|
|
window.location.href = `colexiustudent://html:8888/SplashActivity?url=${iosStr}`;
|
|
window.location.href = `colexiustudent://html:8888/SplashActivity?url=${iosStr}`;
|
|
|
|
+ } else {
|
|
|
|
+ console.log("🚀 ", downRef.value)
|
|
|
|
+ downRef.value?.downLoadApp('student')
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
|
|
if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
|
|
window.location.href = `ColexiuTeacher://linkUrl=${iosStr}`;
|
|
window.location.href = `ColexiuTeacher://linkUrl=${iosStr}`;
|
|
} else if (/(Android)/i.test(navigator.userAgent)) {
|
|
} else if (/(Android)/i.test(navigator.userAgent)) {
|
|
window.location.href = `colexiuteacher://html:8888/SplashActivity?url=${iosStr}`;
|
|
window.location.href = `colexiuteacher://html:8888/SplashActivity?url=${iosStr}`;
|
|
|
|
+ } else {
|
|
|
|
+ console.log("🚀 ", downRef.value)
|
|
|
|
+ downRef.value?.downLoadApp('teacher')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- } catch (error) {}
|
|
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error)
|
|
|
|
+ }
|
|
};
|
|
};
|
|
return () => (
|
|
return () => (
|
|
<>
|
|
<>
|
|
@@ -110,6 +130,7 @@ export default defineComponent({
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</Popup>
|
|
</Popup>
|
|
|
|
+ <TheDown ref={downRef} />
|
|
</>
|
|
</>
|
|
);
|
|
);
|
|
},
|
|
},
|