he2802 3 năm trước cách đây
mục cha
commit
5657e3582a
2 tập tin đã thay đổi với 34 bổ sung9 xóa
  1. 25 1
      common/methodTool.js
  2. 9 8
      pages2/class/detail.vue

+ 25 - 1
common/methodTool.js

@@ -164,5 +164,29 @@ export default {
 	},
 	getZeroTime () {
 		return Number(new Date(new Date().toLocaleDateString()).getTime()/1000)
-	}
+	},
+	setClock:function(time){
+	            	var that=this, sec= parseInt(time) , clockCount={}, strTimer="";
+	            	    clockCount=setInterval(function(){
+	            	    	if(sec==0){
+			                        $(".js-count-down").html("活动已经结束");
+			                       clearInterval(clockCount);
+			                       return false;
+	                        }
+						    strTimer = that.secondToDate(sec);
+						    $(".js-count-down").html(strTimer);
+						    sec--;
+	                    },1000)
+	            },
+	secondToDate(result){
+	            	var h = Math.floor(result / 3600) < 10 ? '0'+Math.floor(result / 3600) : Math.floor(result / 3600);
+				    var m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60));
+				    var s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
+				        if(h==0){
+				        	result = m + ":" + s;
+				        }else{
+				        	result = h+':'+m + ":" + s
+				        }
+				    return result;
+	 }
 }

+ 9 - 8
pages2/class/detail.vue

@@ -77,17 +77,17 @@
 					<view class="noteBox" v-for="(item1, index1) in item.userNotes">
 						<view class="tBox">
 							<image src="/static/icon/note1.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
-							<view class="title leftPadding">施工承发包模式-施工合同与物资采购合同</view>
+							<view class="title leftPadding">{{item1.dateNote}}</view>
 						</view>
-						<view class="tBox2" v-if="false">
-							<view class="title" style="width: 39rpx;height: 39rpx;margin:0 29rpx;">00:20</view>
-							<view class="t2Content leftPadding">这是一段用户记录的笔记本文,当内容过长时 需要换行,完整显示文字内容。</view>
+						<view class="tBox2">
+							<view class="title" style="width: 39rpx;height: 39rpx;margin:0 29rpx;">{{$method.secondToDate(item1.noteSecond)}}</view>
+							<view class="t2Content leftPadding">fdgdfgd</view>
 						</view>
-						<view class="tBox" v-if="false">
+						<view class="tBox">
 							<image src="/static/icon/note2.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
-							<view class="title leftPadding">施工承发包模式-施工合同与物资采购合同</view>
+							<view class="title leftPadding">{{item1.sectionName}}</view>
 						</view>
-						<view style="margin-left: 97rpx;" class="t2Content leftPadding">这是一段用户记录的笔记本文,当内容过长时 需要换行,完整显示文字内容。</view>
+						<view style="margin-left: 97rpx;" class="t2Content leftPadding">{{item1.noteText}}</view>
 					</view>
 				</view>
 			</view>
@@ -99,7 +99,7 @@
 					</view>
 					<view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;" @click="postContent">提交</view>
 				</view>
-				<view v-for="(item, index) in answerList" style="background-color: #FFFFFF;">
+				<view v-for="(item, index) in answerList" style="background-color: #FFFFFF;margin-bottom: 20rpx;">
 					<view class="chat_box" @click.stop="clearCtx">
 						<view style="display: flex;" >
 							<view><image :src="$method.splitImgHost(item.avatar)" style="width: 64rpx;height: 64rpx;"></image></view>
@@ -770,6 +770,7 @@ page {
 	background: #ffffff;
 	border-radius: 16rpx;
 	padding: 10rpx;
+
 }
 .dateBox {
 	width: 216rpx;