yangc 7 лет назад
Родитель
Сommit
b5273be7c5

+ 25 - 5
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" @change="deadlineChange">
+          <input type="date" v-model="applyObj.deadline" @blur="deadlineChange">
         </div>
         <div class="content-line">
           <span>币种:</span>
@@ -112,6 +112,17 @@
         return this.$store.state.option.user
       }
     },
+    watch: {
+      showSayPriceBox: function (val, old) {
+        if (val) {
+          document.body.style.position = 'fixed'
+          document.body.style.left = '0'
+          document.body.style.right = '0'
+        } else {
+          document.body.style.position = 'unset'
+        }
+      }
+    },
     methods: {
       cancel: function () {
         this.$emit('cancelAction')
@@ -189,7 +200,7 @@
       },
       isValidDate: function (date) {
         let now = new Date().getTime()
-        let time = new Date(formatDate(date, 'yyyy-MM-dd hh:mm:ss')).getTime()
+        let time = new Date(date).getTime()
         return !time || (time >= now && time <= now + 1000 * 60 * 60 * 24 * 91)
       },
       deadlineChange: function () {
@@ -283,6 +294,15 @@
 <style lang="scss" scoped>
   .mobile-modal {
     .mobile-modal-box {
+      position: fixed;
+      width: 5.92rem;
+      font-size: .28rem;
+      top: 50%;
+      left: 50%;
+      right: 11%;
+      z-index: 1000;
+      margin-top: -3.7rem;
+      margin-left: -2.96rem;
       .publish-seek {
         background: #fff;
         padding-top: .1rem;
@@ -293,12 +313,12 @@
           font-size: .26rem;
           text-align: left;
           border-bottom: .02rem solid #b7d5fe;
-          position: relative;
           input {
             width: 3.49rem;
             height: .52rem;
-            line-height: .52rem;
-            padding-left: .19rem;
+            line-height: normal;
+            padding: .1rem .19rem;
+            /*padding-left: .19rem;*/
             border: .02rem solid #7e7e7e;
             font-size: .26rem;
             vertical-align: middle;

+ 13 - 1
components/mobile/applyPurchase/SayPrice.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="mobile-modal">
+  <div class="mobile-modal" v-if="showSayPriceBox">
     <div class="mobile-modal-box">
       <div class="mobile-modal-header">编辑报价<i class="icon-guanbi iconfont" @click="cancel"></i></div>
       <div class="say-price">
@@ -80,9 +80,21 @@
         timeoutCount: 0
       }
     },
+    props: ['showSayPriceBox'],
     components: {
       RemindBox
     },
+    watch: {
+      showSayPriceBox: function (val, old) {
+        if (val) {
+          document.body.style.position = 'fixed'
+          document.body.style.left = '0'
+          document.body.style.right = '0'
+        } else {
+          document.body.style.position = 'unset'
+        }
+      }
+    },
     mounted () {
       this.$nextTick(() => {
         document.addEventListener('click', this.checkCurrencySelect)

+ 1 - 1
components/mobile/applyPurchase/SeekList.vue

@@ -42,7 +42,7 @@
       <p v-text="'抱歉,暂无求购信息'"></p>
     </div>
     <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox"></login-box>
-    <say-price v-if="showSayPriceBox" @cancelSayPriceAction="onSayPriceCancel"></say-price>
+    <say-price :showSayPriceBox="showSayPriceBox" @cancelSayPriceAction="onSayPriceCancel"></say-price>
     <say-price-info v-if="showSayPriceInfoBox" :agreed="agreed" @cancelSayPriceInfoAction="onSayPriceInfoCancel"></say-price-info>
     <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
   </div>