Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sfp-program
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
sfp-program
Commits
47d5ab12
Commit
47d5ab12
authored
Oct 14, 2022
by
kyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
token校验有效性
parent
8d8144bb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletions
+29
-1
pages/housePurchase/housePurchase.vue
+14
-0
pages/index/index.vue
+14
-0
pages/nav/nav.vue
+1
-1
No files found.
pages/housePurchase/housePurchase.vue
View file @
47d5ab12
...
...
@@ -318,6 +318,17 @@
this
.
provCityQry
();
},
methods
:{
checkToken
(){
api
.
checkToken
().
then
(
res
=>
{
if
(
res
[
'success'
]){}
else
{
api
.
obtainToken
().
then
(
res
=>
{
if
(
res
.
success
){
uni
.
setStorageSync
(
'uni-token'
,
res
.
data
[
'token'
]);
}
})
}
})
},
radioChange
:
function
(
evt
)
{
for
(
let
i
=
0
;
i
<
this
.
chartsLegends
.
length
;
i
++
)
{
if
(
this
.
chartsLegends
[
i
].
value
===
evt
.
detail
.
value
)
{
...
...
@@ -629,6 +640,9 @@
this
.
planningParams
=
{};
this
.
resultFlag
=
false
;
}
},
mounted
()
{
this
.
checkToken
();
}
}
</
script
>
...
...
pages/index/index.vue
View file @
47d5ab12
...
...
@@ -257,6 +257,17 @@
}
},
methods
:
{
checkToken
(){
api
.
checkToken
().
then
(
res
=>
{
if
(
res
[
'success'
]){}
else
{
api
.
obtainToken
().
then
(
res
=>
{
if
(
res
.
success
){
uni
.
setStorageSync
(
'uni-token'
,
res
.
data
[
'token'
]);
}
})
}
})
},
getFollowData
(
e
){
this
.
isNeedOfficialAccountQrcode
=
ref
(
e
);
console
.
log
(
'父组件拿到值了'
,
e
);
...
...
@@ -613,6 +624,9 @@
this
.
calcuteMethod
=
'2'
;
this
.
resultShowFlag
=
true
;
}
},
mounted
()
{
this
.
checkToken
();
}
}
...
...
pages/nav/nav.vue
View file @
47d5ab12
...
...
@@ -3,7 +3,7 @@
<ul>
<li
v-for=
"item in moduleLists"
:key=
"item.no"
>
<navigator
:url=
"item.path"
hover-class=
"other-navigator-hover"
>
<view
class=
"imgContainer"
><img
:src=
"`
../..
/static/images/$
{item.background}`" alt="" srcset="">
</view>
<view
class=
"imgContainer"
><img
:src=
"`
/sfp
/static/images/$
{item.background}`" alt="" srcset="">
</view>
<text
:style=
"
{color:item.color}">
{{
item
.
name
}}
</text>
</navigator>
</li>
...
...
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