zhengkaixin 1 gadu atpakaļ
vecāks
revīzija
215d846e8e

+ 1 - 0
README.md

@@ -0,0 +1 @@
+[](https://modao.cc/app/om1Bwssrndfavz40UudDL)

+ 19 - 0
apis/pagejs/share.js

@@ -51,3 +51,22 @@ export function dataList(formData) {
 	})
 }
 
+
+export function createComment(formData) {
+	return request({
+		url: '/mobile/share/createComment',
+		data: formData,
+		method: 'post',	
+	//	header:{'Content-Type':'application/json'},
+	})
+}
+
+
+export function details(formData) {
+	return request({
+		url: '/open/share/details',
+		data: formData,
+		method: 'post',	
+	//	header:{'Content-Type':'application/json'},
+	})
+}

+ 6 - 0
assets/img/riLine-chat-4-line.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" width="16" height="16" style="border-color: rgba(0,0,0,0);border-width: bpx;border-style: undefined" filter="none">
+    
+    <g>
+    <path d="M7.684 22.667h18.983v-16h-21.333v17.847l2.351-1.847zM8.607 25.333l-5.94 4.667v-24.667c0-0.736 0.597-1.333 1.333-1.333v0h24c0.736 0 1.333 0.597 1.333 1.333v0 18.667c0 0.736-0.597 1.333-1.333 1.333v0h-19.393z" fill="rgba(31.11,73.94999999999999,153,1)"></path>
+    </g>
+  </svg>

+ 4 - 3
config/.env.dev.js

@@ -4,7 +4,7 @@ const UNI_APP = {
 	//BASE_URL: 'http://192.168.33.220:8086/',
 	IMG_URL:"http://www.jsrailway.com.cn/",
 	
-	//BASE_URL:'http://192.168.77.162:8081/railroad-server/',
+	BASE_URL:'http://192.168.77.162:8086/railroad-server/',
 	//BASE_URL:'http://192.168.77.222:8086/railroad-server/',
 
 	
@@ -14,8 +14,9 @@ const UNI_APP = {
 	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
 	// openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
 	// openId:"oBEnI6GDWCRQqn_xlyPlCYFY8Amg",//zkx
-	openId:"oBEnI6FVaHBZOgnxVa70ePPIBd68",
-	//openId:"oBEnI6L-ne5I6ZMZIRWpmLhlgNBs",
+	openId:"oBEnI6FVaHBZOgnxVa70ePPIBd68",//sz
+	//
+	openId:"oBEnI6DtjgbX65mL4_nUFtVgo-8Y",
 	//openId:"oBEnI6PiaBMNUMTnjT0ffT1R2JOk",//杨所
 	//openId:"oBEnI6N9gRq3xOVlw34JfYjhtB9k",//  伊明
 	

+ 1 - 0
main.js

@@ -89,6 +89,7 @@ Vue.mixin({
 
 	},
 	methods: {
+		
 		substrDate(date){
 			if(date){
 				return date.substr(0,11)

+ 9 - 0
pages.json

@@ -401,6 +401,15 @@
             }
             
         }
+        ,{
+            "path" : "pages/staffHome/filesonicInfo",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 
 	

+ 108 - 0
pages/mine/personalPage.vue

@@ -96,6 +96,7 @@
 						<u>点击删除</u>
 					</view>
 				</view>
+				<view class="tagMain">
 				<view class="content">
 					<view class="title">
 						<textarea placeholder="记录点滴生活..." :auto-height="true"
@@ -113,7 +114,53 @@
 						</template>
 					</view>
 				</view>
+				<view class="likeMain" v-if="item.status==1" >
+						<view class="like"   >
+							<view class="icon">
+								<u-icon name="thumb-up" size="38"></u-icon>
+							</view>
+							<view class="number">
+								{{item.likesNum}}
+							</view>
+						</view>
+						
+						
+						<view class="like"  style="margin-left: 18rpx;">
+							<view class="icon">
+								<img  style="width: 40rpx; height: 48rpx;"
+								src="../../assets/img/riLine-chat-4-line.svg"></img>
+							</view>
+							<view class="number"> {{item.commentNum}}</view>
+						</view>
+						<view class="like"  style="margin-left: 18rpx;"
+						 @click="gotoUrl('pages/staffHome/filesonicInfo?id='+item.id)" >
+							<view class="icon">
+								<u-icon name="photo" size="38"></u-icon>
+								
+							</view>
+							<view class="number"> 查看</view>
+						</view>
+					</view>
+					
 				
+				<view  class="messageListMain" v-show="item.listShareLikes.length||item.listShareComment.length" >
+					<view  class="mLikeList" v-show="item.listShareLikes.length">
+						<u-icon name="thumb-up" size="38"></u-icon>
+						<span v-for="(itemlike,ilike) in item.listShareLikes" :key="ilike">
+							{{ilike==0?' ':', '}}{{itemlike.userName}}
+						</span>
+						<span v-show="item.likesNum>item.listShareLikes.length">...</span>
+					</view>
+					<view  class="messageList" v-show="item.listShareComment.length">
+						<view class="messageItem" v-for="(itemcom,ico) in item.listShareComment"  :key="ico" >
+							<span class="mItemTitle">{{itemcom.userName}}:</span>
+							<span class="mItemBody">{{itemcom.content}}</span>
+						</view>
+						<view class="messageItemEnd" v-show="item.commentNum>item.listShareComment.length" >最多显示20条评论</view>
+					</view>
+					
+				</view>
+				</view>
 			</view>
 		</view>
 		<u-divider  :isnone="list.length==0" nonetext="没有找到相关内容" border-color="#CFD2D5">已经到底了</u-divider>
@@ -308,6 +355,67 @@
 </script>
 
 <style scoped lang="scss">
+	
+	
+	.tagMain {
+		// display: flex;
+		// justify-content: space-between;
+		.messageListMain{
+			border-radius: 4px;
+			background-color: rgba(240, 240, 240, 1);
+		
+			color: #224466 ;
+			.mLikeList{
+				padding:16rpx;
+				border-bottom: 1px solid rgba(222, 222, 222, 1);
+			}
+			.messageList{
+				padding:16rpx;
+				.messageItem{
+					// display: flex;
+					// flex-wrap: wrap;
+					.mItemBody{
+						color: #101010;
+		
+					}
+				}
+				.messageItemEnd{
+					text-align: center;
+					    color: #9E9E9E;
+				}
+				
+			}
+		}
+		.likeMain{
+			display: flex;
+			justify-content: flex-end;
+			.like {
+				margin-top: 16rpx;
+				line-height: 24px;
+				display: flex;
+				color:#224466 ;
+				.number {
+					margin-left: 16rpx;
+				}
+			}
+		}
+		.tag {
+			margin-top: 16rpx;
+			line-height: 24px;
+	
+			.symbol {
+				color: rgba(31, 74, 153, 100);
+				font-size: 16px
+			}
+	
+			.text {
+				color: rgba(31, 74, 153, 1);
+				margin-left: 14rpx;
+			}
+		}
+	}
+	
+	
 	uni-textarea{
 		width: 500rpx;
 		text-indent: 28rpx;

+ 1 - 0
pages/staffHome/activityCenter/activityDetail.vue

@@ -33,6 +33,7 @@
 		data() {
 			return {
 				userInfo:null,
+				authorInfo:null,
 				id:'',
 				info:{},
 			}

+ 605 - 441
pages/staffHome/filesonic.vue

@@ -1,482 +1,646 @@
-<template>
-	<view>
-		<u-navbar title="分享空间"></u-navbar>
-		<!-- 图片 -->
-		<view class="image" v-if="false">
-			<u-image width="100%" height="200rpx" :src="src" border-radius="16"></u-image>
-		</view>
-		
-		<!-- 分享内容 -->
-		<view class="share-content">
-			<view class="item"  v-for="(item,i) in list" :key="i" @click="ckItem(item)">
-				<view class="infos">
-					<view class="person">
-						<view class="photo">
-							<img  v-if="item.regUser&&item.regUser.headImg" :src="item.regUser.headImg" alt="">
-							<u-avatar  v-else  size="64" ></u-avatar>
+<template>
+	<view>
+		<u-navbar title="分享空间"></u-navbar>
+		<!-- 图片 -->
+		<view class="image" v-if="false">
+			<u-image width="100%" height="200rpx" :src="src" border-radius="16"></u-image>
+		</view>
+
+		<!-- 分享内容 -->
+		<view class="share-content">
+			<view class="item" v-for="(item,i) in list" :key="i" @click="ckItem(item)">
+				<view class="infos">
+					<view class="person">
+						<view class="photo">
+							<img v-if="item.regUser&&item.regUser.headImg" :src="item.regUser.headImg" alt="">
+							<u-avatar v-else size="64"></u-avatar>
+						</view>
+						<view class="name">
+							{{item.createName}}
+						</view>
+					</view>
+					<view class="date">
+						{{item.createTime}}
+					</view>
+				</view>
+				<view class="share-text">
+					<textarea placeholder="记录点滴生活..." disabled="disabled" :auto-height="true" style="width:auto"
+						v-model="item.synopsis" readonly maxlength="200" name="" id=""></textarea>
+
+				</view>
+				<view class="pictures">
+					<template v-for="(pic,i2) in item.listShareFiles" v-if="pic.url">
+						<image class="img" v-if="pic.isPic" :key="i2" mode="aspectFill"
+							@click="previewImage(item.listShareFiles,i2)" :src="pic.url" alt="">
+
+							<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>
+				<view class="tagMain">
+					<view class="tag" v-if="!item.activityId" :class="item.activityId">
+						<text class="status" style="color: red;"
+							v-if="item.status!=1">[{{item.status==0?'审核中':''}}{{item.status==2?'审核不通过':''}}]</text>
+
+					</view>
+					<view class="tag" v-else :class="item.activityId" @click="issueMethod(item.activityId)">
+						<text class="status" style="color: red;"
+							v-if="item.status!=1">[{{item.status==0?'审核中':''}}{{item.status==2?'审核不通过':''}}]</text>
+						<template>
+
+							<text class="symbol">#</text>
+							<text class="text">{{item.activityName}}</text>
+							<text class="icon">
+								<u-icon size="28" color="#cccccc" name="arrow-right"></u-icon>
+							</text>
+						</template>
+					</view>
+					<view class="tag status" style="color: #19be6b;" @click="delShare(item.id)" v-if="item.status!=1">
+						<u>点击删除</u>
+					</view>
+					<view class="likeMain">
+						<view class="like" v-if="item.status==1" @click="changeLikes(item)" :class="{
+								red:item.isLike
+							}">
+							<view class="icon">
+								<u-icon name="thumb-up" size="38"></u-icon>
+							</view>
+							<view class="number">
+								{{item.likesNum}}
+							</view>
 						</view>
-						<view class="name">
-							{{item.createName}}
+						
+						
+						<view class="like"  style="margin-left: 18rpx;"
+						v-if="item.status==1" @click="showMessageBtn(item)" >
+							<view class="icon">
+								<img  style="width: 40rpx; height: 48rpx;"
+								src="../../assets/img/riLine-chat-4-line.svg"></img>
+							</view>
+							<view class="number"> 评论</view>
 						</view>
+						
+						<view class="like"  style="margin-left: 18rpx;"
+						v-if="item.status==1" @click="gotoUrl('pages/staffHome/filesonicInfo?id='+item.id)" >
+							<view class="icon">
+								<u-icon name="photo" size="38"></u-icon>
+								
+							</view>
+							<view class="number"> 查看</view>
+						</view>
+					</view>
+					
+				</view>
+				<view  class="messageListMain" v-show="item.listShareLikes.length||item.listShareComment.length" >
+					<view  class="mLikeList" v-show="item.listShareLikes.length">
+						<u-icon name="thumb-up" size="38"></u-icon>
+						<span v-for="(item,i) in item.listShareLikes" :key="i">
+							{{i==0?' ':', '}}{{item.userName}}
+						</span>
+						<span v-show="item.likesNum>item.listShareLikes.length">...</span>
 					</view>
-					<view class="date">
-						{{item.createTime}}
+					<view  class="messageList" v-show="item.listShareComment.length">
+						<view class="messageItem" v-for="(item,i) in item.listShareComment"  :key="i" >
+							<span class="mItemTitle">{{item.userName}}:</span>
+							<span class="mItemBody">{{item.content}}</span>
+						</view>
+						<view class="messageItemEnd" v-show="item.commentNum>item.listShareComment.length" >最多显示20条评论</view>
 					</view>
-				</view>
-				<view class="share-text">
-					<textarea placeholder="记录点滴生活..." disabled="disabled" :auto-height="true" style="width:auto"
-					v-model="item.synopsis" readonly maxlength="200"
-					 name="" id="" ></textarea>
- 					
-				</view>
-				<view class="pictures" >
-					<template v-for="(pic,i2) in item.listShareFiles"  v-if="pic.url">
-						<image  class="img"  v-if="pic.isPic" :key="i2" mode="aspectFill"
-						@click="previewImage(item.listShareFiles,i2)"
-						:src="pic.url" alt="">
-						
-						<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>
+	
+
+
+
+			</view>
+
+
+
+		</view>
+		<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">
+		</view>
+		
+		<u-popup v-model="showMessage" border-radius="34" mode="bottom" >
+			<view class="showMessage">
+				<view class="showMessage1"><h3>发表评论({{content.length}}/50)</h3></view>
+				<view class="showMessage2">
+					<textarea name="" id=""   style="  width:100%"
+					v-model="content" maxlength="50"
+					cols="30" rows="5" placeholder="填写内容"></textarea>
 				</view>
-				<view class="tagMain">
-					<view class="tag"
-					 v-if="!item.activityId"
-					 :class="item.activityId"   >
-						<text class="status" style="color: red;" v-if="item.status!=1">[{{item.status==0?'审核中':''}}{{item.status==2?'审核不通过':''}}]</text>
-						
-					</view>
-					<view class="tag" v-else
-					 :class="item.activityId"   @click="issueMethod(item.activityId)" >
-						<text class="status" style="color: red;" v-if="item.status!=1">[{{item.status==0?'审核中':''}}{{item.status==2?'审核不通过':''}}]</text>
-						<template>
-							
-							<text class="symbol">#</text>
-							<text class="text">{{item.activityName}}</text>
-							<text class="icon"   >
-								<u-icon size="28" color="#cccccc" name="arrow-right"></u-icon>
-							</text>
-						</template>
-					</view>
-					<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
-						}"
-						
-						><view class="icon">
-					<u-icon name="thumb-up"   size="38"></u-icon>
-				</view><view class="number">
-						{{item.likesNum}}</view></view>
+				<view class="showMessage3">
+					<u-button type="primary" @click="submitMessage()">提交</u-button>
 				</view>
-				
-			
 			</view>
-			
-			
-			
-		</view>
-		<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">
-		 </view>
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/pagejs/share.js'
- 	import {
- 		isWeiXin
- 	} from '@/apis/utils'
-	export default {
-		data() {
-			return {
-				listForm:{
-					pageIndex:1,
-					pageSize:20,
 					
-				},
-				playurl:"",
-				list:[],
-				recordsTotal:0,
-				tabList: [],
-				current: 0
-			}
-		},
-		onLoad(op){
-				this.carhelp.set("addShare",0);
-				if((process.env.NODE_ENV === "development")||isWeiXin()){
-					this.getList()
-				}else{
-						alert("请使用微信打开本页面")
-				}
-				
-				//this.dataList()
-		},
-		onReachBottom() {
-			if (this.list.length < this.recordsTotal) {			
-				this.myLoadmore();
-			}
-		},
-		onShow(){
-			console.log("onShow")
-			if(	this.carhelp.get("addShare")){
-				this.listForm.pageIndex=1;
-				this.getList()
-			}
-		
-		},
+			</u-popup>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/pagejs/share.js'
+	import {
+		isWeiXin
+	} from '@/apis/utils'
+	export default {
+		data() {
+			return {
+				listForm: {
+					pageIndex: 1,
+					pageSize: 20,
+
+				},
+				playurl: "",
+				list: [],
+				recordsTotal: 0,
+				tabList: [],
+				current: 0,
+				showMessage:false,
+				showMessageItem:{},
+				showMessageId:'',
+				content:"",
+			}
+		},
+		onLoad(op) {
+			this.carhelp.set("addShare", 0);
+			if ((process.env.NODE_ENV === "development") || isWeiXin()) {
+				this.getList()
+			} else {
+				alert("请使用微信打开本页面")
+			}
+
+			//this.dataList()
+		},
+		onReachBottom() {
+			if (this.list.length < this.recordsTotal) {
+				this.myLoadmore();
+			}
+		},
+		onShow() {
+			console.log("onShow")
+			if (this.carhelp.get("addShare")) {
+				this.listForm.pageIndex = 1;
+				this.getList()
+			}
+
+		},
 		methods: {
-			delShare(id){
-				uni.showModal({
-					title: '提示',
-					content: '是否删除分享?',
-					
-					success: res=>{
-						if (res.confirm) {
-							this.delShareApi(id)
-						} else if (res.cancel) {
-							//('用户点击取消');
-						}
-					}
-				});
+			showMessageBtn(item){
+				this.showMessage=true;
+				this.showMessageId=item.id;
+				this.showMessageItem=item
+				this.content=""
 			},
-			delShareApi(id){
+			submitMessage(){
+				if(!this.content){
+					uni.showToast({
+						title: "请填写内容",
+						icon: "none"
+					})
+					return
+				}
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
 				})
 				
-				API.delShare({
-					shareId:id
+				API.createComment({
+					shareId:this.showMessageId,
+					content:this.content,
 				}).then((res) => {
-				
-					uni.showToast({
-						title: "删除成功",
-						icon: "none"
-					})
 					
-					this.listForm.pageIndex=1;
-					this.getList()
-				}).catch(error => {
 					uni.showToast({
-						title: error,
+						title: "提交成功",
 						icon: "none"
 					})
-					this.listForm.pageIndex=1;
-					this.getList()
-				})
-			},
-			changeLikes(info){
-				var userInfo=this.carhelp.getPersonInfo()
-				if(!userInfo){
-					return
-				}
-				
-				
-				if(!info.isLike){
-					uni.showLoading({
-						title: "加载中",
-						mask: true,
-					})
-					
+					this.showMessage=false
+					//this.getInfo();
+					var user=this.carhelp.getPersonInfo()
 					
-					API.changeLikes({
-						shareId:info.id
-					}).then((res) => {
-						info.isLike=true;
-						info.likesNum++;
-						uni.hideLoading();
-						//this.getInfo(true)
-					}).catch(error => {
-						uni.showToast({
-							title: error,
-							icon: "none"
-						})
+					this.showMessageItem.listShareComment.unshift({
+						userName:user.name,
+						content:this.content
 					})
-				}else{
-					uni.showToast({
-						title: "您已经点过赞了",
-						icon: "none"
-					})
-				}
-				
-			},
-			issueMethod(id){
-				
-				var userInfo=this.carhelp.getPersonInfo()
-				
-				if(!userInfo){
-					uni.showModal({
-						title:"提示",
-						content:"未登录,登录后参与分享活动",
-						confirmText:"前往登录",
-						showCancel:true,
-						success: function (res) {
-							if(res.confirm){
-								uni.navigateTo({
-									url:'/pages/login/index'
-								})
-							}
-						}
-					})
-				}else{
-					if(id){
-						this.gotoUrl('pages/mine/issue?id='+id)
-					}else{
-						this.gotoUrl('pages/mine/issue?nic=1')
-					}
-				
-				}
-				
-				
-			},
-			previewImage(img,i) {
-				let imgs = [];
-				img.forEach(it=>{
-					if(it.isPic){
-						imgs.push(it.url)
-					}
-				})
-				
-				
-				uni.previewImage({
-					//indicator:"default",
-					indicator:"number",
-					loop:true,
-					urls: imgs,
-					current: i
-				})
-			},
-			ckItem(item){
-				
-			},
-			dataList(){
-				
-				
-				API.dataList("活动类型").then((res) => {
-				
-					this.tabList=[
-						{
-							id:'',
-							name:'全部'
-						},
-						...res.data
-					]
-					
-				}).catch(error => {
-					
-				})
-			},
-			getList(){
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				
-				API.pageList(this.listForm).then((res) => {
-					this.carhelp.set("addShare",0);
-					uni.hideLoading();
-					var list=res.data.data;
-				
-					
-					if(this.listForm.pageIndex==1){
-						this.list = list;
-					}else{
-						this.list = [
-							...this.list,
-							...list
-						];
-					}
-					this.recordsTotal = res.data.recordsTotal;
 					
+					//this.getNewsCommentsList(true)
 				}).catch(error => {
 					uni.showToast({
 						title: error,
 						icon: "none"
 					})
 				})
-			},
-			myLoadmore(){
-				this.listForm.pageIndex += 1;
-				this.getList();
-			},
-			change(index) {
-				this.current = index;
-			
-				this.listForm.pageIndex = 1;
-				this.listForm.type=this.tabList[index].id
-				this.getList()
-			}
-		}
-	}
-</script>
-
+			},
+			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) {
+					return
+				}
+
+
+				if (!info.isLike) {
+					uni.showLoading({
+						title: "加载中",
+						mask: true,
+					})
+
+
+					API.changeLikes({
+						shareId: info.id
+					}).then((res) => {
+						info.isLike = true;
+						info.likesNum++;
+						var user=this.carhelp.getPersonInfo()
+						
+						info.listShareLikes.unshift({
+							userName:user.name
+						})
+						uni.hideLoading();
+						//this.getInfo(true)
+					}).catch(error => {
+						uni.showToast({
+							title: error,
+							icon: "none"
+						})
+					})
+				} else {
+					uni.showToast({
+						title: "您已经点过赞了",
+						icon: "none"
+					})
+				}
+
+			},
+			issueMethod(id) {
+
+				var userInfo = this.carhelp.getPersonInfo()
+
+				if (!userInfo) {
+					uni.showModal({
+						title: "提示",
+						content: "未登录,登录后参与分享活动",
+						confirmText: "前往登录",
+						showCancel: true,
+						success: function(res) {
+							if (res.confirm) {
+								uni.navigateTo({
+									url: '/pages/login/index'
+								})
+							}
+						}
+					})
+				} else {
+					if (id) {
+						this.gotoUrl('pages/mine/issue?id=' + id)
+					} else {
+						this.gotoUrl('pages/mine/issue?nic=1')
+					}
+
+				}
+
+
+			},
+			previewImage(img, i) {
+				let imgs = [];
+				img.forEach(it => {
+					if (it.isPic) {
+						imgs.push(it.url)
+					}
+				})
+
+
+				uni.previewImage({
+					//indicator:"default",
+					indicator: "number",
+					loop: true,
+					urls: imgs,
+					current: i
+				})
+			},
+			ckItem(item) {
+
+			},
+			dataList() {
+
+
+				API.dataList("活动类型").then((res) => {
+
+					this.tabList = [{
+							id: '',
+							name: '全部'
+						},
+						...res.data
+					]
+
+				}).catch(error => {
+
+				})
+			},
+			getList() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+
+				API.pageList(this.listForm).then((res) => {
+					this.carhelp.set("addShare", 0);
+					uni.hideLoading();
+					var list = res.data.data;
+
+
+					if (this.listForm.pageIndex == 1) {
+						this.list = list;
+					} else {
+						this.list = [
+							...this.list,
+							...list
+						];
+					}
+					this.recordsTotal = res.data.recordsTotal;
+
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			myLoadmore() {
+				this.listForm.pageIndex += 1;
+				this.getList();
+			},
+			change(index) {
+				this.current = index;
+
+				this.listForm.pageIndex = 1;
+				this.listForm.type = this.tabList[index].id
+				this.getList()
+			}
+		}
+	}
+</script>
+
 <style lang="scss" scoped>
-	.red{
-		color: red !important;
-	}
-	.like{
-		margin-top: 16rpx;
-		line-height: 24px;
-		display: flex;
-		.number{
-			margin-left: 16rpx;
+	.showMessage{
+		padding: 60rpx 50rpx ;
+		.showMessage2{
+			background-color: #E5E7EA;
+			margin: 40rpx 0;
+			textarea{
+				padding: 8rpx;
+				border-radius:34px;
+			}
 		}
+		
 	}
-	page {
-		background-color: #fff;
-		padding-bottom: 100px;
-	}
-
-	.image {
-		padding: 0 32rpx;
-		margin: 24rpx 0;
-	}
-
-	.tabs {
-		background-color: rgba(255, 255, 255, 1);
-		padding: 0 32rpx;
-
-		/deep/.u-tab-item {
-			flex: none !important;
-			margin-right: 32rpx;
-		}
-
-		/deep/.u-tabs-scorll-flex {
-			justify-content: start;
+	.messageListMain{
+		border-radius: 4px;
+		background-color: rgba(240, 240, 240, 1);
+	
+		color: #224466 ;
+		.mLikeList{
+			padding:16rpx;
+			border-bottom: 1px solid rgba(222, 222, 222, 1);
 		}
-	}
-
-	// 分享内容
-	.share-content {
-		margin: 48rpx 32rpx 0 32rpx;
-
-		.item {
-			padding-bottom: 32rpx;
-			border-bottom: 1px solid rgba(232, 232, 232, 1);
-			margin-top: 48rpx;
-font-family: 'Regular';
-			.infos {
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-
-				.person {
-					display: flex;
-					align-items: center;
-
-					.photo {
-						img {
-							width: 64rpx;
-							height: 64rpx;
-							border-radius: 50px;
-						}
-					}
-
-					.name {
-						color: rgba(51, 51, 51, 1);
-						font-size: 16px;
-						margin-left: 24rpx;
-						font-family: 'Medium';
-					}
-				}
-			}
-
-			.share-text {
-				margin-top: 24rpx;
-				color: #101010;
-				font-size: 16px;
-				line-height: 22px;
-			}
+		.messageList{
+			padding:16rpx;
+			.messageItem{
+				// display: flex;
+				// flex-wrap: wrap;
+				.mItemBody{
+					color: #101010;
 
-			.pictures {
-				display: flex;
-				justify-content: start;
-				flex-wrap: wrap;
-				margin-top: 16rpx;
-				.videoplay{
-					height: 400rpx;
-				}
-				video {
-					width: 100%;
-					
-					height: 200rpx;
-					border-radius: 16rpx;
-					margin-bottom: 16rpx;
-					margin-left: 16rpx;
-				}
-				.img {
-					width: 31%;
-					height: 216rpx;
-					border-radius: 16rpx;
-					margin-bottom: 16rpx;
-					margin-left: 16rpx;
-				}
-				img {
-					width: 31%;
-					height: 216rpx;
-					border-radius: 16rpx;
-					margin-bottom: 16rpx;
-					margin-left: 16rpx;
 				}
 			}
-			.video{
-				margin-top: 16rpx;
-				uni-video{
-					width: 100%;
-					height: 380rpx;
-					border-radius: 8px;
-				}
-			}
-			.tagMain{
-				display: flex;
-				justify-content: space-between;
-				.tag {
-					margin-top: 16rpx;
-					line-height: 24px;
-				
-					.symbol {
-						color: rgba(31, 74, 153, 100);
-						font-size: 16px
-					}
-				
-					.text {
-						color: rgba(31, 74, 153, 1);
-						margin-left: 14rpx;
-					}
-				}
+			.messageItemEnd{
+				text-align: center;
+				    color: #9E9E9E;
 			}
 			
 		}
-
 	}
-
-	.item:last-of-type {
-		border: none;
-		margin-bottom: 26rpx;
-	}
-
-   .bottom{
-	   z-index: 999;
-	   background: linear-gradient(223.81deg, rgba(0,90,217,1) 14.24%,rgba(0,52,148,1) 86.67%);
-	   width: 104rpx;
-	   height: 104rpx;
-	   border-radius: 50px;
-	   display: flex;
-	   justify-content: center;
-	   align-items: center;
-	   position: fixed;
-	   right: 72rpx;
-	   bottom: 72rpx;
-	   img{
-		   width: 56rpx;
-		   height: 56rpx;
-		   
-	   }
-   }
-</style>
+	
+	
+	.red {
+		color: red !important;
+	}
+
+	.like {
+		margin-top: 16rpx;
+		line-height: 24px;
+		display: flex;
+		color:#224466 ;
+		.number {
+			margin-left: 16rpx;
+		}
+	}
+
+	page {
+		background-color: #fff;
+		padding-bottom: 100px;
+	}
+
+	.image {
+		padding: 0 32rpx;
+		margin: 24rpx 0;
+	}
+
+	.tabs {
+		background-color: rgba(255, 255, 255, 1);
+		padding: 0 32rpx;
+
+		/deep/.u-tab-item {
+			flex: none !important;
+			margin-right: 32rpx;
+		}
+
+		/deep/.u-tabs-scorll-flex {
+			justify-content: start;
+		}
+	}
+
+	// 分享内容
+	.share-content {
+		margin: 48rpx 32rpx 0 32rpx;
+
+		.item {
+			padding-bottom: 32rpx;
+			border-bottom: 1px solid rgba(232, 232, 232, 1);
+			margin-top: 48rpx;
+			font-family: 'Regular';
+
+			.infos {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				.person {
+					display: flex;
+					align-items: center;
+
+					.photo {
+						img {
+							width: 64rpx;
+							height: 64rpx;
+							border-radius: 50px;
+						}
+					}
+
+					.name {
+						color: rgba(51, 51, 51, 1);
+						font-size: 16px;
+						margin-left: 24rpx;
+						font-family: 'Medium';
+					}
+				}
+			}
+
+			.share-text {
+				margin-top: 24rpx;
+				color: #101010;
+				font-size: 16px;
+				line-height: 22px;
+			}
+
+			.pictures {
+				display: flex;
+				justify-content: start;
+				flex-wrap: wrap;
+				margin-top: 16rpx;
+
+				.videoplay {
+					height: 400rpx;
+				}
+
+				video {
+					width: 100%;
+
+					height: 200rpx;
+					border-radius: 16rpx;
+					margin-bottom: 16rpx;
+					margin-left: 16rpx;
+				}
+
+				.img {
+					width: 31%;
+					height: 216rpx;
+					border-radius: 16rpx;
+					margin-bottom: 16rpx;
+					margin-left: 16rpx;
+				}
+
+				img {
+					width: 31%;
+					height: 216rpx;
+					border-radius: 16rpx;
+					margin-bottom: 16rpx;
+					margin-left: 16rpx;
+				}
+			}
+
+			.video {
+				margin-top: 16rpx;
+
+				uni-video {
+					width: 100%;
+					height: 380rpx;
+					border-radius: 8px;
+				}
+			}
+
+			.tagMain {
+				display: flex;
+				justify-content: space-between;
+				.likeMain{
+					display: flex;
+				}
+				.tag {
+					margin-top: 16rpx;
+					line-height: 24px;
+
+					.symbol {
+						color: rgba(31, 74, 153, 100);
+						font-size: 16px
+					}
+
+					.text {
+						color: rgba(31, 74, 153, 1);
+						margin-left: 14rpx;
+					}
+				}
+			}
+
+		}
+
+	}
+
+	.item:last-of-type {
+		border: none;
+		margin-bottom: 26rpx;
+	}
+
+	.bottom {
+		z-index: 999;
+		background: linear-gradient(223.81deg, rgba(0, 90, 217, 1) 14.24%, rgba(0, 52, 148, 1) 86.67%);
+		width: 104rpx;
+		height: 104rpx;
+		border-radius: 50px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		position: fixed;
+		right: 72rpx;
+		bottom: 72rpx;
+
+		img {
+			width: 56rpx;
+			height: 56rpx;
+
+		}
+	}
+</style>

+ 523 - 0
pages/staffHome/filesonicInfo.vue

@@ -0,0 +1,523 @@
+<template>
+	<view>
+		<u-navbar title="详情"></u-navbar>
+		<!-- 分享内容 -->
+		<view class="share-content">
+			<view class="item" v-for="(item,i) in list" :key="i" @click="ckItem(item)">
+				<view class="infos">
+					<view class="person">
+						<view class="photo">
+							<img v-if="item.regUser&&item.regUser.headImg" :src="item.regUser.headImg" alt="">
+							<u-avatar v-else size="64"></u-avatar>
+						</view>
+						<view class="name" v-if="item.regUser">
+							{{item.regUser.name}}
+						</view>
+					</view>
+					<view class="date">
+						{{item.createTime}}
+					</view>
+				</view>
+				<view class="share-text">
+					<textarea placeholder="记录点滴生活..." disabled="disabled" :auto-height="true" style="width:auto"
+						v-model="item.synopsis" readonly maxlength="200" name="" id=""></textarea>
+		
+				</view>
+				<view class="pictures">
+					<template v-for="(pic,i2) in item.listShareFiles" v-if="pic.url">
+						<image class="img" v-if="pic.isPic" :key="i2" mode="aspectFill"
+							@click="previewImage(item.listShareFiles,i2)" :src="pic.url" alt="">
+		
+							<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>
+				<view class="tagMain">
+					<view class="tag" v-if="!item.activityId" :class="item.activityId">
+						<text class="status" style="color: red;"
+							v-if="item.status!=1">[{{item.status==0?'审核中':''}}{{item.status==2?'审核不通过':''}}]</text>
+		
+					</view>
+					<view class="tag" v-else :class="item.activityId" @click="issueMethod(item.activityId)">
+						<text class="status" style="color: red;"
+							v-if="item.status!=1">[{{item.status==0?'审核中':''}}{{item.status==2?'审核不通过':''}}]</text>
+						<template>
+		
+							<text class="symbol">#</text>
+							<text class="text">{{item.activityName}}</text>
+							<text class="icon">
+								<u-icon size="28" color="#cccccc" name="arrow-right"></u-icon>
+							</text>
+						</template>
+					</view>
+					
+					<view class="likeMain">
+						<view class="like" v-if="item.status==1" @click="changeLikes(item)" :class="{
+								red:item.isLike
+							}">
+							<view class="icon">
+								<u-icon name="thumb-up" size="38"></u-icon>
+							</view>
+							<view class="number">
+								{{item.likesNum}}
+							</view>
+						</view>
+						
+						
+						<view class="like"  style="margin-left: 18rpx;"
+						v-if="item.status==1" @click="showMessageBtn(item)" >
+							<view class="icon">
+								<img  style="width: 40rpx; height: 48rpx;"
+								src="../../assets/img/riLine-chat-4-line.svg"></img>
+							</view>
+							<view class="number"> 评论</view>
+						</view>
+						
+						<view class="like" v-show="item.listShareLikes.length>20" style="margin-left: 18rpx;"
+						 @click="showlike=!showlike" >
+							<view class="icon">
+								<u-icon name="chat" size="38"></u-icon>
+								
+							</view>
+							<view class="number"> {{showlike?'收起':'展开'}}点赞</view>
+						</view>
+						
+						
+					</view>
+					
+				</view>
+				<view  class="messageListMain" v-show="item.listShareLikes.length||item.listShareComment.length" >
+					<view  class="mLikeList" v-show="item.listShareLikes.length">
+						<u-icon name="thumb-up" size="38"></u-icon>
+						<span v-for="(itemlike,ilike) in item.listShareLikes" :key="ilike" v-show="showlike||ilike<=20">
+							{{ilike==0?' ':', '}}{{itemlike.userName}}
+						</span>
+						<span v-show="item.listShareLikes.length>20&&!showlike">...</span>
+					</view>
+					<view  class="messageList" v-show="item.listShareComment.length">
+						<view class="messageItem" v-for="(itemcom,ico) in item.listShareComment"  :key="ico" >
+							<span class="mItemTitle">{{itemcom.userName}}
+							<span class="mItemTitleColor" v-if="item.regUser&&userInfo&&(item.regUser.id==itemcom.userId)">[作者]</span>
+							<span class="mItemTitleColor" v-else-if="item.regUser&&userInfo&&(itemcom.userId==userInfo.id)">[本人]</span>
+							:</span>
+							<span class="mItemBody">{{itemcom.content}}</span>
+						</view>
+					</view>
+					
+				</view>
+			
+		
+		
+		
+			</view>
+		
+		
+			
+		</view>
+		
+		<u-popup v-model="showMessage" border-radius="34" mode="bottom" >
+			<view class="showMessage">
+				<view class="showMessage1"><h3>发表评论({{content.length}}/50)</h3></view>
+				<view class="showMessage2">
+					<textarea name="" id=""   style="  width:100%"
+					v-model="content" maxlength="50"
+					cols="30" rows="5" placeholder="填写内容"></textarea>
+				</view>
+				<view class="showMessage3">
+					<u-button type="primary" @click="submitMessage()">提交</u-button>
+				</view>
+			</view>
+					
+			</u-popup>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/pagejs/share.js'
+	
+	export default {
+		data() {
+			return {
+				userInfo:null,
+				id:'',
+				info:{},
+				list: [],
+				showMessage:false,
+				showMessageItem:{},
+				showMessageId:'',
+				content:"",
+				showlike:false,
+			}
+		},
+		onLoad(op){
+			this.userInfo=this.carhelp.getPersonInfo()
+			console.log(this.userInfo)
+			if(op.id){
+				this.id=op.id
+				this.getInfo()
+			}
+			
+		},
+		methods: {
+			ckItem(item) {
+			
+			},
+			previewImage(img, i) {
+				let imgs = [];
+				img.forEach(it => {
+					if (it.isPic) {
+						imgs.push(it.url)
+					}
+				})
+			
+			
+				uni.previewImage({
+					//indicator:"default",
+					indicator: "number",
+					loop: true,
+					urls: imgs,
+					current: i
+				})
+			},
+			submitMessage(){
+				if(!this.content){
+					uni.showToast({
+						title: "请填写内容",
+						icon: "none"
+					})
+					return
+				}
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API.createComment({
+					shareId:this.showMessageId,
+					content:this.content,
+				}).then((res) => {
+					
+					uni.showToast({
+						title: "提交成功",
+						icon: "none"
+					})
+					this.showMessage=false
+					//this.getInfo();
+					var user=this.carhelp.getPersonInfo()
+					
+					this.showMessageItem.listShareComment.unshift({
+						userName:user.name,
+						content:this.content,
+						userId:user.id
+					})
+					
+					//this.getNewsCommentsList(true)
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			showMessageBtn(item){
+				this.showMessage=true;
+				this.showMessageId=item.id;
+				this.showMessageItem=item
+				this.content=""
+			},
+			changeLikes(info) {
+				var userInfo = this.carhelp.getPersonInfo()
+				if (!userInfo) {
+					return
+				}
+			
+			
+				if (!info.isLike) {
+					uni.showLoading({
+						title: "加载中",
+						mask: true,
+					})
+			
+			
+					API.changeLikes({
+						shareId: info.id
+					}).then((res) => {
+						info.isLike = true;
+						info.likesNum++;
+						var user=this.carhelp.getPersonInfo()
+						
+						info.listShareLikes.unshift({
+							userName:user.name
+						})
+						uni.hideLoading();
+						//this.getInfo(true)
+					}).catch(error => {
+						uni.showToast({
+							title: error,
+							icon: "none"
+						})
+					})
+				} else {
+					uni.showToast({
+						title: "您已经点过赞了",
+						icon: "none"
+					})
+				}
+			
+			},
+			getInfo(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API.details({
+					id:this.id
+				}).then((res) => {
+					
+					uni.hideLoading();
+					 var item=res.data.share
+					 item.listShareLikes=res.data.likesList.data
+					 item.listShareComment=res.data.commentList.data
+					item.likesNum=res.data.likesList.data.length
+					item.commentNum=res.data.commentList.data.length
+					// var share=res.data.share;
+					// this.likesList=res.data.likesList;
+					// this.commentList=res.data.commentList;
+					 this.list=[item]
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.showMessage{
+		padding: 60rpx 50rpx ;
+		.showMessage2{
+			background-color: #E5E7EA;
+			margin: 40rpx 0;
+			textarea{
+				padding: 8rpx;
+				border-radius:34px;
+			}
+		}
+		
+	}
+	.messageListMain{
+		border-radius: 4px;
+		background-color: rgba(240, 240, 240, 1);
+	
+		color: #224466 ;
+		.mLikeList{
+			padding:16rpx;
+			border-bottom: 1px solid rgba(222, 222, 222, 1);
+		}
+		.messageList{
+			padding:16rpx;
+			.messageItem{
+				// display: flex;
+				// flex-wrap: wrap;
+				.mItemTitleColor{
+					color:#03a9f4;
+					margin-left: 8rpx;
+				}
+				.mItemBody{
+					color: #101010;
+
+				}
+			}
+			.messageItemEnd{
+				text-align: center;
+				    color: #9E9E9E;
+			}
+			
+		}
+	}
+	
+	
+	.red {
+		color: red !important;
+	}
+
+	.like {
+		margin-top: 16rpx;
+		line-height: 24px;
+		display: flex;
+		color:#224466 ;
+		.number {
+			margin-left: 16rpx;
+		}
+	}
+
+	page {
+		background-color: #fff;
+		padding-bottom: 100px;
+	}
+
+	.image {
+		padding: 0 32rpx;
+		margin: 24rpx 0;
+	}
+
+	.tabs {
+		background-color: rgba(255, 255, 255, 1);
+		padding: 0 32rpx;
+
+		/deep/.u-tab-item {
+			flex: none !important;
+			margin-right: 32rpx;
+		}
+
+		/deep/.u-tabs-scorll-flex {
+			justify-content: start;
+		}
+	}
+
+	// 分享内容
+	.share-content {
+		margin: 48rpx 32rpx 0 32rpx;
+
+		.item {
+			padding-bottom: 32rpx;
+			border-bottom: 1px solid rgba(232, 232, 232, 1);
+			margin-top: 48rpx;
+			font-family: 'Regular';
+
+			.infos {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				.person {
+					display: flex;
+					align-items: center;
+
+					.photo {
+						img {
+							width: 64rpx;
+							height: 64rpx;
+							border-radius: 50px;
+						}
+					}
+
+					.name {
+						color: rgba(51, 51, 51, 1);
+						font-size: 16px;
+						margin-left: 24rpx;
+						font-family: 'Medium';
+					}
+				}
+			}
+
+			.share-text {
+				margin-top: 24rpx;
+				color: #101010;
+				font-size: 16px;
+				line-height: 22px;
+			}
+
+			.pictures {
+				display: flex;
+				justify-content: start;
+				flex-wrap: wrap;
+				margin-top: 16rpx;
+
+				.videoplay {
+					height: 400rpx;
+				}
+
+				video {
+					width: 100%;
+
+					height: 200rpx;
+					border-radius: 16rpx;
+					margin-bottom: 16rpx;
+					margin-left: 16rpx;
+				}
+
+				.img {
+					width: 31%;
+					height: 216rpx;
+					border-radius: 16rpx;
+					margin-bottom: 16rpx;
+					margin-left: 16rpx;
+				}
+
+				img {
+					width: 31%;
+					height: 216rpx;
+					border-radius: 16rpx;
+					margin-bottom: 16rpx;
+					margin-left: 16rpx;
+				}
+			}
+
+			.video {
+				margin-top: 16rpx;
+
+				uni-video {
+					width: 100%;
+					height: 380rpx;
+					border-radius: 8px;
+				}
+			}
+
+			.tagMain {
+				display: flex;
+				justify-content: space-between;
+				.likeMain{
+					display: flex;
+				}
+				.tag {
+					margin-top: 16rpx;
+					line-height: 24px;
+
+					.symbol {
+						color: rgba(31, 74, 153, 100);
+						font-size: 16px
+					}
+
+					.text {
+						color: rgba(31, 74, 153, 1);
+						margin-left: 14rpx;
+					}
+				}
+			}
+
+		}
+
+	}
+
+	.item:last-of-type {
+		border: none;
+		margin-bottom: 26rpx;
+	}
+
+	.bottom {
+		z-index: 999;
+		background: linear-gradient(223.81deg, rgba(0, 90, 217, 1) 14.24%, rgba(0, 52, 148, 1) 86.67%);
+		width: 104rpx;
+		height: 104rpx;
+		border-radius: 50px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		position: fixed;
+		right: 72rpx;
+		bottom: 72rpx;
+
+		img {
+			width: 56rpx;
+			height: 56rpx;
+
+		}
+	}
+</style>