Browse Source

Merge branch 'master' into feature/add-subscribe

# Conflicts:
#	dist/index.html
duanxiaoduan 1 year ago
parent
commit
b45c2a7a92
3 changed files with 14 additions and 11 deletions
  1. 2 2
      .env.development
  2. 0 0
      dist/index.html
  3. 12 9
      src/views/custom/subscribe/index.vue

+ 2 - 2
.env.development

@@ -6,9 +6,9 @@ ENV = 'development'
 # 线上正式地址
 #  VUE_APP_BASE_API = 'http://eam.modernfarming.cn:8000/'
 # 白少后台本地
-VUE_APP_BASE_API = 'http://192.168.1.77:8082/'
+# VUE_APP_BASE_API = 'http://192.168.1.77:8082/'
 # 线上测试
-# VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
+VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
 # VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
 # VUE_APP_BASE_API = 'http://127.0.0.1:8082/'
 

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


+ 12 - 9
src/views/custom/subscribe/index.vue

@@ -1289,12 +1289,13 @@ export default {
               return false
             } else {
               if (parseFloat(this.listAdd[j].price) == 0) {
-                this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                 return false
               } else {
-                var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
                 if (rulesPrice.test(this.listAdd[j].price) == false) {
-                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                   return false
                 }
               }
@@ -1566,12 +1567,13 @@ export default {
               return false
             } else {
               if (parseFloat(this.listAdd[j].price) == 0) {
-                this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                 return false
               } else {
-                var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
                 if (rulesPrice.test(this.listAdd[j].price) == false) {
-                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                  this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                   return false
                 }
               }
@@ -2173,12 +2175,13 @@ export default {
                 return false
               } else {
                 if (parseFloat(this.listAdd[j].price) == 0) {
-                  this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                  this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                   return false
                 } else {
-                  var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                  // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
+                  var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
                   if (rulesPrice.test(this.listAdd[j].price) == false) {
-                    this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
+                    this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后位', duration: 2000 })
                     return false
                   }
                 }

Some files were not shown because too many files changed in this diff