Browse Source

发布求购限制时间

yangc 7 years ago
parent
commit
397dca4aa4
2 changed files with 12 additions and 2 deletions
  1. 11 1
      components/mobile/applyPurchase/PublishSeek.vue
  2. 1 1
      nuxt.config.js

+ 11 - 1
components/mobile/applyPurchase/PublishSeek.vue

@@ -13,7 +13,7 @@
         </div>
         <div class="content-line">
           <span><i>*</i>截止日期:</span>
-          <input type="date" v-model="applyObj.deadline" @blur="deadlineChange">
+          <input type="date" v-model="applyObj.deadline" :min="getMin()" :max="getMax()" @blur="deadlineChange">
         </div>
         <div class="content-line">
           <span>币种:</span>
@@ -287,6 +287,16 @@
         } else if (this.applyObj.amount.length > 9) {
           this.applyObj.amount = cutOutString(this.applyObj.amount, 9)
         }
+      },
+      getMin: function () {
+        return formatDate(new Date(), 'yyyy-MM-dd')
+      },
+      getMax: function () {
+        let deadDate = new Date()
+        deadDate.setMonth(deadDate.getMonth() + 3)
+        deadDate.setDate(deadDate.getDate() + 1)
+        deadDate = formatDate(deadDate, 'yyyy-MM-dd')
+        return deadDate
       }
     }
   }

+ 1 - 1
nuxt.config.js

@@ -1,7 +1,7 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
 const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://192.168.253.121:9090/platform-b2c/' : 'http://192.168.253.121:9090/platform-b2c/')
-const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftmall.com/' : 'http://10.1.51.88:7070/')
+const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftmall.com/' : 'http://218.17.158.219:24000/')
 
 module.exports = {
   router: {