فهرست منبع

feat(setting): 确认清除缓存弹窗
feat(work): 日报宫格跳转 腾讯文档

HMY 1 سال پیش
والد
کامیت
a64a2a198b

+ 38 - 7
pages/mine/checkIn/checkIn.vue

@@ -42,19 +42,34 @@
 			<view class="check-in-container">
 				<text class="title2">今日签到信息</text>
 				<view class="info-row">
-					<text class="value">日期:</text>
+					<view>
+						<image :src="dateImg" class="icon"></image>
+						<text class="value">日期:</text>
+					</view>
+					
 					<text class="label">{{todayData.day}}</text>
 				</view>
 				<view class="info-row">
-					<text class="value">晨签时间:</text>
+					<view>
+						<image :src="dayImg" class="icon"></image>
+						<text class="value">晨签时间:</text>
+					</view>
 					<text class="label">{{todayData.startTime || '未打卡'}} </text>
 				</view>
 				<view class="info-row">
-					<text class="value">晚签时间:</text>
+					<view>
+						<image :src="nightImg" class="icon"></image>
+						<text class="value">晚签时间:</text>
+					</view>
+					
 					<text class="label">{{todayData.endTime || '未打卡'}} </text>
 				</view>
 				<view class="info-row">
-					<text class="value">状态:</text>
+					<view>
+						<image :src="checkInStatusImg" class="icon"></image>
+						<text class="value">状态:</text>
+					</view>
+					
 					<text class="label">{{todayData.status}}</text>
 				</view>
 			</view>
@@ -79,6 +94,10 @@
 		onMounted,
 		reactive
 	} from 'vue';
+	import dateImg from "/static/images/mine/date.png"
+	import dayImg from "/static/images/mine/day.png"
+	import nightImg from "/static/images/mine/night.png"
+	import checkInStatusImg from "/static/images/mine/checkInStatus.png"
 
 
 	// 创建一个响应式对象记录今天的考勤数据
@@ -346,6 +365,10 @@
 		font-weight: bold;
 		color: #333;
 	}
+	
+	.value, .label {
+	    line-height: 50rpx; /* 与图标高度一致,确保垂直对齐 */
+	}
 
 	.chart-container {
 		margin-top: 20px;
@@ -393,14 +416,12 @@
 	.info-row {
 		width: 100%;
 		display: flex;
+		align-items: center;
 		justify-content: space-between;
 		margin-bottom: 10px;
 	}
 
 
-
-
-
 	.todayCheckIn,
 	.chart-container,
 	.statistics {
@@ -414,4 +435,14 @@
 	.statistics.show {
 		display: block;
 	}
+	
+	.icon {
+	    width: 50rpx; 
+	    height: 50rpx; 
+	    margin-right: 20rpx; 
+	    vertical-align: middle; /* 确保图标与文本竖直居中 */
+	}
+	
+
+
 </style>

+ 55 - 48
pages/mine/setting/setting.vue

@@ -28,9 +28,9 @@
 			<button type="warn" @click="logOut">退出登录</button>
 		</view>
 
-		
-		
-		
+
+
+
 	</view>
 </template>
 
@@ -39,60 +39,69 @@
 	// 退出登录
 	function logOut() {
 		uni.showModal({
-		    title: '系统提示',
-		    content: '确定注销并退出系统吗?',
-		    success: function (res) {
-		        if (res.confirm) {
-		            console.log('用户点击确定');
-		        } else if (res.cancel) {
-		            console.log('用户点击取消');
-		        }
-		    }
+			title: '系统提示',
+			content: '确定注销并退出系统吗?',
+			success: function(res) {
+				if (res.confirm) {
+					console.log('用户点击确定');
+				} else if (res.cancel) {
+					console.log('用户点击取消');
+				}
+			}
 		});
 	};
 	// 清理缓存
 	function clearCache() {
-      uni.clearStorageSync();
-      // 提示用户缓存清理成功
-      uni.showToast({
-        title: '缓存清理成功',
-        icon: 'success',
-        duration: 2000
-      });
-    }
+		uni.showModal({
+			title: '系统提示',
+			content: '是否确定要清理缓存?',
+			success: function(res) {
+				if (res.confirm) {
+					uni.clearStorageSync();
+					// 提示用户缓存清理成功
+					uni.showToast({
+						title: '缓存清理成功',
+						icon: 'success',
+						duration: 2000
+					});
+				} else if (res.cancel) {
+					console.log('用户点击取消');
+				}
+			}
+		});
+
+	}
 	// 修改密码
-	function pwdEdit(){
+	function pwdEdit() {
 		$tab.navigateTo('/pages/mine/setting/pwdEdit/pwdEdit');
 	};
 	// 检查更新
-	function checkUpdate(){
+	function checkUpdate() {
 		const updateManager = uni.getUpdateManager();
-		updateManager.onCheckForUpdate(function (res) {
-		  // 请求完新版本信息的回调
-		  if(res.hasUpdate){
-			  updateManager.onUpdateReady(function (res) {
-			    uni.showModal({
-			      title: '更新提示',
-			      content: '新版本已经准备好,是否重启应用?',
-			      success(res) {
-			        if (res.confirm) {
-			          // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
-			          updateManager.applyUpdate();
-			        }
-			      }
-			    });
-			  
-			  });
-		  }else{
-			  uni.showToast({
-			    title: '暂无版本更新',
-			    icon: 'none'
-			  });
-		  }
+		updateManager.onCheckForUpdate(function(res) {
+			// 请求完新版本信息的回调
+			if (res.hasUpdate) {
+				updateManager.onUpdateReady(function(res) {
+					uni.showModal({
+						title: '更新提示',
+						content: '新版本已经准备好,是否重启应用?',
+						success(res) {
+							if (res.confirm) {
+								// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+								updateManager.applyUpdate();
+							}
+						}
+					});
+
+				});
+			} else {
+				uni.showToast({
+					title: '暂无版本更新',
+					icon: 'none'
+				});
+			}
 		});
 	}
-
-	
 </script>
 
 <style lang="scss" scoped>
@@ -108,6 +117,4 @@
 		border-bottom: 1px solid #eee;
 		font-size: 16px;
 	}
-
-	
 </style>

+ 9 - 2
pages/work/index.vue

@@ -105,10 +105,17 @@
 		// 跳转流程申请页面
 		$tab.navigateTo('/pages/work/edit/index?title=' + '')
 	}
-	function changeDiaryGrid() {
-		
+	function changeDiaryGrid(e) {
+		if (1 == e.detail.index) { // 打开计算器弹出层
+			wx.navigateToMiniProgram({
+				appId: 'wxd45c635d754dbf59',
+				path: `pages/detail/detail?url=https://docs.qq.com/sheet/DZndGYU5aWVBpR1Nm`
+			})
+			return
+		}
 	}
 	function changeToolsGrid(e) { // 点击工具宫格
+
 		if (1 == e.detail.index) { // 打开计算器弹出层
 			openCalculatorPopup()
 			return

BIN
static/images/mine/checkInStatus.png


BIN
static/images/mine/date.png


BIN
static/images/mine/day.png


BIN
static/images/mine/night.png