Browse Source

地址文件替换,首页求购时间判断修改

yangc 7 years ago
parent
commit
52406a1ea7

+ 0 - 3
components/applyPurchase/ApplyInfo.vue

@@ -227,9 +227,6 @@ export default {
         _this.$message.error('浏览器不支持自动复制,请手动复制')
         _this.clipboard.destroy()
       })
-      document.addEventListener('click', function() {
-        // _this.showShare = false
-      })
     },
     loadQRcode: function(id, index) {
       let canvas = document.getElementsByClassName('qrccode-canvas_' + index)[0]

+ 4 - 3
components/home/floor/FloorList.vue

@@ -20,7 +20,7 @@
                   <span>操作</span>
                 </div>
                 <ul>
-                  <li v-for="(purchaseMan, index) in purchaseManList.content" :style="'top: -' + 32 * timerIndex + 'px'">
+                  <li v-for="(purchaseMan, index) in purchaseManList.content" v-if="index < 5" :style="'top: -' + 32 * timerIndex + 'px'">
                     <div>{{purchaseMan.date | date}}</div>
                     <div>
                       <span :title="user.logged ? purchaseMan.inquiry.enterprise.enName : null" v-if="purchaseMan.inquiry && purchaseMan.inquiry.enterprise && purchaseMan.inquiry.enterprise.enName">{{[purchaseMan.inquiry.enterprise.enName, user] | enterpriseFilter}}</span>
@@ -60,6 +60,7 @@
   import Floor from './Floor.vue'
   import FloorBar from './FloorBar.vue'
   import SayPrice from '~components/applyPurchase/SayPrice.vue'
+  import { formatDate } from '~utils/baseUtils'
   export default {
     name: 'floor-list',
     components: {
@@ -117,8 +118,8 @@
 //    },
     filters: {
       date: function (date) {
-        const now = new Date().getDate()
-        const day = (new Date(date).getDate() - now)
+        const now = formatDate('yyyy-MM-dd', Date.now())
+        const day = Math.floor((now - date) / (1000 * 60 * 60 * 24))
         return day <= 0 ? '今天' : day + '天前'
       },
       enterpriseFilter ([str, user]) {

File diff suppressed because it is too large
+ 0 - 0
static/data/city.json


Some files were not shown because too many files changed in this diff