Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mingPayMobile
Overview
Overview
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
fengzhaoyu
mingPayMobile
Commits
6c53cb2b
Commit
6c53cb2b
authored
Oct 16, 2020
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:login minguserId ===>username
parent
6d50c0f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
login.js
API/login.js
+3
-2
action.js
pages/action/action.js
+4
-1
No files found.
API/login.js
View file @
6c53cb2b
const
login
=
()
=>
{
const
app
=
getApp
()
let
mingUserId
=
dd
.
getStorageSync
({
key
:
'mingUserId'
}).
data
let
username
=
dd
.
getStorageSync
({
key
:
'username'
}).
data
// 有token
if
(
dd
.
getStorageSync
({
key
:
'token'
}).
data
&&
dd
.
getStorageSync
({
key
:
'token'
}).
data
.
access_token
)
{
let
hasToken
=
dd
.
getStorageSync
({
key
:
'token'
}).
data
;
// token
...
...
@@ -92,8 +93,8 @@ const login = () => {
'Content-Type'
:
'application/x-www-form-urlencoded'
},
data
:
{
username
:
mingUserId
,
password
:
mingUserId
,
username
:
username
,
password
:
username
,
scope
:
'server'
,
grant_type
:
'password'
},
...
...
pages/action/action.js
View file @
6c53cb2b
...
...
@@ -54,10 +54,13 @@ Page({
method
:
'POST'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
console
.
log
(
res
,
'11111111'
)
if
(
res
.
data
.
resultCode
==
0
)
{
const
data
=
res
.
data
.
data
dd
.
setStorageSync
({
key
:
'username'
,
data
:
data
.
username
})
dd
.
setStorageSync
({
key
:
'mingUserId'
,
data
:
data
.
mingUserId
})
...
...
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