Browse Source

绑定申请记录

yangc 8 years ago
parent
commit
fbad6a8979
2 changed files with 42 additions and 35 deletions
  1. 41 34
      components/personalMaterial/PersonalMaterial.vue
  2. 1 1
      nuxt.config.js

+ 41 - 34
components/personalMaterial/PersonalMaterial.vue

@@ -69,35 +69,11 @@
           <span>状态</span>
         </div>
         <ul>
-          <li>
-            <span>深圳市哟软商城科技有限公司</span>
-            <span>哈哈哈</span>
-            <span>2018-12-12 11:11:11</span>
-            <span class="green-text">待审核</span>
-          </li>
-          <li>
-            <span>深圳市哟软商城科技有限公司</span>
-            <span>哈哈哈</span>
-            <span>2018-12-12 11:11:11</span>
-            <span class="red-text">未通过</span>
-          </li>
-          <li>
-            <span>深圳市哟软商城科技有限公司</span>
-            <span>哈哈哈</span>
-            <span>2018-12-12 11:11:11</span>
-            <span>已通过</span>
-          </li>
-          <li>
-            <span>深圳市哟软商城科技有限公司</span>
-            <span>哈哈哈</span>
-            <span>2018-12-12 11:11:11</span>
-            <span>已通过</span>
-          </li>
-          <li>
-            <span>深圳市哟软商城科技有限公司</span>
-            <span>哈哈哈</span>
-            <span>2018-12-12 11:11:11</span>
-            <span>已通过</span>
+          <li v-for="item in applyList">
+            <span>{{item.enName}}</span>
+            <span>{{item.adminName}}</span>
+            <span>{{item.date | date}}</span>
+            <span :class="{'green-text': item.status == 311, 'red-text': item.status == 317}">{{item.status | status}}</span>
           </li>
         </ul>
       </div>
@@ -115,7 +91,8 @@
         keyword: '',
         enName: '',
         enInfo: {},
-        timer: 5
+        timer: 5,
+        applyList: []
       }
     },
     computed: {
@@ -123,6 +100,31 @@
         return this.$store.state.option.user
       }
     },
+    filters: {
+      date: function (input) {
+        const d = new Date(input)
+        const year = d.getFullYear()
+        const monthTemp = d.getMonth() + 1
+        const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
+        const hour = d.getHours() < 10 ? '0' + d.getHours() : '' + d.getHours()
+        const minutes = d.getMinutes() < 10 ? '0' + d.getMinutes() : '' + d.getMinutes()
+        const seconds = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds()
+        const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate()
+        return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
+      },
+      status: function (status) {
+        switch (status) {
+          case 311:
+            return '待审核'
+          case 316:
+            return '已通过'
+          case 317:
+            return '未通过'
+          default:
+            break
+        }
+      }
+    },
     methods: {
       goLastPage: function () {
         window.history.back(-1)
@@ -130,7 +132,6 @@
       onSearchEnterprise: function () {
         if (this.keyword) {
           this.$http.get('/basic/enterprise/findByName/' + encodeURIComponent(this.keyword)).then(response => {
-            console.log(response.data)
             if (response.data) {
               this.enInfo = response.data
               this.showSearchResultStatus = 1
@@ -169,10 +170,16 @@
       setShowApplyRecord: function (flag) {
         if (flag) {
           this.$http.get('/basic/enterprise/findApplyInfo', {params: {phone: this.user.data.userTel}})
-            .then(response => {
+            .then(responses => {
+              this.applyList = responses.data
+              this.showApplyRecord = flag
+            }, err => {
+              console.log(err)
+              this.$message.error('系统错误')
             })
+        } else {
+          this.showApplyRecord = flag
         }
-        this.showApplyRecord = flag
       }
     }
   }
@@ -376,7 +383,7 @@
                 width: 124px;
                 height: 32px;
                 color: #fff;
-                font-size: 16px;
+                font-size: 14px;
                 text-align: center;
                 line-height: 32px;
                 background: #ff8522;

+ 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.90:8080/platform-b2c/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://10.10.100.107:8081/platform-b2c/' : 'http://10.1.51.95:8080/platform-b2c/')
 
 module.exports = {
   router: {