提交 dff3f9d32e10c688fdbdd34088fe1bd69cd238b1

作者 wangyu
2 个父辈 ee048cdc 28d21289

Merge branch 'dev_wy' into dev2.0

@@ -125,8 +125,8 @@ App({ @@ -125,8 +125,8 @@ App({
125 // baseUrl: "http://47.96.75.229:20000/", 125 // baseUrl: "http://47.96.75.229:20000/",
126 // baseUrl: "http://192.144.144.220:20000/", 126 // baseUrl: "http://192.144.144.220:20000/",
127 // baseUrl: "http://154.8.229.55:20000/", 127 // baseUrl: "http://154.8.229.55:20000/",
128 - baseUrl: "http://47.110.158.110:20000/",  
129 - // baseUrl: "https://api.workai.com.cn/", 128 + // baseUrl: "http://47.110.158.110:20000/",
  129 + baseUrl: "https://api.workai.com.cn/",
130 OSSUrl: "",//"https://oss.workai.com.cn/", 130 OSSUrl: "",//"https://oss.workai.com.cn/",
131 userInfo: null, 131 userInfo: null,
132 hasLogin: false, 132 hasLogin: false,
@@ -176,11 +176,11 @@ @@ -176,11 +176,11 @@
176 <view wx:if="{{datas.owner_type=='个人'}}"> 176 <view wx:if="{{datas.owner_type=='个人'}}">
177 <view style='height:90rpx;width:100%;clear:both;'> 177 <view style='height:90rpx;width:100%;clear:both;'>
178 <text class='text_left'>证照类型</text> 178 <text class='text_left'>证照类型</text>
179 - <text class='text_right_333'>{{datas.owner_id_cartd_type=='1'?"居民身份证":datas.owner_id_cartd_type}}</text> 179 + <text class='text_right_333'>{{datas.owner_id_card_type=='1'?"居民身份证":datas.owner_id_cartd_type}}</text>
180 </view> 180 </view>
181 <view style='height:90rpx;width:100%;clear:both;'> 181 <view style='height:90rpx;width:100%;clear:both;'>
182 <text class='text_left'>证照号码</text> 182 <text class='text_left'>证照号码</text>
183 - <text class='text_right_333'>{{datas.owner_id_cartd_no}}</text> 183 + <text class='text_right_333'>{{datas.owner_id_card_no}}</text>
184 </view> 184 </view>
185 </view> 185 </view>
186 <view wx:if="{{datas.owner_type=='企业'}}"> 186 <view wx:if="{{datas.owner_type=='企业'}}">
@@ -178,7 +178,7 @@ Page({ @@ -178,7 +178,7 @@ Page({
178 this.setData({ 178 this.setData({
179 issinglechildData: issinglechild_Data, 179 issinglechildData: issinglechild_Data,
180 shareMethodData: shareMethod_Data, 180 shareMethodData: shareMethod_Data,
181 - reduce_amount: data.month_deduction_amount ? data.month_deduction_amount : that.data.reduce_amount, 181 + reduce_amount: data.month_deduction_amount ? data.month_deduction_amount : 0,
182 input_disable: true 182 input_disable: true
183 }) 183 })
184 } 184 }
@@ -328,6 +328,7 @@ Page({ @@ -328,6 +328,7 @@ Page({
328 return 328 return
329 } 329 }
330 if (this.data.issinglechildData.selected == "否") { 330 if (this.data.issinglechildData.selected == "否") {
  331 + console.log("reduce_amount", this.data.reduce_amount)
331 if (this.data.shareMethodData.selected.length < 1) { 332 if (this.data.shareMethodData.selected.length < 1) {
332 this.showToast("请选择分摊方式") 333 this.showToast("请选择分摊方式")
333 return 334 return
@@ -336,7 +337,7 @@ Page({ @@ -336,7 +337,7 @@ Page({
336 this.showToast("请输入扣除金额") 337 this.showToast("请输入扣除金额")
337 return 338 return
338 } 339 }
339 - if (format.checkNumber(this.data.reduce_amount)){ 340 + if (!format.checkNumber(this.data.reduce_amount+"")){
340 this.showToast("请输入正确格式") 341 this.showToast("请输入正确格式")
341 return 342 return
342 } 343 }
@@ -569,20 +570,15 @@ Page({ @@ -569,20 +570,15 @@ Page({
569 }, 570 },
570 571
571 bindinput: function(e) { 572 bindinput: function(e) {
572 - console.log("bindinput", e)  
573 - var inputamount  
574 - if (!e.detail.value || e.detail.value.length < 1 || parseFloat(e.detail.value).toString() == "NaN") { 573 +
  574 + var inputamount = e.detail.value
  575 + if (inputamount.length < 1 || !format.checkNumber(inputamount)) {
575 this.showToast("请输入正确格式"); 576 this.showToast("请输入正确格式");
576 return; 577 return;
577 } 578 }
578 -  
579 - if (e.detail.value.length < 1 || !format.checkNumber(e.detail.value)) {  
580 - this.showToast("请输入正确格式");  
581 - return;  
582 - }  
583 - 579 + console.log("bindinput", inputamount)
584 this.setData({ 580 this.setData({
585 - reduce_amount: inputamount 581 + reduce_amount: parseFloat(inputamount)
586 }) 582 })
587 }, 583 },
588 584
@@ -142,8 +142,9 @@ function isMobile(mobile) { @@ -142,8 +142,9 @@ function isMobile(mobile) {
142 142
143 //验证字符串是否是数字 143 //验证字符串是否是数字
144 function checkNumber(theObj) { 144 function checkNumber(theObj) {
145 - var reg = /^[0-9]+.?[0-9]*$/;  
146 - if (reg.test(theObj)) { 145 + var reg01 = /^[0-9]+.?[0-9]*$/;
  146 + var reg02 = /^[0-9]+$/;
  147 + if (reg01.test(theObj) || reg02.test(theObj)) {
147 return true; 148 return true;
148 } 149 }
149 return false; 150 return false;
注册登录 后发表评论