-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e198ce5
commit b4f8cd4
Showing
15 changed files
with
295 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<template> | ||
<div :class="$style.go">跳转中......</div> | ||
<div :class="$style.go">登录中......</div> | ||
</template> | ||
<script> | ||
import 'whatwg-fetch' | ||
|
@@ -8,18 +8,16 @@ import FETCH from '../common/fetch.js' | |
export default { | ||
mounted() { | ||
// Cookie.setCookie("token", "value.token", 3000) | ||
Cookie.setCookie("email", "[email protected]", 3000) | ||
// Cookie.setCookie("uid", "4", 3000) | ||
FETCH.FetchData("/api/v1.0/login","POST",{ | ||
FETCH.FetchData("/api/v1.0/login/","POST",{ | ||
email: Cookie.getCookie("email"), | ||
password:"1234" | ||
}).then(value => { | ||
console.log(value) | ||
Cookie.setCookie("token", value.token, 3000) | ||
Cookie.setCookie("uid", value.uid, 3000) | ||
Cookie.setCookie("token", value.token) | ||
Cookie.setCookie("uid", value.uid) | ||
setTimeout(() => { | ||
window.location = "/" | ||
window.history.back(-1); | ||
}, 2000) | ||
}) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<template> | ||
<div v-show="returnIt" :class="$style.suggestMask"> | ||
<div :class="$style.returnCard"> | ||
<div :class="$style.returnContent">退出登录后,将不能发表评论和收藏内容。确认退出?</div> | ||
<div :class="$style.returnButton" v-on:click="exit">退出</div> | ||
<div :class="$style.returnButton" v-on:click="quit">取消</div> | ||
</div> | ||
</div> | ||
</template> | ||
<script> | ||
import Cookie from '../../common/cookie.js' | ||
export default { | ||
methods: { | ||
quit() { | ||
this.$parent.returnIt = false | ||
}, | ||
exit() { | ||
Cookie.delCookie("token") | ||
Cookie.delCookie("uid") | ||
window.location = "/" | ||
} | ||
} | ||
} | ||
</script> | ||
<style lang="sass" module> | ||
@import '../../scss/color.scss'; | ||
.suggestMask { | ||
position: fixed; | ||
top: 0; | ||
bottom: 0; | ||
width: 100%; | ||
background-color: rgba(51, 51, 51, 0.85); | ||
} | ||
.returnCard { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
width: 250px; | ||
height: 90px; | ||
background-color: $white; | ||
color: $black; | ||
padding: 15px; | ||
border-radius: 2px; | ||
transform: translate(-50%, -50%); | ||
} | ||
.returnButton { | ||
float: right; | ||
margin-left: 25px; | ||
color: $orange; | ||
cursor: pointer; | ||
margin-top: 16px; | ||
} | ||
</style> |
Oops, something went wrong.