Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
Harvey
/
ydu-lottery-shop-app
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 635e8297
由
Harvey
编写于
2022-04-20 17:22:01 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
与登录相关的跳转改为redirectTo
1 个父辈
2b339666
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
15 行增加
和
7 行删除
src/common/request.js
src/pages/auth/login.vue
src/common/request.js
查看文件 @
635e829
...
...
@@ -67,9 +67,8 @@ async function graphql(options = {}) {
if
(
res
.
Error
==
'未登录'
)
{
try
{
if
(
Android
)
window
.
location
.
href
=
'ydncp://www.ydniu.com?type=7'
}
catch
(
e
)
{
console
.
log
(
e
.
message
)
uni
.
navigateTo
({
}
catch
(
e
)
{
uni
.
redirectTo
({
url
:
`/login?from=
${
encodeURIComponent
(
getCurrentPages
()[
0
].
__page__
.
fullPath
)}
`
})
}
...
...
src/pages/auth/login.vue
查看文件 @
635e829
...
...
@@ -66,11 +66,21 @@
return
}
uni
.
navigate
To
({
uni
.
redirect
To
({
url
:
decodeURIComponent
(
this
.
from
)
})
},
async
sendMobileCode
()
{
async
sendMobileCode
()
{
if
(
this
.
mobile
.
length
!=
11
)
{
uni
.
showToast
({
icon
:
"none"
,
icon
:
'error'
,
title
:
"手机号有误"
,
});
return
;
}
var
yzm
=
this
.
yzm
if
(
yzm
.
class
==
'disabled'
)
{
uni
.
showToast
({
...
...
@@ -84,11 +94,10 @@
const
res
=
await
uni
.
$u
.
request
.
post
({
data
:
{
query
:
`mutation{ydn_send_mobile_code(mobile:"
15574985121
",type:7)}`
query
:
`mutation{ydn_send_mobile_code(mobile:"
${
this
.
mobile
}
",type:7)}`
}
}).
then
(
a
=>
a
.
data
.
data
.
ydn_send_mobile_code
);
console
.
log
(
res
)
if
(
res
.
success
==
'1'
)
{
uni
.
showToast
({
title
:
'验证码发送成功'
,
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论