Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jd-vx-app
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
jd-vx-app
Commits
4473daa3
Commit
4473daa3
authored
Apr 25, 2022
by
肖健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
授权登录页面调整
parent
15fb2b08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
31 deletions
+37
-31
index.vue
pages/binding/index.vue
+37
-31
No files found.
pages/binding/index.vue
View file @
4473daa3
...
...
@@ -20,7 +20,13 @@
</view>
-->
<view
v-if=
"isCanUse2"
>
<view>
<button
class=
"login__btn"
:disabled=
"!checked"
hover-class=
"none"
type=
'primary'
open-type=
"getPhoneNumber"
@
getphonenumber=
"getPhoneNumber"
>
<button
class=
"login__btn"
v-if=
"!checked"
@
click=
""
hover-class=
"none"
type=
'primary'
@
click=
"checkLogin"
>
微信一键登录
</button>
<button
class=
"login__btn"
v-if=
"checked"
@
click=
""
hover-class=
"none"
type=
'primary'
open-type=
"getPhoneNumber"
@
getphonenumber=
"getPhoneNumber"
>
微信一键登录
</button>
</view>
...
...
@@ -42,48 +48,50 @@
export
default
{
data
()
{
return
{
checked
:
tru
e
,
checked
:
fals
e
,
code
:
""
,
isCanUse
:
false
,
//默认为true
isCanUse2
:
false
,
//默认为true
openid
:
''
,
nc_protocol
:
false
,
//扫描二维码参数
//扫描二维码参数
scene
:
""
,
//检查绑定挪车码
checkCode
:
{},
//检查绑定挪车码
checkCode
:
{},
};
},
methods
:
{
methods
:
{
changeBtn
()
{
this
.
checked
=
!
this
.
checked
;
},
//登录
login
()
{
let
_this
=
this
;
uni
.
showLoading
({
title
:
'登录中...'
checkLogin
()
{
uni
.
showToast
({
title
:
"请先阅读并同意《京东用户注册协议》、《京东隐私政策》"
,
icon
:
'none'
,
duration
:
2000
,
});
},
//检查挪车码存在、是否绑定
getCheckMoveCode
(){
let
opts
=
{
url
:
'/app/index/check/move/code'
,
method
:
'post'
};
this
.
http
.
httpTokenRequest
(
opts
,
{
code
:
this
.
scene
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
checkCode
=
res
.
data
.
data
//未绑定了的情况
if
(
!
this
.
checkCode
.
bindFlag
){
uni
.
navigateTo
({
url
:
'/pagesB/pages/move-car/scan?moveCode='
+
this
.
checkCode
.
code
})
}
else
if
(
this
.
checkCode
.
selfFlag
){
}
else
{
}
}
})
},
//检查挪车码存在、是否绑定
getCheckMoveCode
(){
let
opts
=
{
url
:
'/app/index/check/move/code'
,
method
:
'post'
};
this
.
http
.
httpTokenRequest
(
opts
,
{
code
:
this
.
scene
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
checkCode
=
res
.
data
.
data
//未绑定了的情况
if
(
!
this
.
checkCode
.
bindFlag
){
uni
.
navigateTo
({
url
:
'/pagesB/pages/move-car/scan?moveCode='
+
this
.
checkCode
.
code
})
}
else
if
(
this
.
checkCode
.
selfFlag
){
}
else
{
}
}
})
},
async
wechatLogin
()
{
wx
.
login
({
success
:
(
res
)
=>
{
...
...
@@ -206,8 +214,6 @@ export default {
this
.
scene
=
scene
;
}
this
.
wechatLogin
()
let
userToken
=
uni
.
getStorageSync
(
'userToken'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment