فهرست منبع

退出登录增加二次提醒弹窗

tanxue 5 ماه پیش
والد
کامیت
02c4cbdba7
2فایلهای تغییر یافته به همراه31 افزوده شده و 16 حذف شده
  1. 24 1
      common/styles/global/pages.scss
  2. 7 15
      pages/my/index.vue

+ 24 - 1
common/styles/global/pages.scss

@@ -575,7 +575,7 @@
 	}
 	.hyqy-box{background-image: url("@/static/images/my/hyqy-img.png");}
 	// 未登录的值----待修改
-	.hyqy-disabled-box{background-image: url("@/static/images/my/hyqy-img.png");}
+	.hyqy-disabled-box{background-image: url("@/static/images/my/hyqy-img-disabled.png");}
 	.my-list-box{
 		width:700rpx;margin: 36rpx auto 0;
 		.list-row{border-bottom: 2rpx solid #5bcdfb;color: #fff;box-sizing: border-box;padding: 30rpx 20rpx;
@@ -615,6 +615,29 @@
 	@include ezy-no-repeat-cover;background-image: url("@/static/images/my/my-page-img.png");
 }
 
+// 退出弹窗
+.exit-dialog{
+	.exit-content-box{
+		width: 625rpx;height: 365rpx;box-sizing: border-box;padding: 42rpx 48rpx;text-align:center;
+		@include ezy-no-repeat-cover;background-image: url("@/static/images/my/my-exit-bj.png");
+	}
+	.exit-title{
+		color: #343434;font-size: 38rpx;margin-bottom: 24rpx;
+	}
+	.exit-two-title{
+		color: #666;font-size: 32rpx;padding-bottom: 42rpx;
+		border-bottom: 1px dashed #70cbf4;
+	}
+	.exit-btn-box{
+		width: 100%;display: flex;justify-content: space-between;
+		.not-confirm-btn,.confirm-btn{
+			width: 208rpx;height: 83rpx;@include ezy-no-repeat-cover;margin: 30rpx 32rpx 0;
+		}
+		.not-confirm-btn{background-image: url("@/static/images/my/exit-cancel-btn.png");}
+		.confirm-btn{background-image: url("@/static/images/my/exit-confirm-btn.png");}
+	}
+}
+
 // SVIP
 .ezy-svip-page{
 	width: 100%;height: 100vh;background-color: #23befb;position: relative;

+ 7 - 15
pages/my/index.vue

@@ -26,12 +26,13 @@
 				<icon class="list-icon order-icon"></icon>
 				<text>我的订单</text>
 			</view>
-			<view class="list-row" @click="quitClick">
+			<view class="list-row" @click="exitLogin">
 				<icon class="list-icon login-out-icon"></icon>
 				<text>退出登录</text>
 			</view>
 		</view>
 		<CustomTabBar></CustomTabBar>
+		<exit-dialog ref="exitDialogRef" @confirm-btn="exitBtn"></exit-dialog>
 	</view>
 </template>
 
@@ -44,6 +45,7 @@
 	import {getAuth} from '@/utils/auth.js';
 	import {reactive,ref} from "vue";
 	import { toast } from "../../utils/common";
+	import exitDialog from './exitDialog.vue'
 	
 	let loginFlag = ref(false);
 	let myInfoData = reactive({
@@ -52,23 +54,13 @@
 		credit: '',
 		vipFlag: '',
 	});
+	const exitDialogRef = ref(null);
 	
-	const quitClick = () => {
-		uni.showModal({
-			title: '提示',
-			content: '你确定要执行这个操作吗?',
-			success: (res) => {
-				if (res.confirm) {
-					quit();
-				} else if (res.cancel) {
-					console.log('用户点击了取消');
-				}
-			}
-		});
-
+	const exitLogin = () => {
+		exitDialogRef.value.handleShow();
 	}
 
-	const quit = () => {
+	const exitBtn = () => {
 		uni.removeStorage({
 			key: 'Mta-Auth',
 			success: function(res) {