306132416@qq.com 3 éve%!(EXTRA string=óta)
szülő
commit
b65f504dc0

+ 9 - 0
pages.json

@@ -122,6 +122,15 @@
 		        "enablePullDownRefresh": false
 		    }
 		    
+		},
+		{
+		    "path" : "pages/index/webview/web-view",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "外部链接",
+		        "enablePullDownRefresh": false
+		    }
+		    
 		}
     ],
 	"globalStyle": {

+ 35 - 26
pages/index/activity/activity.vue

@@ -10,7 +10,7 @@
 		<view class="org-info-box" v-for="(item,index) in userPosList" :key="index">
 		  <view class="org-info">{{item.name || '-'}}</view>
 		  <!-- <view class="org-line"></view> -->
-		  <view class="org-info">{{item.position  || '-'}}</view>
+		  <view class="org-info">{{item.position}}</view>
 		</view>		  
 	  </view>
 <!-- 	  <view class="img-name-box" v-if="!isAuth" style="height: 180rpx;">
@@ -21,13 +21,6 @@
  
     <view>
 		<view class="active-title-box">
-<!-- 			<uni-datetime-picker
-			    class="time-select-box"
-				type="date"
-				:value="single"
-				@change="change"
-				:clear-icon="false"
-			/> -->
 			<picker mode="date" fields="year"  @change="bindDateChange" class="picker-class" style="margin-left: 2%; width: 15%;">
 				<view class="uni-input display-between items-center">{{dateYear}}年<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image></view>
 			</picker>
@@ -43,24 +36,30 @@
 		
 		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback">
 		<view class="active-box" v-for="(item,index) in activiList" :key="index" @click="goList(item.id)">
-			<view class="active-type" :class="{'bg-yellow':item.type == '组织建设' ,'bg-red':item.type == '学习培训','bg-blue':item.type == '参政议政',}"  >
-				{{item.type}}
+			<view class="active-type" :class="{'bg-yellow':item.type == '组织建设' ,'bg-red':item.type == '学习培训','bg-blue':item.type == '参政议政','bg-gray':item.type == '社会活动'}"  >
+				<view style="width: 55%;">{{item.type}}</view>
 			</view>
 			<view class="active-content-box">
 				<view class="active-content">
 					<view class="active-name">{{item.name}}</view>
-					<view class="active-date">{{item.start_time}}</view>
 				</view>
 				<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>
 				</view>
+				<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/del-icon.png" mode="aspectFit" v-show="item.del_auth" @click.stop="delActive(item.id)"></image>
+					</view>
+				</view>
 			</view>
-			<view class="edit-icon-box">
+		<!-- 	<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: 20rpx;"></image>
 				<image src="/static/del-icon.png" mode="aspectFit" v-show="item.del_auth" @click.stop="delActive(item.id)"></image>
-			</view>
+			</view> -->
 		</view>
 		</mescroll-body>
 		
@@ -77,8 +76,8 @@ export default {
   mixins: [MescrollMixin], // 使用mixin
   data() {
     return {
-      dateYear:new Date().getFullYear(),
-      dateMonth:new Date().getMonth() + 1,
+      dateYear:'全',
+      dateMonth:'全',
 	  arrayMonth:["1", "2","3", "4","5", "6","7", "8","9", "10","11", "12"],
       userHeadImg: getApp().globalData.user_headUrl,
       userNickName:getApp().globalData.user_name,
@@ -93,7 +92,7 @@ export default {
     };
   },
   onShow() {
-	  this.getActiveList(this.branchId)
+	 // this.getActiveList(this.branchId)
   },
   onLoad() {
 	  this.getUserInfoBranch()
@@ -211,12 +210,13 @@ export default {
 	  },
 	  bindDateChange(e){ 
 			this.dateYear = e.target.value;
+			this.getActiveList(this.branchId)
 	  },
 	  bindDateMonthChange(e){
 			this.dateMonth = this.arrayMonth[e.target.value];
+			this.getActiveList(this.branchId)
 	  },
 	  bindPickerChange: function(e) {
-		  console.log('picker发送选择改变,携带值为', e.target.value)
 		  this.branchValue = this.branchArray[e.target.value].name;
 		  this.branchId = this.branchArray[e.target.value].id;
 		  this.getActiveList(this.branchId)
@@ -420,6 +420,10 @@ export default {
     font-size: 28rpx;
     background: #fff;
 } 
+.org-info {
+	width: 50%;
+	padding-left: 10%;
+}
 .org-line {
 	width: 1px;
 	height: 82rpx;
@@ -469,13 +473,13 @@ export default {
 	align-items: center;
 	position: relative;
 	font-size: 28rpx;
-	padding: 30rpx;
+	padding: 20rpx;
 	border-bottom: 1px solid #d7d7d7;
 	.active-type {
 		width: 100rpx;
 		height: 100rpx;
 		border-radius: 50%;
-		background-color: yellow;
+		background-color: aquamarine;
 		text-align: center;
 		display: flex;
 		align-items: center;
@@ -484,7 +488,8 @@ export default {
 		justify-content: center;
 	}
 	.active-content-box {
-		height: 120rpx;
+		width:83%;
+		// height: 120rpx;
 		display: flex;
 		flex-direction: column;
 		margin-left: 20rpx;
@@ -493,7 +498,7 @@ export default {
 	.active-content {
 		display: flex;
 		align-items: center;
-		height: 45rpx;
+		// height: 45rpx;
 		font-size: 26rpx;	
 		.author-box {
 			border-left: 1px solid #d7d7d7;
@@ -511,17 +516,21 @@ export default {
 		}
 	}
 	.edit-icon-box {
-		position: absolute;
-		right: 10px;
-		top: 10px;
+		// position: absolute;
+		// right: 10px;
+		// top: 10px;
+		margin-top: 10rpx;
 		image {
-			width: 35rpx;
-			height: 35rpx;
+			width: 30rpx;
+			height: 30rpx;
 		}
 	}
 	.bg-yellow {
 		background-color: #ffdd40;
 	}
+	.bg-gray {
+		background-color: darkgrey;
+	}
 	.bg-red {
 		background-color: #ec808d;
 	}

+ 17 - 1
pages/index/activity/create2.vue

@@ -119,7 +119,7 @@
 				leaderAuth:'0',
 				activeName:'',
 				activeDate:'',
-				activeValue:'请选择',
+				activeValue:'组织建设',
 				activeType:['组织建设','参政议政','学习培训','社会活动'],
 				rangeList:['全体成员可见','仅管理团队可见'],
 				rangeValue:'全体成员可见',
@@ -307,6 +307,22 @@
 			  });
 			}, 
 			submitActive(){
+				if(!this.activeName){
+					uni.showToast({
+					  title: "请填写活动标题",
+					  icon: "none", 
+					  duration: 2500,
+					});
+					return
+				}
+				if(!this.activeDate){
+					uni.showToast({
+					  title: "请选择活动时间",
+					  icon: "none", 
+					  duration: 2500,
+					});
+					return
+				}
 				let typeObj = {
 					'组织建设':'1',
 					'参政议政':'2',

+ 46 - 13
pages/index/activity/list.vue

@@ -5,7 +5,12 @@
 			<view class="header-title">{{activeDesc.name}}</view>
 			<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;">
+		<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>
@@ -13,6 +18,7 @@
 				<view class="active-content-box">
 					<view class="active-content margin-top-3">
 						<view class="active-name">{{item.author}}</view>
+						<!-- <view class="active-date">{{item.addtime}}</view> -->
 					</view>
 					<view class="active-content">
 						<view class="active-date">{{item.addtime}}</view>
@@ -20,12 +26,12 @@
 				</view>
 			</view>
 			<view class="active-content-box-img margin-top-3">
-				<view v-for="(img,indexImg) in item.pic_list" :key="indexImg">
-					<image :src="img.pic_url" mode="aspectFit" @click="showLarge(item.pic_list,indexImg)"></image>
+				<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;">
+		    <view class="margin-top-3" style="color: #007AFF;" @click="tonewurl(item.web_url)">
 		    	{{item.web_url}}
 		    </view>
 			
@@ -77,7 +83,7 @@ export default {
 		  showLarge(urlList,index) {
 			  let imgList = urlList,imgArr = [];
 			  imgList.forEach((item,index)=>{
-				  imgArr.push(item.pic_url_resize)
+				  imgArr.push(item.pic_url)
 			  })
 		    uni.previewImage({
 		      urls:imgArr,
@@ -204,6 +210,22 @@ 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
+			  });
+		  },
 		  goRecord(){
 			  uni.navigateTo({
 			  	url:'./record?bId=' + this.branchId + '&aId=' + this.activeId + '&types=add'
@@ -274,7 +296,7 @@ export default {
 	font-weight: bold
 }
 .active-title-box {
-	padding-left: 5%;
+	padding-left: 3%;
     font-size: 26rpx;
     height: 100rpx;
     border-bottom: 4px solid #eeeeee;
@@ -316,7 +338,7 @@ export default {
 	display: flex;
 	position: relative;
 	font-size: 28rpx;
-	padding: 30rpx;
+	padding: 20rpx;
 	border-bottom: 1px solid #d7d7d7;
 	.active-header {
 		display: flex;
@@ -336,23 +358,28 @@ export default {
 	.active-content-box{
 		display: flex;
 		flex-direction: column;
-		margin-left: 20rpx;
+		// margin-left: 20rpx;
 	}
 	.active-content-box-img {
 		display: flex;
-		justify-content: space-around;
+		justify-content: flex-start;
 		image {
-			width: 240rpx;
+			width: 230rpx;
 			height: 160rpx;
 		}
 	}
 	.active-content {
 		display: flex;
 		align-items: center;
-		height: 45rpx;
+		// height: 45rpx;
 		font-size: 26rpx;	
+		.active-title {
+			font-size: 28rpx;
+			margin-right: 10rpx;
+			font-weight: bold;
+		}
 		.active-name {
-			font-size: 30rpx;
+			font-size: 26rpx;
 			margin-right: 10rpx;
 		}
 		.active-date {
@@ -378,7 +405,13 @@ export default {
 	.bg-blue {
 		background-color: #81d3f8;
 	}
-}
+}   
+    .marginB40 {
+		margin-bottom: 80rpx;
+	}
+	.marginR5{
+		margin-right: 10rpx;
+	}
 	.footer-box-record{
 		position: fixed;
 		bottom: 0;

+ 5 - 1
pages/index/index.vue

@@ -11,7 +11,7 @@
 		<view class="org-info-box" v-for="(item,index) in userPosList" :key="index">
 		  <view class="org-info">{{item.name || '-'}}</view>
 		  <!-- <view class="org-line"></view> -->
-		  <view class="org-info">{{item.position  || '-'}}</view>
+		  <view class="org-info">{{item.position}}</view>
 		</view>	  
 	  </view>
 	  
@@ -640,6 +640,10 @@ export default {
     font-size: 28rpx;
     background: #fff;
 } 
+.org-info {
+	width: 50%;
+	padding-left: 10%;
+}
 .org-line {
 	width: 1px;
 	height: 82rpx;

+ 22 - 0
pages/index/webview/web-view.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+	    <web-view :src="url" :progress="false"></web-view>
+	</view>
+</template>
+
+<script>
+	    export default {
+	        data() {
+	            return {
+	                url: ''
+	            };
+	        },
+	        onLoad(val) {
+				console.log(val)
+	            this.url = decodeURIComponent(val.url) //解码网址
+	        },
+	    }
+</script>
+
+<style>
+</style>