Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 250ab78b
authored
Aug 15, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
pc端电脑登录bug修复
1 parent
1f4d9e20
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
10 deletions
login/index/components/Box/Box.js
login/index/index.js
login/index/index.wxml
密码.txt
login/index/components/Box/Box.js
View file @
250ab78
...
...
@@ -4,7 +4,7 @@ import { checkLoginUserInfo, setLoginInfo, loginModal } from '~/login/lib/index'
import
md5
from
'~/utils/lib/md5'
import
network
from
'~/utils/network'
import
{
imgUrlMixin
}
from
'~/mixins/index'
let
thisPage
//
let thisPage
Component
({
behaviors
:
[
imgUrlMixin
],
options
:
{
...
...
@@ -52,6 +52,7 @@ Component({
},
/**输入回调 */
input
(
e
)
{
const
thisPage
=
wx
.
$router
.
getPageInstance
()
const
{
value
}
=
e
.
detail
,
{
name
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
...
...
@@ -116,6 +117,7 @@ Component({
},
/**检查输入框内容 */
checkFormData
()
{
const
thisPage
=
wx
.
$router
.
getPageInstance
()
const
{
loginType
,
formData
}
=
this
.
data
if
(
loginType
!=
0
)
{
if
(
loginType
==
1
)
{
...
...
@@ -169,6 +171,7 @@ Component({
.
then
(({
code
,
data
,
message
})
=>
{
this
.
setBtnLoading
(
false
)
if
(
code
==
'0'
)
{
const
thisPage
=
wx
.
$router
.
getPageInstance
()
if
(
loginType
==
1
)
checkLoginUserInfo
(
data
)
else
{
const
{
autoLogin
}
=
thisPage
.
data
,
...
...
@@ -221,6 +224,7 @@ Component({
},
/**设置登录按钮loading状态 */
setBtnLoading
(
loading
=
true
)
{
const
thisPage
=
wx
.
$router
.
getPageInstance
()
thisPage
.
setData
({
loading
})
...
...
@@ -230,10 +234,13 @@ Component({
},
/**页面初始化 */
async
init
()
{
this
.
setData
({
code
:
3
})
network
.
getNetworkType
()
thisPage
=
wx
.
$router
.
getPageInstance
()
try
{
const
{
data
,
code
,
message
}
=
await
USERAPI
.
wxCodeLogin
()
const
thisPage
=
wx
.
$router
.
getPageInstance
()
if
(
code
==
'0'
)
{
thisPage
.
setData
({
disabled
:
false
...
...
login/index/index.js
View file @
250ab78
...
...
@@ -8,8 +8,9 @@ Page({
loginType
:
0
,
/**按钮disabled */
disabled
:
true
,
// disabled: false,
/**免登 */
autoLogin
:
false
autoLogin
:
false
,
},
onRoute
(
options
)
{},
/**
...
...
@@ -33,12 +34,11 @@ Page({
disabled
:
true
})
}
const
login
=
this
.
selectComponent
(
'#box'
)
if
(
login
)
login
.
init
()
wx
.
hideHomeButton
({
success
:
res
=>
{
wx
.
hideLoading
()
const
login
=
this
.
selectComponent
(
'#box'
)
if
(
login
)
login
.
init
()
// this.checkLoginBtn()
}
})
},
...
...
@@ -73,15 +73,18 @@ Page({
autoLogin
:
e
.
detail
})
},
checkLoginBtn
(
disabled
=
false
)
{
checkLoginBtn
(
disabled
=
false
)
{
const
{
loginType
}
=
this
.
data
,
{
data
:
{
formData
},
loginToken
//
loginToken
}
=
this
.
selectComponent
(
'#box'
)
if
(
loginType
==
0
)
{
disabled
=
loginToken
}
else
disabled
=
loginType
==
1
?
formData
.
phone
&&
this
.
validate
.
methods
.
tel
(
formData
.
phone
)
&&
formData
.
code
&&
formData
.
code
.
length
==
4
:
formData
.
account
&&
formData
.
password
// disabled = loginToken
disabled
=
this
.
loginToken
}
else
{
disabled
=
loginType
==
1
?
formData
.
phone
&&
this
.
validate
.
methods
.
tel
(
formData
.
phone
)
&&
formData
.
code
&&
formData
.
code
.
length
==
4
:
formData
.
account
&&
formData
.
password
}
this
.
setData
({
disabled
:
!
disabled
})
...
...
login/index/index.wxml
View file @
250ab78
...
...
@@ -2,6 +2,8 @@
<mask show="{{loading}}"></mask>
<navigation-bar navStyle="background-color: rgba(0,0,0,0)">生意助手</navigation-bar>
<box loginType="{{loginType}}" disabled="{{disabled}}" id="box" />
{{test4}}
<agree show="{{loginType == 2}}" text="7天内免登陆" value="{{autoLogin}}" bindchange="changeAgree" />
{{test}}
<type-list loginType="{{loginType}}" />
</view>
\ No newline at end of file
密码.txt
View file @
250ab78
cxserviceShop 5393603egh(开发)
账号登录: 10988866666(超管)xiong110
测试环境 bb123456 密码 bb123456
xiaoxiong1hao a123456
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment