Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
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
pseer
gxpt_wechat
Commits
2c6e0dc7
Commit
2c6e0dc7
authored
May 24, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
940066e5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
App.vue
App.vue
+17
-0
login.vue
components/login/login.vue
+0
-2
index.vue
pages/index/index.vue
+2
-0
No files found.
App.vue
View file @
2c6e0dc7
<
script
>
<
script
>
import
Vue
from
'vue'
import
Vue
from
'vue'
import
{
login
}
from
"@/api/index.js"
;
export
default
{
export
default
{
onLaunch
:
function
(
e
)
{
onLaunch
:
function
(
e
)
{
...
@@ -26,6 +27,22 @@
...
@@ -26,6 +27,22 @@
// })
// })
// }
// }
wx
.
login
({
success
:
(
res
)
=>
{
login
(
res
.
code
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
type
===
"login"
)
{
uni
.
setStorageSync
(
'tokenHeaders'
,
"Authori-zation"
)
uni
.
setStorage
({
key
:
uni
.
getStorageSync
(
'tokenHeaders'
),
data
:
res
.
data
.
data
.
token
})
}
}
})
}
})
if
(
uni
.
getStorageSync
(
"storeId"
)){
if
(
uni
.
getStorageSync
(
"storeId"
)){
uni
.
removeStorageSync
(
"storeId"
)
uni
.
removeStorageSync
(
"storeId"
)
}
}
...
...
components/login/login.vue
View file @
2c6e0dc7
...
@@ -66,8 +66,6 @@
...
@@ -66,8 +66,6 @@
})
})
}
}
})
})
},
},
onCancle
(){
onCancle
(){
this
.
$refs
.
popupPhone
.
close
()
this
.
$refs
.
popupPhone
.
close
()
...
...
pages/index/index.vue
View file @
2c6e0dc7
...
@@ -403,10 +403,12 @@
...
@@ -403,10 +403,12 @@
},
},
onGetSysConfig
()
{
onGetSysConfig
()
{
systemConfig
().
then
(
res
=>
{
systemConfig
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
uni
.
setStorage
({
uni
.
setStorage
({
key
:
'sysConfig'
,
key
:
'sysConfig'
,
data
:
res
.
data
.
rows
data
:
res
.
data
.
rows
})
})
}
})
})
},
},
onGetDicts
()
{
onGetDicts
()
{
...
...
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