306132416@qq.com 3 년 전
부모
커밋
8a4f1fd07e
5개의 변경된 파일82개의 추가작업 그리고 30개의 파일을 삭제
  1. 13 5
      pages/index/activity/activity.vue
  2. 8 0
      pages/index/activity/create2.vue
  3. 21 20
      pages/index/activity/list.vue
  4. 18 4
      pages/index/honor/honor.vue
  5. 22 1
      pages/index/honor/record.vue

+ 13 - 5
pages/index/activity/activity.vue

@@ -43,7 +43,7 @@
 				<view class="active-content">
 					<view class="active-name">{{item.name}}</view>
 				</view>
-				<view class="active-content">
+				<view class="active-content" >
 					<view style="margin-right:10rpx;">{{item.branch}}</view>
 					<view class="author-box">{{item.author}}</view>
 					<view style="margin-left:10rpx;">记录数:({{item.process_count}}/<text style="color:red;">{{item.process_unread_count}}</text>)</view>
@@ -51,7 +51,7 @@
 				<view class="active-content" style="justify-content: space-between;">
 					<view class="active-date">{{item.start_time}}</view>
 					<view class="edit-icon-box">
-						<image src="/static/edit-icon.png" mode="aspectFit" v-show="item.edit_auth" @click.stop="goEditPage(item.id)" style="margin-right:10rpx;"></image>
+						<image src="/static/edit-icon.png" mode="aspectFit" v-show="item.edit_auth" @click.stop="goEditPage(item.id)" style="margin-right: 10rpx;"></image>
 						<image src="/static/del-icon.png" mode="aspectFit" v-show="item.del_auth" @click.stop="delActive(item.id)"></image>
 					</view>
 				</view>
@@ -94,11 +94,18 @@ export default {
   onShow() {
 	 // this.getActiveList(this.branchId)
   },
-  onLoad() {
+  onLoad(option) {
 	  this.getUserInfoBranch()
 	  this.getActiveInfoBranch()
   },
   methods: {
+	  pageRefresh(object) {
+	        if (object) {
+	            this.getActiveList(this.branchId)
+	        } else {
+	            return
+	        }
+	  },
 	  getUserInfoBranch() {
 	      let md5Sign = md5(
 	        "method=" + "member" +"&timestamp=" + getApp().globalData.globalTimestamp +"&secret=" +getApp().globalData.secret
@@ -257,6 +264,7 @@ export default {
 	  	});
 	  },
 	  upCallback(page) {
+		console.log(666)
 		let pageNum = page.num; // 页码, 默认从1开始
 		let pageSize = page.size; // 页长, 默认每页10条
 	  	let md5Sign = md5(
@@ -470,7 +478,7 @@ export default {
 }
 .active-box {
 	display: flex;
-	align-items: center;
+	align-items: flex-start;
 	position: relative;
 	font-size: 28rpx;
 	padding: 20rpx;
@@ -519,7 +527,7 @@ export default {
 		// position: absolute;
 		// right: 10px;
 		// top: 10px;
-		margin-top: 10rpx;
+		// margin-top: 10rpx;
 		image {
 			width: 30rpx;
 			height: 30rpx;

+ 8 - 0
pages/index/activity/create2.vue

@@ -366,10 +366,18 @@
 						  icon: "none", 
 						  duration: 2500,
 						});
+						let types = 'add';
+						let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
 						setTimeout(()=>{
 							if(this.lastPageLength == 1){
+								let nowPage = pages[pages.length - 1]; //当前页页面实例
+								let prevPage = pages[pages.length - 2]; //上一页页面实例
+								prevPage.$vm.pageRefresh(types)
 								uni.navigateBack({delta:1})
 							}else{
+								let nowPage = pages[pages.length - 1]; //当前页页面实例
+								let prevPage = pages[pages.length - 3]; //上一页页面实例
+								prevPage.$vm.pageRefresh(types)
 								uni.navigateBack({delta:2})
 							}
 						},800)

+ 21 - 20
pages/index/activity/list.vue

@@ -6,11 +6,6 @@
 			<view style="color: gray;">{{activeDesc.start_time}}</view>
 		</view>
 		<view class="active-box" v-for="(item,index) in activiList" :key="index" style="flex-direction: column;" :class="index===activiList.length-1?'marginB40':''">
-			<view class="active-content-box">
-				<view class="active-content">
-					<view class="active-title">{{item.content}}</view>
-				</view>
-			</view>
 			<view class="active-header">
 			<!-- 	<view class="active-type">
 					<text style="margin: 0 auto;">头像</text>
@@ -25,15 +20,23 @@
 					</view>
 				</view>
 			</view>
+			<view class="active-content-box">
+				<view class="active-content">
+					<view class="active-title">{{item.content}}</view>
+				</view>
+			</view>
 			<view class="active-content-box-img margin-top-3">
 				<view v-for="(img,indexImg) in item.pic_list" :key="indexImg" class="marginR5">
 					<image :src="img.pic_url_resize" mode="aspectFill" @click="showLarge(item.pic_list,indexImg)"></image>
 				</view>
 			</view>
 			
-		    <view class="margin-top-3" style="color: #007AFF;" @click="tonewurl(item.web_url)">
+		    <view class="margin-top-3" style="color: #007AFF;" @click="tonewurl(item.web_url)" v-if="item.web_url">
 		    	{{item.web_url}}
 		    </view>
+			<view v-if="item.web_url" style="font-size: 24rpx;color: #ccc;">
+				点击链接可进行复制,前往浏览器查看。
+			</view>
 			
 			<view class="edit-icon-box">
 				  <image src="/static/edit-icon.png" mode="aspectFit" v-if="item.edit_auth" @click="goEditPage(item.id)"></image>
@@ -211,20 +214,18 @@ export default {
 			  });
 		  },
 		  tonewurl(urls) {
-			  console.log(urls)
-			  // 判断链接是否为空
-			  if (!urls) {
-				  return false;
-			  }
-			  // 判断链接是否为https
-			  // let notS = urls.split(':')[0];
-			  // let a = notS.indexOf('s') > -1;
-			  // if (a == false) {
-				 //  return false;
-			  // }
-			  uni.navigateTo({
-				  url:'/pages/index/webview/web-view?url=' + urls
-			  });
+			  uni.setClipboardData({
+			        data: urls,
+			        success: function (res) {
+			          uni.showToast({
+			            title: '复制成功,请在手机浏览器中打开',
+						icon:"none"
+			          });
+			        }
+			      })
+			  // uni.navigateTo({
+				 //  url:'/pages/index/webview/web-view?url=' + urls
+			  // });
 		  },
 		  goRecord(){
 			  uni.navigateTo({

+ 18 - 4
pages/index/honor/honor.vue

@@ -27,8 +27,11 @@
 				 <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback">
 				 <view class="honor-box" v-for="(item,index) in honorList" :key="index" style="position: relative;">
 					    <view class="honor-name">{{item.name}}</view>
-						<image :src="item.pic_url" mode="aspectFit" @click="showLarge(item.pic_url_resize)"></image>
-					    <view class="honor-award">获奖人:{{item.for_branch}} {{item.for_names}}</view>
+						<image :src="item.pic_url" mode="aspectFill" @click="showLarge(item.pic_url_resize)"></image>
+						<view style="display: flex;">
+							<view class="honor-award" style="width:120rpx;">获奖人:</view>
+							<view class="honor-award">{{item.for_branch}} {{item.for_names}}</view>
+						</view>
 						<view class="honor-info-box">
 							<text>{{item.year}}年{{item.month}}月</text>
 							<text>|</text>
@@ -65,7 +68,10 @@
 				 <view class="honor-box" v-for="(item,index) in myHonorList" :key="index" >
 					    <view class="honor-name">{{item.name}}</view>
 						<image :src="item.pic_url" mode="aspectFit" @click="showLarge(item.pic_url_resize)"></image>
-					    <view class="honor-award">获奖人:{{item.for_branch}} {{item.for_names}}</view>
+						<view style="display: flex;">
+							<view class="honor-award" style="width:120rpx;">获奖人:</view>
+							<view class="honor-award">{{item.for_branch}} {{item.for_names}}</view>
+						</view>
 						<view class="honor-info-box">
 							<text>{{item.year}}年{{item.month}}月</text>
 							<text>|</text>
@@ -124,9 +130,16 @@ export default {
      // this.getHonorList(this.dateYear,this.dateMonth,this.index)
   },
   onShow(){
-	  this.getHonorList(this.dateYear,this.dateMonth,this.index)
+	  //this.getHonorList(this.dateYear,this.dateMonth,this.index)
   },
   methods: {
+	pageRefreshHonor(object) {
+	        if (object) {
+	            this.getHonorList(this.dateYear,this.dateMonth,this.index)
+	        } else {
+	            return
+	        }
+	},
     onClickItem(e){
 		 this.current = e.currentIndex
 		 this.current ? 
@@ -417,6 +430,7 @@ export default {
 			margin: 20rpx auto;
 	   }
 	   .honor-award {
+		   width: 80%;
 		   color: #ccc;
 		   font-size: 28rpx;
 		   margin: 20rpx 0 10rpx 0;

+ 22 - 1
pages/index/honor/record.vue

@@ -447,6 +447,22 @@
 				this.submitRequest(formData)
 			  },
 			submitRequest(params){
+				if(this.headImgId.length===0){
+					uni.showToast({
+					  title: "请选上传图片",
+					  icon: "none", 
+					  duration: 2500,
+					});
+					return
+				}
+				if(!params.awardName){
+					uni.showToast({
+					  title: "请填写名称",
+					  icon: "none", 
+					  duration: 2500,
+					});
+					return
+				}
 				let levelObj = {
 					'中央':'1',
 					'省级':'2',
@@ -508,12 +524,17 @@
 							});
 							setTimeout(()=>{uni.navigateBack({})},500)
 						}else {
+							let types = 'add';
+							let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
+							let nowPage = pages[pages.length - 1]; //当前页页面实例
+							let prevPage = pages[pages.length - 2]; //上一页页面实例
+							prevPage.$vm.pageRefreshHonor(types)
 							uni.showToast({
 							  title: "上传成功",
 							  icon: "none", 
 							  duration: 2500,
 							});
-							setTimeout(()=>{uni.navigateBack({})},500)
+							setTimeout(()=>{uni.navigateBack({delta:1})},500)
 						}
 					}
 				  },