提交 ca2efb2e authored 作者: 刘旭's avatar 刘旭

更新

上级 853f0230
......@@ -134,12 +134,12 @@ watch(
onLoad((options: any) => {
// 判断是否在微信浏览器
// let en: any = window.navigator.userAgent.toLowerCase();
// // 匹配en中是否含有MicroMessenger字符串
// if (en.match(/MicroMessenger/i) != "micromessenger") {
// // return "普通浏览器";
// return uni.reLaunch({ url: "/pages/prompt/index" });
// }
let en: any = window.navigator.userAgent.toLowerCase();
// 匹配en中是否含有MicroMessenger字符串
if (en.match(/MicroMessenger/i) != "micromessenger") {
// return "普通浏览器";
return uni.reLaunch({ url: "/pages/prompt/index" });
}
if (options?.type) {
data.type = options?.type;
}
......@@ -202,8 +202,8 @@ const toRegister = () => {
const submit = () => {
form.value.validate(async (valid: boolean) => {
if (valid) {
// if (!data.flag) return toast("验证码失效");
// if (data.formData.code != data.codeValue) return toast("验证码不正确");
if (!data.flag) return toast("验证码失效");
if (data.formData.code != data.codeValue) return toast("验证码不正确");
if (data.type) {
const state = {
type: data.type,
......
......@@ -109,14 +109,14 @@ onReady(() => {
});
onMounted(() => {
// 判断是否在微信浏览器
// let en: any = window.navigator.userAgent.toLowerCase();
// // 匹配en中是否含有MicroMessenger字符串
// if (en.match(/MicroMessenger/i) != "micromessenger") {
// // return "普通浏览器";
// return uni.reLaunch({ url: "/pages/prompt/index" });
// }
// if (globalStore.Phone) return uni.reLaunch({ url: "/pagesTeach/home/index" });
// 判断是否在微信浏览器;
let en: any = window.navigator.userAgent.toLowerCase();
// 匹配en中是否含有MicroMessenger字符串
if (en.match(/MicroMessenger/i) != "micromessenger") {
// return "普通浏览器";
return uni.reLaunch({ url: "/pages/prompt/index" });
}
if (globalStore.Phone) return uni.reLaunch({ url: "/pagesTeach/home/index" });
window.onresize = () => {
return (() => {
showHeight.value = document.body.clientHeight;
......
......@@ -18,14 +18,14 @@ function request(
returnError?: boolean
) {
// 判断是否在微信浏览器
// let en: any = window.navigator.userAgent.toLowerCase();
// // 匹配en中是否含有MicroMessenger字符串
// if (en.match(/MicroMessenger/i) != "micromessenger") {
// studentStore.$reset();
// teachStore.$reset();
// // return "普通浏览器";
// return uni.reLaunch({ url: "/pages/prompt/index" });
// }
let en: any = window.navigator.userAgent.toLowerCase();
// 匹配en中是否含有MicroMessenger字符串
if (en.match(/MicroMessenger/i) != "micromessenger") {
studentStore.$reset();
teachStore.$reset();
// return "普通浏览器";
return uni.reLaunch({ url: "/pages/prompt/index" });
}
const header = { "Content-Type": "application/json" };
const pages = getCurrentPages();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论