From 805546268abc5687dbefdd40cd927da62b096fad Mon Sep 17 00:00:00 2001
From: li-guang <153605324@qq.com>
Date: Thu, 31 Dec 2020 16:50:00 +0800
Subject: [PATCH] 领用
---
hive-app/pages/mine/setting.vue | 39 +++++++++++++++++++++++++++++++++++++--
1 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/hive-app/pages/mine/setting.vue b/hive-app/pages/mine/setting.vue
index 8cb4860..24e8814 100644
--- a/hive-app/pages/mine/setting.vue
+++ b/hive-app/pages/mine/setting.vue
@@ -2,14 +2,49 @@
<!-- 设置 -->
<view class="container">
<view class="flex justify-between content-row mb-20">
- <text class="font-16">修改密码</text>
+ <text class="font-16">修改登录密码</text>
<text class="iconfont iconarrow-backimg gray"></text>
</view>
- <button class="blue-btn">退出登录</button>
+ <button class="blue-btn" @click="loginOut" v-if="isLogin==1">退出登录</button>
</view>
</template>
<script>
+ export default{
+ data(){
+ return {
+ isLogin: null
+ }
+ },
+ onLoad(options) {
+ this.isLogin = options.isLogin;
+ },
+ methods:{
+ loginOut(){
+ uni.showModal({
+ title: '提示',
+ content: '确定要退出登录吗?',
+ success: (res) => {
+ if (res.confirm) {
+ this.$httpUtils.request('/api/user/loginOut').then((res) => {
+ if(res.status==200){
+ uni.removeStorage({
+ key: 'userInfo',
+ success: function (res) {
+ uni.reLaunch({
+ url: '../login/index?isNotLogin=1'
+ })
+ }
+ });
+ }
+ this.$toast.info(res.info)
+ })
+ }
+ }
+ });
+ }
+ }
+ }
</script>
<style>
--
Gitblit v1.9.1