Преглед изворни кода

求购列表买家filter空值处理

yangc пре 7 година
родитељ
комит
e41851d988
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 2 2
      components/applyPurchase/ApplyInfo.vue
  2. 1 1
      nuxt.config.js

+ 2 - 2
components/applyPurchase/ApplyInfo.vue

@@ -159,10 +159,10 @@
         return str.substring(0, 3) + '****' + str.substring(7, 11)
       },
       enterpriseFilter (str) {
-        return str.length > 4 ? str.substring(0, 2) + '**' + str.substring(str.length - 2, str.length) : str
+        return str ? str.length > 4 ? str.substring(0, 2) + '**' + str.substring(str.length - 2, str.length) : str : '-'
       },
       userNameFilter (str) {
-        return str.substring(0, 1) + '**'
+        return str ? str.substring(0, 1) + '**' : '-'
       }
     },
     computed: {

+ 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://192.168.253.60:9090/platform-b2c/' : 'http://10.1.51.90:8080/platform-b2c/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://192.168.253.60:9090/platform-b2c/' : 'http://192.168.253.121:9090/platform-b2c/')
 const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftmall.com/' : 'http://218.17.158.219:24000/')
 
 module.exports = {