@@ -26,6 +26,7 @@
</template>
<script>
+ import {logout} from '@/api/login.js'
export default {
data() {
return {
@@ -54,7 +55,22 @@
},
// 退出登录
quitSys(){
-
+ let _this = this
+ uni.showModal({
+ title: '提示',
+ content: '您确定要退出登录吗?',
+ success(res) {
+ if (res.confirm) {
+ logout({}).then(res => {
+ getApp().globalData.token = ''
+ _this.$u.vuex('vuex_token','')
+ uni.reLaunch({
+ url: '/pages/index/index'
+ });
+ }
bindGetUserInfo(res){
console.log(res)