From db9cf0e24e4d0a3953a98eb222a643eece4a6748 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sun, 04 Jul 2021 08:32:29 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android

---
 pages/clockSignIn/clockSignIn.vue |   96 +++++++++++++++++++++++++++++-------------------
 1 files changed, 58 insertions(+), 38 deletions(-)

diff --git a/pages/clockSignIn/clockSignIn.vue b/pages/clockSignIn/clockSignIn.vue
index 62975b8..48527fa 100644
--- a/pages/clockSignIn/clockSignIn.vue
+++ b/pages/clockSignIn/clockSignIn.vue
@@ -1,7 +1,7 @@
 <template>
 	<view class="content">
 		<!-- 自定义顶部导航栏 -->
-		<view class="uni-nav-bar-info" :fixed="true" :status-bar="true">
+		<!-- <view class="uni-nav-bar-info" :fixed="true" :status-bar="true">
 			<view class="uni-nav-bar-left" @click="goBack()">
 				<image src="../../static/images/nav/back02.png" />
 			</view>
@@ -9,7 +9,16 @@
 			<view class="right">
 				<view class="title-right">打卡记录</view>
 			</view>
-		</view>
+		</view> -->
+		<u-navbar 
+			:is-back="true" 
+			title="考勤打卡" 
+			:background="background"
+			back-icon-color="#FFF"
+			title-color="#FFF"
+			>
+			<view class="navbar-right" slot="right">考勤记录</view>	
+		</u-navbar>
 		<view class="clock-time-background"></view>
 		<view class="clock-time">
 			<view class="clock-info">
@@ -51,7 +60,10 @@
 				name:'',
 				jd:'',
 				wd:'',
-				address:''
+				address:'',
+				background:{
+					backgroundColor:"#0BB9C8"
+				}
 			}
 		},
 		mounted() {
@@ -105,38 +117,36 @@
 			//去打卡
 			goClock() {
 			    var that = this;
-			    axios({
-			        method: "POST",
-			        url: this.$store.state.piAPI + `/attendance/AppSave`,
-			        params: {
-			            number: this.$store.state.puserID,
-			            name: this.name,
-			            clockTime: this.getNowTime(1),
-			            jd: this.jd,
-			            wd: this.wd,
-			            address: this.address
-			        },
-			    }).then((resdata) => {
-			        //不在考勤范围内
-			        if (resdata.data.code == 400) {
-			            layui.use('layer', function() {
-			                var layer = layui.layer;
-			                layer.msg('打卡失败,不在考勤范围', {
-			                    icon: 0
-			                });
-			            });
-			        }
-			        //打卡成功
-			        if (resdata.data.code == 200) {
-			            layui.use('layer', function() {
-			                var layer = layui.layer;
-			                layer.msg('打卡成功!', {
-			                    icon: 1
-			                });
-			            });
-			        }
-			
-			    });
+			    uni.request({
+			    	url: this.$store.state.piAPI + `/attendance/AppSave`,
+					method: "POST",
+					data:{
+					    number: this.$store.state.puserID,
+					    name: this.name,
+					    clockTime: this.getNowTime(1),
+					    jd: this.jd,
+					    wd: this.wd,
+					    address: this.address
+					},
+					success(resdata) {
+						//不在考勤范围内
+						if (resdata.data.code == 400) {
+							uni.showToast({
+							    title: '不在考勤范围,打卡失败!',
+								icon:'none',
+							    duration: 2000
+							});
+						}
+						//打卡成功
+						if (resdata.data.code == 200) {
+							uni.showToast({
+							    title: '打卡成功!',
+								icon:'success',
+							    duration: 2000
+							});
+						}
+					}
+			    })
 			},
 			
 			//获取当前时间
@@ -185,7 +195,8 @@
 	page{
 		width: 100%;
 		height: 100%;
-		background-color: #FCFBFC;
+		/* background-color: #FCFBFC; */
+		background-color: #F7f7f7;
 	}
 </style>
 
@@ -211,6 +222,14 @@
 		display: flex;
 		align-items: center;
 		justify-content: center;
+	}
+	
+	
+	.navbar-right{
+		color: #fff;
+		font-size: 0.7rem;
+		margin-right: 1.5rem;
+		margin-top: 0.2rem;
 	}
 	
 	.content{
@@ -266,7 +285,8 @@
 		.clock-time-background{
 			width: 100%;
 			height: 15rem;
-			background-color: #F5F5F5;
+			// background-color: #F5F5F5;
+			background-color: #F3F3F3;
 		}
 		
 		
@@ -343,7 +363,7 @@
 							height: 6rem;
 							border-radius: 100px;
 							color: #FFFFFF;
-							background-image: linear-gradient(to bottom,#65CBA9,#66D0AC);
+							background-image: linear-gradient(to bottom,#0FD0E1,#0FD0E1);
 							display: flex;
 							flex-direction: column;
 							align-items: center;

--
Gitblit v1.9.3