Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
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
Raphaël PEIM
projet-cdaw
Commits
48ca5a32
Commit
48ca5a32
authored
Dec 05, 2020
by
raphael.peim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment main.js
parent
8213f947
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
main.js
frontend/src/main.js
+5
-0
No files found.
frontend/src/main.js
View file @
48ca5a32
...
...
@@ -6,13 +6,17 @@ import '@/assets/css/style.css'
import
'bootstrap/dist/css/bootstrap.css'
import
'bootstrap-vue/dist/bootstrap-vue.css'
// Use
Vue
.
use
(
BootstrapVue
)
// Variables
Vue
.
config
.
productionTip
=
false
Vue
.
prototype
.
$hostname
=
Vue
.
config
.
productionTip
?
'https://hostname'
:
'http://localhost:8080'
Vue
.
prototype
.
$apiUrl
=
'http://localhost:8888/IMT/CDAW/BackEnd/api/index.php'
// Mixin
Vue
.
mixin
({
// Vérification de la connexion selon l'existence du token
created
:
function
()
{
if
(
localStorage
.
token
===
undefined
&&
this
.
$route
.
name
!=
'Index'
&&
this
.
$route
.
name
!=
'Signup'
)
{
window
.
location
.
href
=
'/#/'
...
...
@@ -22,6 +26,7 @@ Vue.mixin({
}
},
methods
:
{
// Requête bloquée
isExpired
()
{
fetch
(
this
.
$apiUrl
+
'/validatetoken'
,
{
method
:
'GET'
,
...
...
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