Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
XBRL-PX
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
刘旭
XBRL-PX
Commits
ca2efb2e
提交
ca2efb2e
authored
1月 02, 2024
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
853f0230
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
24 行增加
和
24 行删除
+24
-24
index.vue
src/pages/login/index.vue
+8
-8
index.vue
src/pagesTeach/login/index.vue
+8
-8
request.ts
src/utils/request.ts
+8
-8
没有找到文件。
src/pages/login/index.vue
浏览文件 @
ca2efb2e
...
@@ -134,12 +134,12 @@ watch(
...
@@ -134,12 +134,12 @@ watch(
onLoad
((
options
:
any
)
=>
{
onLoad
((
options
:
any
)
=>
{
// 判断是否在微信浏览器
// 判断是否在微信浏览器
//
let en: any = window.navigator.userAgent.toLowerCase();
let
en
:
any
=
window
.
navigator
.
userAgent
.
toLowerCase
();
//
//
匹配en中是否含有MicroMessenger字符串
// 匹配en中是否含有MicroMessenger字符串
//
if (en.match(/MicroMessenger/i) != "micromessenger") {
if
(
en
.
match
(
/MicroMessenger/i
)
!=
"micromessenger"
)
{
//
// return "普通浏览器";
// return "普通浏览器";
//
return uni.reLaunch({ url: "/pages/prompt/index" });
return
uni
.
reLaunch
({
url
:
"/pages/prompt/index"
});
//
}
}
if
(
options
?.
type
)
{
if
(
options
?.
type
)
{
data
.
type
=
options
?.
type
;
data
.
type
=
options
?.
type
;
}
}
...
@@ -202,8 +202,8 @@ const toRegister = () => {
...
@@ -202,8 +202,8 @@ const toRegister = () => {
const
submit
=
()
=>
{
const
submit
=
()
=>
{
form
.
value
.
validate
(
async
(
valid
:
boolean
)
=>
{
form
.
value
.
validate
(
async
(
valid
:
boolean
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
//
if (!data.flag) return toast("验证码失效");
if
(
!
data
.
flag
)
return
toast
(
"验证码失效"
);
//
if (data.formData.code != data.codeValue) return toast("验证码不正确");
if
(
data
.
formData
.
code
!=
data
.
codeValue
)
return
toast
(
"验证码不正确"
);
if
(
data
.
type
)
{
if
(
data
.
type
)
{
const
state
=
{
const
state
=
{
type
:
data
.
type
,
type
:
data
.
type
,
...
...
src/pagesTeach/login/index.vue
浏览文件 @
ca2efb2e
...
@@ -109,14 +109,14 @@ onReady(() => {
...
@@ -109,14 +109,14 @@ onReady(() => {
});
});
onMounted
(()
=>
{
onMounted
(()
=>
{
// 判断是否在微信浏览器
// 判断是否在微信浏览器
;
//
let en: any = window.navigator.userAgent.toLowerCase();
let
en
:
any
=
window
.
navigator
.
userAgent
.
toLowerCase
();
//
//
匹配en中是否含有MicroMessenger字符串
// 匹配en中是否含有MicroMessenger字符串
//
if (en.match(/MicroMessenger/i) != "micromessenger") {
if
(
en
.
match
(
/MicroMessenger/i
)
!=
"micromessenger"
)
{
//
// return "普通浏览器";
// return "普通浏览器";
//
return uni.reLaunch({ url: "/pages/prompt/index" });
return
uni
.
reLaunch
({
url
:
"/pages/prompt/index"
});
//
}
}
//
if (globalStore.Phone) return uni.reLaunch({ url: "/pagesTeach/home/index" });
if
(
globalStore
.
Phone
)
return
uni
.
reLaunch
({
url
:
"/pagesTeach/home/index"
});
window
.
onresize
=
()
=>
{
window
.
onresize
=
()
=>
{
return
(()
=>
{
return
(()
=>
{
showHeight
.
value
=
document
.
body
.
clientHeight
;
showHeight
.
value
=
document
.
body
.
clientHeight
;
...
...
src/utils/request.ts
浏览文件 @
ca2efb2e
...
@@ -18,14 +18,14 @@ function request(
...
@@ -18,14 +18,14 @@ function request(
returnError
?:
boolean
returnError
?:
boolean
)
{
)
{
// 判断是否在微信浏览器
// 判断是否在微信浏览器
//
let en: any = window.navigator.userAgent.toLowerCase();
let
en
:
any
=
window
.
navigator
.
userAgent
.
toLowerCase
();
//
//
匹配en中是否含有MicroMessenger字符串
// 匹配en中是否含有MicroMessenger字符串
//
if (en.match(/MicroMessenger/i) != "micromessenger") {
if
(
en
.
match
(
/MicroMessenger/i
)
!=
"micromessenger"
)
{
//
studentStore.$reset();
studentStore
.
$reset
();
//
teachStore.$reset();
teachStore
.
$reset
();
//
// return "普通浏览器";
// return "普通浏览器";
//
return uni.reLaunch({ url: "/pages/prompt/index" });
return
uni
.
reLaunch
({
url
:
"/pages/prompt/index"
});
//
}
}
const
header
=
{
"Content-Type"
:
"application/json"
};
const
header
=
{
"Content-Type"
:
"application/json"
};
const
pages
=
getCurrentPages
();
const
pages
=
getCurrentPages
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论