From f749acb5581d9b4fe6d697fd1b3320cf6be7e7ea Mon Sep 17 00:00:00 2001
From: hejianhao <15708179461@qq.com>
Date: 星期四, 13 三月 2025 16:05:26 +0800
Subject: [PATCH] 首页切换角色弹窗

---
 H5/static/closeImg.png   |    0 
 H5/pages/index/index.vue |   39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/H5/pages/index/index.vue b/H5/pages/index/index.vue
index cb74a71..2724506 100644
--- a/H5/pages/index/index.vue
+++ b/H5/pages/index/index.vue
@@ -98,6 +98,23 @@
 			</view>
 		</view>
 		<popupCertificate :show="isClick" @onCancel="isClick=false"></popupCertificate>
+
+		<!-- 用户多个角色时切换角色弹窗 -->
+		<u-popup :show="changeRolePopup" round="16rpx" @close="changeRolePopup = false">
+			<view class="relative">
+				<image @tap.stop="changeRolePopup = false" src="@/static/closeImg.png" class="w-35 h-35 absolute"
+					style="right: 31rpx;top: 46rpx;" />
+				<view class="txt-center pt-38 pb-40 fs-35 lh-48 font-bold">选择角色</view>
+				<view class="lineBox mb-10"></view>
+				<view style="height: 546rpx;overflow-y: auto;">
+					<view @tap.stop="changeRole(item)" v-for="(item,index) in 10" :key="index"
+						:class="index == activeRole && 'bgcolor2'"
+						class="mt-38 bgcolor1 br-58 fs-31 ml-54 mr-62 py-37 txt-center">
+						<view>XXXXXXXX管理员</view>
+					</view>
+				</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -130,6 +147,8 @@
 				isLoading: false,
 				noreadlist: [],
 				noreadlists: [],
+				changeRolePopup: true,
+				activeRole: 1,
 			}
 		},
 		onPullDownRefresh() {
@@ -153,6 +172,10 @@
 			this.getappletcinfo()
 		},
 		methods: {
+			changeRole(item) {
+				this.activeRole = item - 1
+				this.changeRolePopup = false
+			},
 			Allread() {
 				getread().then(resp => {
 
@@ -290,6 +313,16 @@
 
 	.color4 {
 		color: rgba(0, 0, 0, 0.4);
+	}
+
+	.bgcolor1 {
+		background: #F7F7F7;
+	}
+
+	.bgcolor2 {
+		color: #fff;
+		background: #FC8D55;
+		box-shadow: 0rpx 4rpx 19rpx 0rpx rgba(239, 119, 58, 0.5);
 	}
 
 	.bg1 {
@@ -465,4 +498,10 @@
 		color: #FFFFFF;
 		font-weight: 600;
 	}
+
+	.lineBox {
+		width: 100%;
+		height: 1rpx;
+		background: #E5E5E5;
+	}
 </style>
\ No newline at end of file
diff --git a/H5/static/closeImg.png b/H5/static/closeImg.png
new file mode 100644
index 0000000..3cbb307
--- /dev/null
+++ b/H5/static/closeImg.png
Binary files differ

--
Gitblit v1.7.1