Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
gd_yc
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
ebc3e072
authored
2025-08-14 16:32:54 +0800
by
华明祺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
63be4379
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletions
src/common/login.js
src/common/request.js
src/common/login.js
View file @
ebc3e07
...
...
@@ -181,6 +181,7 @@ function getNowOpenId() {
}
function
h5Login
(
userName
)
{
uni
.
showLoading
({})
return
request
({
url
:
`/h5Login`
,
method
:
'post'
,
...
...
@@ -189,11 +190,13 @@ function h5Login(userName) {
}
}).
then
((
res
)
=>
{
uni
.
setStorageSync
(
'token'
,
res
.
data
.
token
);
}).
finally
(()
=>
{
uni
.
hideLoading
()
})
}
function
showLogin
(
callback
)
{
uni
.
removeStorageSync
(
"
token
"
)
uni
.
removeStorageSync
(
"
userName
"
)
uni
.
showModal
({
title
:
'请输入身份证,进行身份验证'
,
...
...
src/common/request.js
View file @
ebc3e07
...
...
@@ -62,7 +62,10 @@ let request = function(req) {
const
baseUrl
=
config
.
localPort
+
'/jsintszxd/request'
if
(
req
.
method
===
'POST'
)
{
if
(
token
)
{
req
.
params
.
userNo
=
token
}
url
=
baseUrl
data
=
{
appSecretId
:
config
.
appSecretId
,
...
...
@@ -90,7 +93,10 @@ let request = function(req) {
}
}
else
{
if
(
req
.
method
===
'POST'
)
{
if
(
token
)
{
req
.
params
.
userNo
=
token
}
data
=
{
jsonBody
:
JSON
.
stringify
(
req
.
params
)
}
...
...
Write
Preview
Styling with
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