Ver código fonte

增加弹窗

tanxue 5 meses atrás
pai
commit
f4c773ec6d
1 arquivos alterados com 8 adições e 10 exclusões
  1. 8 10
      pages/my/index.vue

+ 8 - 10
pages/my/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="lli-develop-expect-page">
-			<button class="lli-btn" @click="quit">退出登录</button>
+			<button class="lli-btn" @click="quitClick">退出登录</button>
 					<CustomTabBar></CustomTabBar>
 	</view>
 </template>
@@ -20,9 +20,7 @@
 		        content: '你确定要执行这个操作吗?',
 		        success: (res) => {
 		          if (res.confirm) {
-		            // 用户点击了确定按钮,执行你的操作
-		            console.log('用户点击了确定');
-		           quit()
+		            quit();
 		          } else if (res.cancel) {
 		            // 用户点击了取消按钮
 		            console.log('用户点击了取消');
@@ -31,12 +29,12 @@
 		      });
 		
 		 }
-	const quit = ()=>{
-			uni.navigateTo({
-				url: '/pages/login/index'
-			});
-		
-		 }
+		 const quit = ()=>{
+		 			uni.navigateTo({
+		 				url: '/pages/login/index'
+		 			});
+		 		
+		 		 }
 		 onLoad((options) => {
 			const instance = getCurrentInstance();
 		 	console.log(instance.appContext.config.globalProperties)