LiGuang 2 年之前
父节点
当前提交
866cf42647
共有 5 个文件被更改,包括 28 次插入11 次删除
  1. 2 2
      common/service/config.service.js
  2. 1 1
      pages/home/home.vue
  3. 10 0
      pages/sign/empsign.vue
  4. 8 0
      pages/sign/empusersign.vue
  5. 7 8
      pages/sign/usersign.vue

+ 2 - 2
common/service/config.service.js

@@ -14,9 +14,9 @@ let BASE_URL = ''
 } */
 
  if (process.env.NODE_ENV == 'development') {
-    BASE_URL = 'http://localhost:8080/jeecg-boot/' // 开发环境
+    BASE_URL = 'http://localhost:8085/jeecg-boot/' // 开发环境
 } else {
-	BASE_URL = 'http://localhost:8080/jeecg-boot/' // 生产环境
+	BASE_URL = 'http://localhost:8085/jeecg-boot/' // 生产环境
 } 
 let staticDomainURL = BASE_URL+ '/sys/common/static';
 

+ 1 - 1
pages/home/home.vue

@@ -118,7 +118,7 @@
 							var dt=res.data.result.user.birthday;
 							var ddt=new Date(dt);
 							var ddr=new Date();
-							if(ddt.getMonth()==ddr.getMonth()&&ddt.getDay()==ddr.getDay()){
+							if(ddt.getMonth()==ddr.getMonth()&&ddt.getDate()==ddr.getDate()){
 								this.isshow=true;
 						}			
 					}

+ 10 - 0
pages/sign/empsign.vue

@@ -43,6 +43,11 @@
 				
 			</view>
 		</view>
+		
+		<view class="cu-load load-modal" v-if="loading">
+				<image src="/static/login3.png" mode="aspectFit" style="top: 35px;"></image>
+				<view class="gray-text" style="margin-top: 35px;">加载中...</view>
+		</view>
 	</div>
 </template>
 
@@ -51,6 +56,7 @@
 	export default {
 		data() {
 			return {
+				loading:false,
 				name:'',
 				currentMonth: 1,
 				currentYear: 1970,
@@ -139,6 +145,7 @@
 				},
 				query(){
 					this.data=[];
+					this.loading=true;
 					var date=this.formatDate(this.currentYear,this.currentMonth,1);
 					this.$http.get(this.userUrl,{params:{username:this.name,date:date}}).then(res=>{
 						if(res.data.length>0){
@@ -156,11 +163,13 @@
 					}
 					}).catch(err => {
 						console.log(err);
+						this.loading=false;
 					}); 
 					
 				},
 				querys(s){
 					this.data=[];
+					this.loading=true;
 					var date=this.formatDate(this.currentYear,this.currentMonth,1);
 						this.$http.get(this.userUrl,{params:{username:s,date:date,depid:this.$store.getters.departId}}).then(res=>{
 							if(res.data.length>0){
@@ -179,6 +188,7 @@
 							
 						}).catch(err => {
 							console.log(err);
+							this.loading=false;
 						}); 
 				},
 				

+ 8 - 0
pages/sign/empusersign.vue

@@ -128,6 +128,10 @@
 				</div>
 				
 				
+				<view class="cu-load load-modal" v-if="loading">
+						<image src="/static/login3.png" mode="aspectFit" style="top: 35px;"></image>
+						<view class="gray-text" style="margin-top: 35px;">加载中...</view>
+				</view>
 			</div>
 	
 
@@ -136,6 +140,7 @@
 	export default {
 		data() {
 			return {
+				loading:false,
 				userUrl:'/attendance/attendance/list2',
 				currentDay: 1,
 				currentMonth: 1,
@@ -221,6 +226,7 @@
 					var date=this.formats(t);
 				}
 				this.SetMdays=this.formatt(date);
+				this.loading=true;
 				this.$http.get(this.userUrl,{params:{userid:this.$store.getters.id,date:date}}).then(res=>{
 					this.SetData=res.data.date;
 					if(res.data.day.length>0&&res.data.day!=[]){
@@ -231,8 +237,10 @@
 					this.count=res.data.count;
 					console.log(res)
 				}).catch(err => {
+					this.loading=false;
 					console.log(err);
 				}); 
+				
 			},
 			formats:function(e){
 				 var date = new Date(e);

+ 7 - 8
pages/sign/usersign.vue

@@ -120,7 +120,10 @@
 				
 			</div>
 		</div>
-		
+		<view class="cu-load load-modal" v-if="loading">
+				<image src="/static/login3.png" mode="aspectFit" style="top: 35px;"></image>
+				<view class="gray-text" style="margin-top: 35px;">加载中...</view>
+		</view>
 		
 	</div>
 	
@@ -131,6 +134,7 @@
 		data() {
 			return {
 				userUrl:'/attendance/attendance/list2',
+				loading:false,
 				currentDay: 1,
 				currentMonth: 1,
 				currentYear: 1970,
@@ -245,32 +249,27 @@
 				if(this.state==2||this.state=="2"){
 					userid=uni.getStorageSync('id');
 				}
-				
+				this.loading=true;
 				this.$http.get(this.userUrl,{params:{userid:userid,date:date}}).then(res=>{
-					
 					this.SetData=res.data.date;
 					if(res.data.day.length>0&&res.data.day!=[]&&res.data.day!=undefined){
 						this.SetDays=res.data.day;
 					}
-					
-					
 					if(res.data.data!=null&&res.data.data.length>0){
 					this.Setdds=res.data.data;	
 					}else{
 						this.Setdds=null;
 					}
-					
 					this.count=res.data.count;
 					if(res.data.work!=null&&res.data.work.length>0){
 						this.work=res.data.work;
 					}else{
 						this.work=null;
 					}
-					
-					console.log(res)
 				}).catch(err => {
 					console.log(err);
 				}); 
+				this.loading=false;
 			},
 			formats:function(e){
 				 var date = new Date(e);