From 45fb4b11ad51bb38306765b11a6747402e382cee Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Sat, 20 Feb 2021 17:37:33 +0800
Subject: [PATCH] fix

---
 hive-app/pages/mine/setting.vue |   54 +++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 43 insertions(+), 11 deletions(-)

diff --git a/hive-app/pages/mine/setting.vue b/hive-app/pages/mine/setting.vue
index f5aff33..510045c 100644
--- a/hive-app/pages/mine/setting.vue
+++ b/hive-app/pages/mine/setting.vue
@@ -1,26 +1,58 @@
 <template>
 	<!-- 设置 -->
 	<view class="container">
-		<!-- #ifndef H5 -->
-		<view class="status_bar"></view>
-		<!-- #endif -->
-		<view class="flex justify-between content-row mb-20">
-			<text class="font-16">修改密码</text>
+		<navigator url="./changePassword" hover-class="none" class="flex justify-between content-row mb-20">
+			<text class="font-16">修改登录密码</text>
 			<text class="iconfont iconarrow-backimg gray"></text>
-		</view>
-		<button class="blue-btn">退出登录</button>
+		</navigator>
+		<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>
-	.container:first-child{
-		border-top: 1px solid #ABB1CC;
+	.container{
+		padding: 0 15px;
 	}
 	.content-row{
-		padding: 10px 15px;
-		border-bottom: 1px solid #ABB1CC;
+		padding: 10px 0px;
+		border-bottom: 1px solid #EDEAF4;
 	}
 </style>

--
Gitblit v1.9.1