Browse Source

报价loading

yangc 8 years ago
parent
commit
420d4854f2

+ 9 - 2
components/applyPurchase/ApplyInfo.vue

@@ -88,6 +88,7 @@
     </div>
     <page :total="totalCount" :page-size="pageSize"
           :current="nowPage" v-on:childEvent="listenPage"></page>
+    <loading v-if="showLoading"></loading>
   </div>
 </template>
 <script>
@@ -103,6 +104,7 @@
     return len
   }
   import Page from '~components/common/page/pageComponent.vue'
+  import Loading from '~components/common/loading/PageLoading.vue'
   export default {
     data () {
       return {
@@ -122,11 +124,13 @@
           maxDay: false
         },
         keyWord: '',
-        sorting: {}
+        sorting: {},
+        showLoading: false
       }
     },
     components: {
-      Page
+      Page,
+      Loading
     },
     filters: {
       date: function (date) {
@@ -182,6 +186,7 @@
       commitSayPrice: function (purchaseMan) {
         if (this.user.logged) {
           if (this.checkAllSayPrice()) {
+            this.showLoading = true
             this.sayPriceObj.spId = purchaseMan.id
             this.sayPriceObj.currency = purchaseMan.currency || this.sayPriceObj.currency
             this.$http.post('/seek/offer/saveOffer', this.sayPriceObj).then(response => {
@@ -193,9 +198,11 @@
               } else {
                 this.$message.error(response.data.message)
               }
+              this.showLoading = false
             }, error => {
               console.log(error)
               this.$message.error('系统错误')
+              this.showLoading = false
             })
           } else {
             if (!this.validSayPrice.unitPrice) {

+ 21 - 0
components/common/loading/PageLoading.vue

@@ -0,0 +1,21 @@
+<template>
+  <div class="loading">
+    <img src="/images/all/loading.gif" alt="">
+  </div>
+</template>
+<style scoped>
+  .loading {
+    position: fixed;
+    top: 0;
+    left: 0;
+    right: 0;
+    width:  100%;
+    height: 100%;
+    z-index: 1000;
+    text-align: center;
+  }
+  .loading img {
+    position: relative;
+    top: 40%;
+  }
+</style>

+ 1 - 1
nuxt.config.js

@@ -1,6 +1,6 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://10.10.100.107:8081/platform-b2c/' : 'http://10.1.51.88:8080/platform-b2c/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://10.10.100.107:8081/platform-b2c/' : 'http://10.1.51.90:8080/platform-b2c/')
 
 module.exports = {
   router: {