|
@@ -45,12 +45,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="bottom-cont" style="color: dodgerblue;" @click="loginOut">
|
|
|
+ <view class="bottom-cont" style="color: dodgerblue;" @click="quitOut">
|
|
|
退出登录
|
|
|
</view>
|
|
|
- <uni-popup ref="openModal" type="center">
|
|
|
- <uni-popup-dialog content="确定退出登录吗?" @confirm="onOk" :title="title"></uni-popup-dialog>
|
|
|
- </uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -118,18 +115,21 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- loginOut(){
|
|
|
- this.$refs.openModal.open()
|
|
|
- },
|
|
|
- onOk(){
|
|
|
- this.$refs.openModal.close()
|
|
|
- this.$store.dispatch('userLogout');
|
|
|
- setTimeout(function(){
|
|
|
- uni.redirectTo({
|
|
|
- url: '/pages/login/login'
|
|
|
- });
|
|
|
- },300)
|
|
|
- }
|
|
|
+ quitOut(){
|
|
|
+ let _this = this
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定退出登录吗?',
|
|
|
+ success: (ret) => {
|
|
|
+ if(ret.confirm){
|
|
|
+ _this.$store.dispatch('userLogout');
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages/login/login'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
</script>
|