From f7167fe6e19783eeef8386b5f74dbc7bdfdab327 Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Wed, 09 Mar 2022 11:22:21 +0800
Subject: [PATCH] +宣传已完成没数据已解决

---
 pages/grabOrders/grabOrdersZAXC/map.vue          |    6 ++
 pages/grabOrders/grabOrdersZAYWXC/map.vue        |    5 +
 pages/myself/myself.vue                          |  141 +++++++++++++++++++++++-----------------------
 pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue |    2 
 4 files changed, 83 insertions(+), 71 deletions(-)

diff --git a/pages/grabOrders/grabOrdersZAXC/map.vue b/pages/grabOrders/grabOrdersZAXC/map.vue
index 8341a66..c92e8e5 100644
--- a/pages/grabOrders/grabOrdersZAXC/map.vue
+++ b/pages/grabOrders/grabOrdersZAXC/map.vue
@@ -113,6 +113,12 @@
 				</u-button>
 			</view>
 
+			<view class="once-c" v-if="ourData.buttype == 2">
+				<u-button type="info" :disabled="true">
+					已完成
+				</u-button>
+			</view>
+
 		</view>
 		<u-popup v-model="showIn" mode="bottom" border-radius="14" z-index='1000001' :mask-close-able="true">
 			<view class="Info2">
diff --git a/pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue b/pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue
index 9643196..ce933b7 100644
--- a/pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue
+++ b/pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue
@@ -15,7 +15,7 @@
 							@getOrders="getOrders" @outOrders="outOrders"></page0>
 						<page1 :listData="rightdata" :swiperCurrent="1" v-if="item.name == '可参与'" @openOnce="openOnce"
 							@getOrders="getOrders"></page1>
-						<page2 :listData="rightdata" :swiperCurrent="2" v-if="item.name == '已完成'" @openOnce="openOnce"
+						<page2 :listData="overdata" :swiperCurrent="2" v-if="item.name == '已完成'" @openOnce="openOnce"
 							@getOrders="getOrders"></page2>
 
 						<!-- <view class="a" v-if="item.name == '正在进行'">
diff --git a/pages/grabOrders/grabOrdersZAYWXC/map.vue b/pages/grabOrders/grabOrdersZAYWXC/map.vue
index 3ccfa2e..af31932 100644
--- a/pages/grabOrders/grabOrdersZAYWXC/map.vue
+++ b/pages/grabOrders/grabOrdersZAYWXC/map.vue
@@ -110,6 +110,11 @@
 					{{ourData.num==ourData.jnum?"人数已满":'我参与'}}
 				</u-button>
 			</view>
+			<view class="once-c" v-if="ourData.buttype == 2">
+				<u-button type="info" :disabled="true">
+					已完成
+				</u-button>
+			</view>
 
 		</view>
 		<u-popup v-model="showIn" mode="bottom" border-radius="14" z-index='1000001' :mask-close-able="true">
diff --git a/pages/myself/myself.vue b/pages/myself/myself.vue
index 3391312..7adba21 100644
--- a/pages/myself/myself.vue
+++ b/pages/myself/myself.vue
@@ -16,7 +16,7 @@
 					<view class="dept-name">所属部门:&nbsp;{{deptName}}</view>
 				</view>
 			</view>
-		</view> 
+		</view>
 		<view class="bomBut">
 			<!-- <view class="attendance-btn">
 				<view class="attendance-info"  @click="goToAttendance()">
@@ -105,10 +105,10 @@
 					},
 
 				],
-				tabbar:this.$store.state.tabbar,
-				name:'',
-				id:'',
-				deptName:''
+				tabbar: this.$store.state.tabbar,
+				name: '',
+				id: '',
+				deptName: ''
 			}
 		},
 		components: {
@@ -123,42 +123,42 @@
 			}
 		},
 		onLoad() {
-			if(this.$store.state.puserID){
+			if (this.$store.state.puserID) {
 				//获取个人信息
 				this.getOneselfInFo();
 			}
-			if(this.$store.state.avatar!=null && this.$store.state.avatar!=''){
+			if (this.$store.state.avatar != null && this.$store.state.avatar != '') {
 				this.useimg = this.$store.state.avatar;
 			}
 		},
 		//子页面返回时执行
 		onShow() {
-			
+
 		},
 		methods: {
-			goToAttendance(){
-				
-				if(this.$store.state.UserData.stype != "1"){
+			goToAttendance() {
+
+				if (this.$store.state.UserData.stype != "1") {
 					this.$refs.uToast.show({
 						title: '功能暂未开放',
 						type: 'warning',
 					});
 					return;
 				}
-				
+
 				uni.navigateTo({
-					url:'../clockSignIn/clockSignIn'
+					url: '../clockSignIn/clockSignIn'
 				})
 			},
 			openThere(fn) {
 				this[fn]();
 			},
-			collect(){
+			collect() {
 				uni.navigateTo({
 					url: './childen/collect',
 				})
 			},
-			chenzs(){
+			chenzs() {
 				uni.navigateTo({
 					url: '../shengzs/index',
 				})
@@ -205,17 +205,17 @@
 				});
 			},
 			//登录成功后,获取个人信息
-			getOneselfInFo(){
+			getOneselfInFo() {
 				var that = this;
 				//保安信息查询
 				uni.request({
-					url:that.$store.state.piAPI + '/blade-user/details?id='+this.$store.state.puserID,
-					method:'POST',
+					url: that.$store.state.piAPI + '/blade-user/details?id=' + this.$store.state.puserID,
+					method: 'POST',
 					success(resdata) {
 						that.name = resdata.data.data.realName;
 						that.id = resdata.data.data.id;
 						var dept = resdata.data.data.deptName;
-						if(dept !=null && dept !=""){
+						if (dept != null && dept != "") {
 							var name = dept.split(",");
 							that.deptName = name[name.length - 1];
 						}
@@ -240,21 +240,21 @@
 				var that = this;
 				uni.showActionSheet({
 					// itemList按钮的文字接受的是数组
-					itemList: ["查看头像","拍摄","从相册选择"],
-					success(e){
+					itemList: ["查看头像", "拍摄", "从相册选择"],
+					success(e) {
 						var index = e.tapIndex;
-						if(index == 0){
+						if (index == 0) {
 							// 用户点击了预览当前图片
 							// 可以自己实现当前头像链接的读取
-						    let url  = that.useimg;
-						    let arr=[]
-						    arr.push(url)
-						    uni.previewImage({
+							let url = that.useimg;
+							let arr = []
+							arr.push(url)
+							uni.previewImage({
 								// 预览功能图片也必须是数组的
 								urls: arr
-						    })
+							})
 						}
-					    if(index == 1 || index==2 ){
+						if (index == 1 || index == 2) {
 							//拍照或从图库上传
 							that.uploadPictrue(index);
 						}
@@ -262,50 +262,51 @@
 				});
 			},
 			//图片上传
-			uploadPictrue(e){
+			uploadPictrue(e) {
 				var that = this;
 				var sourceTypeArr = [];
-				e==1 ? sourceTypeArr.push("camera") : sourceTypeArr.push("album")
+				e == 1 ? sourceTypeArr.push("camera") : sourceTypeArr.push("album")
 				uni.chooseImage({
 					count: 1, //可选择数量,默认9
-					sizeType: ['compressed','original'], //上传压缩图,原图
+					sizeType: ['compressed', 'original'], //上传压缩图,原图
 					sourceType: sourceTypeArr, //从相册选择
 					success: async (res) => {
-						if(res.tempFiles[0].size > 10 * 1024 * 1000){  //上传图片大小限制
+						if (res.tempFiles[0].size > 10 * 1024 * 1000) { //上传图片大小限制
 							uni.showToast({
-								title: "照片大小不能10MB", 
+								title: "照片大小不能10MB",
 								icon: "none"
 							})
 							return
 						}
 						var tempFilePath = res.tempFilePaths;
-						try{
+						try {
 							uni.showLoading({
-								title:"上传中...",
-								mask:true
+								title: "上传中...",
+								mask: true
 							})
 							// 文件上传
 							uni.uploadFile({
 								// url: 'https://web.byisf.com/api/depl/put-depl', //仅为示例,非真实的接口地址
-								url: that.$store.state.piAPI+'/depl/put-depl',
+								url: that.$store.state.piAPI + '/depl/put-depl',
 								filePath: tempFilePath[0],
 								name: 'file',
 								formData: {
-									'user': 'test'  // 上传附带参数
+									'user': 'test' // 上传附带参数
 								},
 								success: (data) => {
 									that.useimg = JSON.parse(data.data).data;
 									that.$store.state.avatar = that.useimg;
 									//修改用户头像信息
 									uni.request({
-										url:that.$store.state.piAPI + "/blade-user/updateUserInfo",
-										method:"POST",
-										data:{
+										url: that.$store.state.piAPI +
+											"/blade-user/updateUserInfo",
+										method: "POST",
+										data: {
 											id: that.$store.state.puserID,
-											avatar:that.useimg
+											avatar: that.useimg
 										},
-										success:(res)=> {
-											if(res.data.code==200){
+										success: (res) => {
+											if (res.data.code == 200) {
 												uni.showToast({
 													title: '上传成功!',
 													duration: 2000
@@ -315,9 +316,9 @@
 									})
 								}
 							});
-						}catch(e){
+						} catch (e) {
 							console.log(e);
-						}finally{
+						} finally {
 							uni.hideLoading();
 						}
 					}
@@ -327,7 +328,7 @@
 	}
 </script>
 <style>
-	page{
+	page {
 		width: 100%;
 		height: 100%;
 		background-color: #F7F7F7;
@@ -335,10 +336,10 @@
 </style>
 <style lang="scss" scoped>
 	$imgSize: 1.2rem;
-	
+
 	.m-top,
 	.my-user-info,
-	.user-name-id{
+	.user-name-id {
 		display: flex;
 	}
 
@@ -360,18 +361,18 @@
 				height: 6rem;
 				align-items: center;
 				// border: 1px solid #007AFF;
-				
-				
-				.user-name-id{
+
+
+				.user-name-id {
 					flex-direction: column;
 					justify-content: center;
-					
-					.user-name{
+
+					.user-name {
 						font-size: 1.5rem;
 						letter-spacing: 1rpx;
 					}
-					
-					.user-id{
+
+					.user-id {
 						font-size: 0.6rem;
 						color: #fff;
 						margin-top: 0.3rem;
@@ -396,17 +397,17 @@
 				margin: 0 auto;
 				height: 2.4rem;
 				background-image: linear-gradient(to bottom, #103289, #174cd1);
-				box-shadow:0 0 0.1px 0.1px #0BB9C8;
+				box-shadow: 0 0 0.1px 0.1px #0BB9C8;
 				// border: 1px solid #00ff00;
-				
-				.dept-info{
+
+				.dept-info {
 					width: 92%;
 					height: 1.8rem;
 					line-height: 1.8rem;
 					margin-left: 0.6rem;
 					margin-top: 0.3rem;
 					background-image: linear-gradient(to bottom, #103289, #174cd1);
-					
+
 					.dept-name {
 						margin-left: 0.3rem;
 					}
@@ -422,13 +423,13 @@
 			border-radius: 2px;
 			margin-top: -2.5rem;
 			background-color: #fff;
-			
-			.attendance-btn{
+
+			.attendance-btn {
 				width: 100%;
 				height: 6.1rem;
 				border-bottom: 2px solid rgba($color: #F7F7F7, $alpha:0.8);
-				
-				.attendance-info{
+
+				.attendance-info {
 					width: 7rem;
 					height: 100%;
 					// background-color: #007AFF;
@@ -436,13 +437,13 @@
 					align-items: center;
 					justify-content: center;
 					flex-direction: column;
-					
-					image{
+
+					image {
 						width: 3.5rem;
 						height: 3.2rem;
 					}
-					
-					.attendance-title{
+
+					.attendance-title {
 						margin-top: 0.3rem;
 						font-weight: 550;
 					}
@@ -475,8 +476,8 @@
 						font-size: 0.9rem;
 					}
 				}
-				
-				image{
+
+				image {
 					margin-right: 1rem;
 				}
 			}

--
Gitblit v1.9.3