zhengkaixin 2 年之前
父節點
當前提交
9ec8453358

+ 8 - 1
main.js

@@ -88,8 +88,15 @@ Vue.mixin({
 		}
 
 	},
-	methods: {
+	methods: {
+		substrDate(date){
+			if(date){
+				return date.substr(0,11)
+			}
+			return ''
+		},
 		showNumJP(val){
+			
 			if(val||val==0){
 				val=""+val
 				if(val.indexOf(".")>-1){

+ 9 - 6
package.json

@@ -25,27 +25,30 @@
 	},
 	"uni-app": {
 		"scripts": {
-			"test-student-platform": {
+			"test-platform": {
 				"title": "test",
 				"BROWSER": "Chrome",
 				"env": {
 					"UNI_PLATFORM": "h5",
-					"NODE_NAME": "test-student"
+					"NODE_NAME": "test"
 				},
 				"define": {
-					"CUSTOM-CONST": true
+					"CUSTOM-CONST": true,
+					"NODE_NAME_T": "test"
 				}
 			},
-			"production-student-platform": {
+			"production-platform": {
 				"title": "production",
 				"BROWSER": "Chrome",
 				"env": {
 					"UNI_PLATFORM": "h5",
-					"NODE_NAME": "production-student"
+					"NODE_NAME": "production"
 					
 				},
 				"define": {
-					"CUSTOM-CONST": true
+					"CUSTOM-CONST": true,
+					"NODE_NAME_T": "production"
+					
 				}
 			}
 		}

+ 2 - 2
pages/homePage/homePage.vue

@@ -31,7 +31,7 @@
 				
 			</view>
 			<view class="date" v-if="toplist.length">
-				{{toplist[topindex].createTime}}
+				{{substrDate(toplist[topindex].createTime)}}
 			</view>
 		</view>
 		<!-- 宫格 -->
@@ -92,7 +92,7 @@
 							{{item.typeName}}
 						</view>
 						<view class="date">
-							{{item.createTime}}
+							{{substrDate(item.createTime)}}
 						</view>
 
 					</view>

+ 1 - 1
pages/mine/myComment.vue

@@ -14,7 +14,7 @@
 							{{item.typeName}}
 						</view>
 						<view class="date">
-							{{item.createTime}}
+							{{substrDate(item.createTime)}}
 						</view>
 					</view>
 				</view>

+ 1 - 1
pages/mine/myLike.vue

@@ -14,7 +14,7 @@
 								{{item.typeName}}
 							</view>
 							<view class="date">
-								{{item.createTime}}
+								{{substrDate(item.createTime)}}
 							</view>
 						</view>
 					</view>

+ 1 - 1
pages/news/news.vue

@@ -20,7 +20,7 @@
 							{{item.typeName}}
 						</view>
 						<view class="date">
-							{{item.createTime}}
+							{{substrDate(item.createTime)}}
 						</view>
 						
 					</view>

+ 1 - 1
pages/search/searchResult.vue

@@ -40,7 +40,7 @@
 							{{item.typeName}}
 						</view>
 						<view class="date">
-							{{item.createTime}}
+							{{substrDate(item.createTime)}}
 						</view>
 					</view>
 				 </view>

+ 3 - 2
pages/staffHome/activityReward/rewardDetail.vue

@@ -78,12 +78,13 @@
 	 background-color: #fff;
 	 .reward-item{
 		 	border-bottom: solid 1px #e6e6e6;
-			height: 44px;
+			
+			min-height: 64px;
 		 line-height: 44px;
 		 padding-left: 16rpx;
 	 }
 	 .reward-item:last-of-type{
-		 height: 80px;
+		min-height: 84px;
 	 }
  }
 </style>

+ 1 - 1
pages/staffHome/filesonic.vue

@@ -24,7 +24,7 @@
 					</view>
 				</view>
 				<view class="share-text">
-					<textarea placeholder="记录点滴生活..." :auto-height="true"
+					<textarea placeholder="记录点滴生活..." :auto-height="true" style="width:auto"
 					v-model="item.synopsis" readonly maxlength="200"
 					 name="" id="" ></textarea>
  					

+ 254 - 0
pages/staffHome/teamHonor/badgeDetails-old.vue

@@ -0,0 +1,254 @@
+<template>
+	<view>
+		<u-navbar title="荣誉详情"></u-navbar>
+		<!-- 荣誉名称 -->
+		<view class="honor-name">
+			<view class="icon">
+				<!-- <img :src="info.img" alt=""> -->
+				<!-- <img src="@/assets/img/honorPic2.png" alt=""> -->
+			</view>
+			
+			<view class="explain">
+				{{info.content}}
+			</view>
+			
+		</view>
+		<!-- 荣誉记录 -->
+		<view class="record">
+			<view class="record-title">
+				<view class="rec">
+
+				</view>
+				<view class="text">
+					荣誉记录
+				</view>
+			</view>
+
+			<view class="commend-box"  v-for="(item,i) in list" :key="i">
+				<view class="commend-content">
+					<view class="title">
+						{{item.orgName?item.orgName:item.typeName}}
+					</view>
+					<view class="commendation">
+						{{item.content}}
+					</view>
+					<view class="integral">
+						<view class="flex">
+							<view class="icon">
+								<img src="../../../assets/img/riFill-copper-diamond-fill@2x.png" alt="">
+							</view>
+							<view class="text">
+								{{item.scoreInfo}}积分
+							</view>
+						</view>
+						<view class="date">
+							{{item.createTime}}
+						</view>
+					</view>
+				</view>
+				
+			</view>
+			
+		</view>
+		<u-divider bg-color="#F2F4F4" border-color="#CFD2D5">已经到底了</u-divider>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/pagejs/cite.js'
+	
+	export default {
+		data() {
+			return {
+				type:'',
+				listForm:{
+					pageIndex:1,
+					pageSize:20,
+					
+				},
+				info:{},
+				list:[],
+				recordsTotal:0,
+			}
+		},
+		onLoad(op){
+			this.type=op.id
+			
+			this.getInfo()
+			
+		},
+		onReachBottom() {
+			if (this.list.length < this.recordsTotal) {			
+				this.myLoadmore();
+			}
+		},
+		methods: {
+			myLoadmore(){
+				this.listForm.pageIndex += 1;
+				this.getList();
+			},
+			getInfo(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API.editBadge(this.type).then((res) => {
+					
+					uni.hideLoading();
+					//this.list=response.data.data
+					this.info=res.data.cite;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			getList(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API.pageList(this.listForm).then((res) => {
+					
+					uni.hideLoading();
+					//this.list=response.data.data
+					if(this.listForm.pageIndex==1){
+						this.list = res.data.data;
+					}else{
+						this.list = [
+							...this.list,
+							...res.data.data
+						];
+					}
+					this.recordsTotal = res.data.recordsTotal;
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page{
+		font-family: 'Regular';
+	}
+	// 荣誉名称
+	.honor-name {
+		background-color: #fff;
+		padding: 32rpx 0;
+		text-align: center;
+    
+		.icon {
+			img {
+				max-width: 536rpx;
+				height: 140rpx;
+			}
+		}
+
+		.name {
+			color: rgba(51, 51, 51, 1);
+			font-size: 18px;
+		}
+
+		.explain {
+			color: rgba(119, 119, 119, 1);
+			margin-top: 24rpx;
+
+		}
+	}
+
+	// 荣誉记录
+	.record {
+		margin-top: 26px;
+		padding: 0 32rpx;
+
+		.record-title {
+			display: flex;
+			align-items: center;
+			margin-bottom: 19px;
+           color: rgba(51, 51, 51, 1);
+            font-size: 18px;
+			line-height: 18px;
+			font-family: 'Regular';
+			.rec {
+				width: 4px;
+				height: 16px;
+				background-color: rgba(31, 74, 153, 1);
+				margin-right: 4px;
+			}
+		}
+
+
+		.commend-box {
+			background-color: #fff;
+			border-radius: 8px;
+			padding: 24rpx;
+			display: flex;
+			justify-content: space-between;
+            margin-bottom: 12px;
+			.commend-content {
+				    width: 100%;
+				.title {
+					color: rgba(51, 51, 51, 1);
+					font-size: 16px;
+					line-height: 23px;
+					font-family: 'Medium';
+				}
+
+				.commendation {
+					color: rgba(119, 119, 119, 1);
+					font-size: 12px;
+					line-height: 17px;
+					margin-top: 4rpx;
+					
+				}
+
+				.integral {
+					margin-top: 14rpx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					
+					.flex{
+						display: flex;
+						border-radius: 50px;
+						height: 28px;
+						font-size: 24rpx;
+						background-color: rgba(230, 239, 255, 1);
+						justify-content: center;
+						align-items: center;
+						padding: 0 16rpx;
+						.icon {
+							width: 32rpx;
+							height: 32rpx;
+						
+							img {
+								width: 100%;
+							}
+						}
+						
+						.text {
+							font-size: 24rpx;
+							color: rgba(119, 119, 119, 1);
+						}
+					}
+
+				}
+				.date{
+					color: rgba(153, 153, 153, 1);
+					font-size: 12px;
+				}
+			}
+
+			
+		}
+	}
+</style>

+ 55 - 59
pages/staffHome/teamHonor/badgeDetails.vue

@@ -1,57 +1,40 @@
 <template>
 	<view>
-		<u-navbar title="徽章详情"></u-navbar>
-		<!-- 荣誉名称 -->
-		<view class="honor-name">
-			<view class="icon">
-				<!-- <img :src="info.img" alt=""> -->
-				<img src="@/assets/img/honorPic2.png" alt="">
-			</view>
-			<view class="name">
-				{{info.name}}
-			</view>
-			<view class="explain">
-				{{info.synopsis}}
-			</view>
+		<u-navbar title="荣誉详情" ></u-navbar>
+		 <view class="reward-group" >
+			 <view >
+			 	<view class="reward-item-title" style="text-align: center;font-size: 36rpx;">
+			 		{{info.honorId}}
+			 	</view>
+			 	
+			 </view>
+			 <view >
+			 	
+			 	<view class="reward-item">
+			 		
+					<textarea  style="width: 100%;" :auto-height="true"
+					v-model="info.content"
+					 name="" id="" readonly ></textarea>
+			 	</view>
+			 </view>
+			 <view >
+				 
+			 	<view class="reward-item-title">
+			 		{{info.orgName}} {{info.userName}}
+			 	</view>
+			 	<view class="reward-item" v-if="info.orgUserNames">
+			 		{{info.orgUserNames}}
+			 	</view>
+			 </view>
+			 <view >
+			 	<view class="reward-item">
+			 		奖励积分  <span v-if="info.isTeam" >每人</span>+{{info.scoreInfo}}积分
+			 	</view>
+			 	<view class="reward-item">
+			 		
+			 	</view>
+			 </view>
 		</view>
-		<!-- 荣誉记录 -->
-		<view class="record">
-			<view class="record-title">
-				<view class="rec">
-
-				</view>
-				<view class="text">
-					荣誉记录
-				</view>
-			</view>
-
-			<view class="commend-box"  v-for="(item,i) in list" :key="i">
-				<view class="commend-content">
-					<view class="title">
-						{{item.orgName?item.orgName:item.typeName}}
-					</view>
-					<view class="commendation">
-						{{item.content}}
-					</view>
-					<view class="integral">
-						<view class="flex">
-							<view class="icon">
-								<img src="../../../assets/img/riFill-copper-diamond-fill@2x.png" alt="">
-							</view>
-							<view class="text">
-								{{item.scoreInfo}}积分
-							</view>
-						</view>
-						<view class="date">
-							{{item.createTime}}
-						</view>
-					</view>
-				</view>
-				
-			</view>
-			
-		</view>
-		<u-divider bg-color="#F2F4F4" border-color="#CFD2D5">已经到底了</u-divider>
 	</view>
 </template>
 
@@ -73,13 +56,9 @@
 			}
 		},
 		onLoad(op){
-			if(op.type){
-				this.type=op.type
-				
-				this.getInfo()
-				this.listForm.type=op.id
-				this.getList()
-			}
+			this.type=op.id
+			
+			this.getInfo()
 			
 		},
 		onReachBottom() {
@@ -102,7 +81,7 @@
 					
 					uni.hideLoading();
 					//this.list=response.data.data
-					this.info=res.data;
+					this.info=res.data.cite;
 				}).catch(error => {
 					uni.showToast({
 						title: error,
@@ -142,6 +121,23 @@
 </script>
 
 <style lang="scss" scoped>
+	
+	.reward-group{
+		 margin:24rpx 32rpx;
+		 background-color: #fff;
+		  
+		 .reward-item, .reward-item-title{
+			 border-bottom: solid 1px #e6e6e6;
+			 line-height: 44px;
+			 padding-left: 16rpx;
+		 }
+		 .reward-item-title{
+			 font-weight: bold;
+		 }
+		 .reward-item{
+			min-height: 64px;
+		 }
+	}
 	page{
 		font-family: 'Regular';
 	}

+ 63 - 26
pages/staffHome/teamHonor/teamHonor.vue

@@ -8,34 +8,43 @@
 		<view class="commend-box" v-for="(item,i) in list" :key="i" @click="ckItem(item)">
 			<view class="commend-content">
 				<view class="title">
-					{{item.orgName?item.orgName:item.typeName}}
+					<view class="title1">{{item.honorId}}</view>
+					<view class="title2">{{item.orgName}}</view>
 				</view>
-				<view class="commendation">
+				<!-- <view class="commendation">
 					{{item.content}}
-				</view>
-				<view class="integral">
-					<view class="icon">
-						<img src="../../../assets/img/riFill-copper-diamond-fill@2x.png" alt="">
-					</view>
-					<view class="text">
-						{{item.scoreInfo}}积分
+					
+				</view> -->
+				<view  class="integralMain">
+					<view class="integral">
+						<view class="icon">
+							<img src="../../../assets/img/riFill-copper-diamond-fill@2x.png" alt="">
+						</view>
+						<view class="text">
+							<span  class="text1"><span v-if="type=='team'" >每人</span>+{{item.scoreInfo}}积分</span>
+							
+						</view>
 					</view>
+					<span  class="text2"  v-if="type=='my'" >{{item.userName?item.userName:item.badgeName}} </span>
+					
 				</view>
+				
 			</view>
-			<view class="gainer">
+			<view class="gainer" v-if="false" >
 				<template v-if="type=='team'">
-					<img src="@/assets/img/honorPic2.png" alt="">
+					<!-- <img src="@/assets/img/honorPic2.png" alt=""> -->
 					<!-- <img v-if="item.badge&&item.badge.imgUrl" :src="item.badge.imgUrl" alt="">
 					<u-avatar  v-else  size="136" ></u-avatar> -->
+					
 				</template>
 				<template v-if="type=='my'">
-					<img v-if="item.regUser&&item.regUser.headImg" :src="item.regUser.headImg" alt="">
-					<u-avatar  v-else  size="136" ></u-avatar>
+				<!-- 	<img v-if="item.regUser&&item.regUser.headImg" :src="item.regUser.headImg" alt="">
+					<u-avatar  v-else  size="136" ></u-avatar> -->
 				</template>
 			
 			
 				<view class="name">
-					{{item.userName?item.userName:item.badgeName}}
+					<!-- {{item.userName?item.userName:item.badgeName}} -->
 				</view>
 			</view>
 		</view>
@@ -92,12 +101,10 @@
 		methods: {
 			
 			ckItem(item){
-				if(item.badgeId){
-					var url="/pages/staffHome/teamHonor/badgeDetails?type="+item.badgeId+"&id="+item.typeId;
-					uni.navigateTo({
-						url:url
-					})
-				}
+				var url="/pages/staffHome/teamHonor/badgeDetails?id="+item.id;
+				uni.navigateTo({
+					url:url
+				})
 			},
 			myLoadmore(){
 				this.listForm.pageIndex += 1;
@@ -132,13 +139,10 @@
 			},
 			getByType(){
 				
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
+			
 				
 				API.getByType(this.type).then((response) => {
-					uni.hideLoading();
+				
 					this.tabList=[
 						{
 							id:'',
@@ -182,18 +186,49 @@
 		display: flex;
 		justify-content: space-between;
 		.commend-content{
+			width: 100%;
 			.title{
 				color: rgba(51, 51, 51, 1);
 				font-size: 16px;
 				line-height: 23px;
 				font-family: 'Medium';
+				display: flex;
+				justify-content: space-between;
+				
+				.title1{
+					width: 60%;
+					min-width:  430rpx;
+					font-weight: bold;
+					padding-left: 4px;
+					    padding-bottom: 4px;
+				}
+				.title2{
+					width: 30%;
+					text-align: right;
+				}
 			}
 			.commendation{
 				color: rgba(119, 119, 119, 1);
 				font-size: 12px;
 				line-height: 17px;
 				margin-top: 4rpx;
-				width: 430rpx;
+				padding: 8rpx 0px;
+				//width: 430rpx;
+			
+			}
+			.commendationMy{
+				
+				
+			}
+			.integralMain{
+				display: flex;
+				justify-content: space-between;
+				.text2{
+					vertical-align: middle;
+					padding-top: 14rpx;
+					margin-top: 10rpx;
+					font-size: 32rpx;
+				}
 			}
 			.integral{
 				font-family: 'Regular';
@@ -216,6 +251,8 @@
 				.text{
 					font-size: 24rpx;
 					color: rgba(119, 119, 119, 1);
+					
+					
 				}
 				
 			}

+ 3 - 1
vue.config.js

@@ -1,4 +1,5 @@
 if(process.env.NODE_ENV === "production"){
+	const Templates = process.UNI_SCRIPT_DEFINE;
 	
 	const path = require('path');
 	const webpack = require('webpack')
@@ -57,7 +58,8 @@ if(process.env.NODE_ENV === "production"){
 			); */
 	
 				config.plugins.push(new webpack.ProgressPlugin(percentage => {
-					percentage === 1 ? console.log('编译完成:100.00%') : console.log(`编译进度:${(percentage * 100).toFixed(2)}%,提示!构建请点击‘发行’-‘自定义发行’`)
+					
+					percentage === 1 ? console.log('编译完成:100.00%') : console.log(`编译${Templates['NODE_NAME_T']}进度:${(percentage * 100).toFixed(2)}%,提示!构建请点击‘发行’-‘自定义发行’`)
 				}));
 			config.output.filename = `./static/js/[name].${Timestamp}.js`
 			config.output.chunkFilename = `./static/js/[name].${Timestamp}.js`