zhengkaixin %!s(int64=2) %!d(string=hai) anos
pai
achega
f366d4b363

+ 2 - 2
App.vue

@@ -58,7 +58,7 @@
 		font-family: 'Medium';
 		
 	}
-	@media screen and (min-width: 320px) {
+	/* @media screen and (min-width: 320px) {
 	   /deep/.u-tabbar__content {
 			height: 45px!important;
 	   }
@@ -72,7 +72,7 @@
 	   /deep/.u-tabbar__content {
 			height: 65px!important;
 	   }
-	}
+	} */
 	.u-back-text{
 		color: #101010 !important;
 		font-size: 17px !important

+ 9 - 0
apis/pagejs/share.js

@@ -21,6 +21,15 @@ export function addShare(formData) {
 	})
 }
 
+export function delShare(formData) {
+	return request({
+		url: '/mobile/share/delShare',
+		data: formData,
+		method: 'post',	
+	//	header:{'Content-Type':'application/json'},
+	})
+}
+
 export function changeLikes(formData) {
 	return request({
 		url: '/mobile/share/changeLikes',

+ 13 - 6
components/Tabbar.vue

@@ -1,13 +1,16 @@
 <template >
 	<view>
-		<u-tabbar v-model="myCurrent" :list="tabbarList" 
-		:before-switch="beforeSwitch" active-color="#1F4A99"  ></u-tabbar>
+		<u-tabbar v-model="myCurrent" mid-button-size="35px"	 :midButton="true" :list="tabbarList" 
+		:before-switch="beforeSwitch" active-color="#1F4A99" inactive-color="#B3BED1"  ></u-tabbar>
 		
 	</view>
 </template>
 
 <script>
- 	
+ 	var img1=require('@/components/riFill-hearts-fill@1x.png')
+	var img2=require('@/components/home@1x.png')
+	var img3=require('@/components/riFill-hearts-fill@.png')
+	var img4=require('@/components/home@.png')
  	export default {
 		name:"tabbarJob",
 		props:{
@@ -30,10 +33,14 @@
 				 	},
 					{
 					 
-						iconPath: "heart",
-						selectedIconPath: "heart-fill",
-						text: '职工之家 ',
+						iconPath: img3,
+						selectedIconPath: img1,
+						textImg:true,
+						text: img2,
+						text2: img4,
 						pagePath2:"/pages/staffHome/staffHome",
+						midButton:true,
+						
 					
 					},
 				 	{

BIN=BIN
components/home@.png


BIN=BIN
components/home@1x.png


BIN=BIN
components/riFill-hearts-fill@.png


BIN=BIN
components/riFill-hearts-fill@1x.png


+ 1 - 1
config/.env.dev.js

@@ -13,7 +13,7 @@ const UNI_APP = {
 	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
 	// openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
 	openId:"oBEnI6GDWCRQqn_xlyPlCYFY8Amg",//zkx
-	//openId:"123456",
+	//openId:"oBEnI6L-ne5I6ZMZIRWpmLhlgNBs",
 	//openId:"oBEnI6PiaBMNUMTnjT0ffT1R2JOk",//杨所
 	//openId:"oBEnI6N9gRq3xOVlw34JfYjhtB9k",//  伊明
 	

+ 1 - 1
pages/mine/data.vue

@@ -146,7 +146,7 @@
 						//(fileData);
 					var formData = new FormData();
 					
-					formData.append('subFolder', "111");
+					formData.append('subFolder', "headimg");
 					
 					formData.append('photoFile', file);
 					var token=this.carhelp.getToken()

+ 50 - 2
pages/mine/personalPage.vue

@@ -91,6 +91,10 @@
 					<view class="status" style="color: red;" v-if="item.status!=1">
 						[{{item.status==0?'审核中':''}}{{item.status==2?'审核不通过':''}}]
 					</view>
+					
+					<view class="status" style="color: #19be6b;" @click="delShare(item.id)" v-if="item.status!=1">
+						<u>点击删除</u>
+					</view>
 				</view>
 				<view class="content">
 					<view class="title">
@@ -104,7 +108,7 @@
 							@click="previewImage(item.listShareFiles,i2)"
 							:src="pic.url" alt="">
 							
-							<video v-else :key="i2" :src="pic.url"
+							<video v-else :key="i2" :src="pic.url"  :class="{videoplay:playurl==pic.url}"  @play="playurl=pic.url"
 							                    enable-danmu danmu-btn controls></video>
 						</template>
 					</view>
@@ -126,6 +130,7 @@
 			return {
 				flag: false,
 				scrollTop: "",
+				playurl:"",
 				plusInfo:{},
 				userInfo:{},
 				listForm:{
@@ -155,6 +160,46 @@
 			}
 		},
 		methods: {
+			delShare(id){
+				uni.showModal({
+					title: '提示',
+					content: '是否删除分享?',
+					
+					success: res=>{
+						if (res.confirm) {
+							this.delShareApi(id)
+						} else if (res.cancel) {
+							//('用户点击取消');
+						}
+					}
+				});
+			},
+			delShareApi(id){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API_share.delShare({
+					shareId:id
+				}).then((res) => {
+				
+					uni.showToast({
+						title: "删除成功",
+						icon: "none"
+					})
+					
+					this.listForm.pageIndex=1;
+					this.getList()
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+					this.listForm.pageIndex=1;
+					this.getList()
+				})
+			},
 			day(time){
 				if(time){
 					
@@ -438,9 +483,12 @@
 						 border-radius: 16rpx;
 						 margin-right: 4rpx;
 					 }
+					 .videoplay{
+					 	height: 400rpx;
+					 }
 					 video {
 					 	width: 100%;
-					 	height: 168rpx;
+					 	height: 200rpx;
 					 	border-radius: 16rpx;
 					 	margin-bottom: 16rpx;
 					 	//margin-left: 16rpx;

+ 53 - 5
pages/staffHome/filesonic.vue

@@ -24,7 +24,7 @@
 					</view>
 				</view>
 				<view class="share-text">
-					<textarea placeholder="记录点滴生活..." :auto-height="true" style="width:auto"
+					<textarea placeholder="记录点滴生活..." disabled="disabled" :auto-height="true" style="width:auto"
 					v-model="item.synopsis" readonly maxlength="200"
 					 name="" id="" ></textarea>
  					
@@ -35,7 +35,7 @@
 						@click="previewImage(item.listShareFiles,i2)"
 						:src="pic.url" alt="">
 						
-						<video v-else :key="i2" :src="pic.url"
+						<video v-else :key="i2" :src="pic.url" :class="{videoplay:playurl==pic.url}"  @play="playurl=pic.url"
 						                    enable-danmu danmu-btn controls></video>
 					</template>
 					
@@ -60,7 +60,10 @@
 							</text>
 						</template>
 					</view>
-						<view class="like" @click="changeLikes(item)" :class="{
+					<view class="tag status" style="color: #19be6b;" @click="delShare(item.id)" v-if="item.status!=1">
+						<u>点击删除</u>
+					</view>
+						<view class="like" v-if="item.status==1" @click="changeLikes(item)" :class="{
 							red:item.isLike
 						}"
 						
@@ -76,7 +79,7 @@
 			
 			
 		</view>
-		<u-divider  :isnone="list.length==0" nonetext="没有找到相关内容" border-color="#CFD2D5">已经到底了</u-divider>
+		<u-divider  :isnone="list.length==0"  v-if="list.length==recordsTotal" nonetext="没有找到相关内容" border-color="#CFD2D5">已经到底了</u-divider>
 		
 		 <view class="bottom"  @click="issueMethod()" >
 		 	<img src="../../assets/img/riFill-camera-fill@2x.png">
@@ -97,6 +100,7 @@
 					pageSize:20,
 					
 				},
+				playurl:"",
 				list:[],
 				recordsTotal:0,
 				tabList: [],
@@ -127,6 +131,46 @@
 		
 		},
 		methods: {
+			delShare(id){
+				uni.showModal({
+					title: '提示',
+					content: '是否删除分享?',
+					
+					success: res=>{
+						if (res.confirm) {
+							this.delShareApi(id)
+						} else if (res.cancel) {
+							//('用户点击取消');
+						}
+					}
+				});
+			},
+			delShareApi(id){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API.delShare({
+					shareId:id
+				}).then((res) => {
+				
+					uni.showToast({
+						title: "删除成功",
+						icon: "none"
+					})
+					
+					this.listForm.pageIndex=1;
+					this.getList()
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+					this.listForm.pageIndex=1;
+					this.getList()
+				})
+			},
 			changeLikes(info){
 				var userInfo=this.carhelp.getPersonInfo()
 				if(!userInfo){
@@ -355,9 +399,13 @@ font-family: 'Regular';
 				justify-content: start;
 				flex-wrap: wrap;
 				margin-top: 16rpx;
+				.videoplay{
+					height: 400rpx;
+				}
 				video {
 					width: 100%;
-					height: 216rpx;
+					
+					height: 200rpx;
 					border-radius: 16rpx;
 					margin-bottom: 16rpx;
 					margin-left: 16rpx;

+ 1 - 0
uni_modules/uview-ui/components/u-icon/u-icon.vue

@@ -1,5 +1,6 @@
 <template>
 	<view :style="[customStyle]" class="u-icon" @tap="click" :class="['u-icon--' + labelPos]">
+		
 		<image class="u-icon__img" v-if="isImg" :src="name" :mode="imgMode" :style="[imgStyle]"></image>
 		<text v-else class="u-icon__icon" :class="customClass" :style="[iconStyle]" :hover-class="hoverClass"
 			  @touchstart="touchstart">

+ 50 - 12
uni_modules/uview-ui/components/u-tabbar/u-tabbar.vue

@@ -26,10 +26,25 @@
 						:offset="[-2, getOffsetRight(item.count, item.isDot)]"
 					></u-badge>
 				</view>
-				<view class="u-tabbar__content__item__text" :style="{
+				 
+				<view class="u-tabbar__content__item__text"   v-if="item.textImg" :style="{
+					backgroundImage: `url(${elIconPathBL(index)?item.text:item.text2})`,
+					    backgroundRepeat: 'no-repeat',
+					    backgroundPositionX: 'center',
+					    backgroundPositionY: 'center',
+						    fontSize: '36rpx',
+						    lineHeight:  '22px',
+							    zIndex: '999'
+				}">
+					
+					
+					<text class="u-line-1" style="color: #fff;" >-</text>
+				</view>
+				<view class="u-tabbar__content__item__text"  v-else :style="{
 					color: elColor(index)
 				}">
-					<text class="u-line-1">{{item.text}}</text>
+					
+					<text class="u-line-1"  >{{item.text}}</text>
 				</view>
 			</view>
 			<view v-if="midButton" class="u-tabbar__content__circle__border" :class="{
@@ -73,12 +88,12 @@
 			// 非凸起图标的大小,单位任意,数值默认rpx
 			iconSize: {
 				type: [String, Number],
-				default: 40
+				default: '20px'
 			},
 			// 凸起的图标的大小,单位任意,数值默认rpx
 			midButtonSize: {
 				type: [String, Number],
-				default: 90
+				default: '45px'
 			},
 			// 激活时的演示,包括字体图标,提示文字等的演示
 			activeColor: {
@@ -134,6 +149,26 @@
 			this.pageUrl = pages[pages.length - 1].route;
 		},
 		computed: {
+			elIconPathBL(){
+				return (index) => {
+					// 历遍u-tabbar的每一项item时,判断是否传入了pagePath参数,如果传入了
+					// 和data中的pageUrl参数对比,如果相等,即可判断当前的item对应当前的tabbar页面,设置高亮图标
+					// 采用这个方法,可以无需使用v-model绑定的value值
+					let pagePath = this.list[index].pagePath;
+					// 如果定义了pagePath属性,意味着使用系统自带tabbar方案,否则使用一个页面用几个组件模拟tabbar页面的方案
+					// 这两个方案对处理tabbar item的激活与否方式不一样
+					if(pagePath) {
+						if(pagePath == this.pageUrl || pagePath == '/' + this.pageUrl) {
+							return true;
+						} else {
+							return false;
+						}
+					} else {
+						// 普通方案中,索引等于v-model值时,即为激活项
+						return index == this.value ? true :false
+					}
+				}
+			},
 			elIconPath() {
 				return (index) => {
 					// 历遍u-tabbar的每一项item时,判断是否传入了pagePath参数,如果传入了
@@ -253,10 +288,11 @@
 			/* #endif */
 
 			&__circle__border {
+				//display: none;
 				border-radius: 100%;
-				width: 110rpx;
-				height: 110rpx;
-				top: -48rpx;
+				width: 90px;
+				    height: 90px;
+				top: -20px;
 				position: absolute;
 				z-index: 4;
 				background-color: #ffffff;
@@ -290,7 +326,7 @@
 				&__text {
 					color: $u-content-color;
 					font-size: 26rpx;
-					line-height: 28rpx;
+					//line-height: 28rpx;
 					position: absolute;
 					bottom: 14rpx;
 					left: 50%;
@@ -305,21 +341,23 @@
 				@include vue-flex;
 				flex-direction: column;
 				justify-content: space-between;
+			
 				z-index: 10;
 				/* #ifndef APP-NVUE */
 				height: calc(100% - 1px);
 				/* #endif */
 
 				&__button {
-					width: 90rpx;
-					height: 90rpx;
+					
+					width: 85px;
+					height: 65px;
 					border-radius: 100%;
 					@include vue-flex;
 					justify-content: center;
 					align-items: center;
 					position: absolute;
-					background-color: #ffffff;
-					top: -40rpx;
+					//background-color: #ffffff;
+					top: -25px;
 					left: 50%;
 					z-index: 6;
 					transform: translateX(-50%);

+ 20 - 8
uni_modules/uview-ui/components/u-upload-file/u-upload-file.vue

@@ -25,11 +25,12 @@
 				:show-percent="false"
 				height="16"
 				class="u-progress"
-				:percent="item.progress"
+				
 			></u-line-progress>
+			
 			<view @tap.stop="retry(index)" v-if="item.error" class="u-error-btn2 u-error-btn">点击重试</view>
-			<view  v-else-if="item.progress==100" class="u-error-btn2 u-primary-btn">上传成功</view>
-			<view  v-else-if="!item.error&&item.progress!=100" class="u-error-btn2 u-warning-btn">上传中</view>
+			<view  v-else-if="item.progress==100&&item.response&&item.response.result" class="u-error-btn2 u-primary-btn">上传成功</view>
+			<view  v-else-if="!item.error" class="u-error-btn2 u-warning-btn">上传中</view>
 			
 			
 			<video v-if="item.fileType=='video/mp4'" :src="item.url"
@@ -344,6 +345,8 @@ export default {
 								url: val.path,
 								progress: 0,
 								error: false,
+								data:null,
+								response:null,
 								file: val,
 								fileType:val.type
 							});
@@ -425,8 +428,10 @@ export default {
 			}
 			this.lists[index].error = false;
 			this.uploading = true;
+			
 			// 创建上传对象
 			const task = uni.uploadFile({
+				timeout:60*1000*3,
 				url: this.action,
 				filePath: this.lists[index].url,
 				name: this.name,
@@ -442,11 +447,18 @@ export default {
 					if (![200, 201, 204].includes(res.statusCode)) {
 						this.uploadError(index, data);
 					} else {
-						// 上传成功
-						this.lists[index].response = data;
-						this.lists[index].progress = 100;
-						this.lists[index].error = false;
-						this.$emit('on-success', data, index, this.lists, this.index);
+						
+						if(data.result){
+							
+							// 上传成功
+							this.lists[index].response = data;
+							this.lists[index].progress = 100;
+							this.lists[index].error = false;
+							this.$emit('on-success', data, index, this.lists, this.index);
+						}else{
+								this.uploadError(index, data.message);
+						}
+						
 					}
 				},
 				fail: e => {