提交 28d2128976cb4a8e024cd164d7fa30703fdcf256

作者 wangyu
1 个父辈 824a8f79

优化 切换线上环境

... ... @@ -125,8 +125,8 @@ App({
125 125 // baseUrl: "http://47.96.75.229:20000/",
126 126 // baseUrl: "http://192.144.144.220:20000/",
127 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 130 OSSUrl: "",//"https://oss.workai.com.cn/",
131 131 userInfo: null,
132 132 hasLogin: false,
... ...
... ... @@ -176,11 +176,11 @@
176 176 <view wx:if="{{datas.owner_type=='个人'}}">
177 177 <view style='height:90rpx;width:100%;clear:both;'>
178 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 180 </view>
181 181 <view style='height:90rpx;width:100%;clear:both;'>
182 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 184 </view>
185 185 </view>
186 186 <view wx:if="{{datas.owner_type=='企业'}}">
... ...
... ... @@ -178,7 +178,7 @@ Page({
178 178 this.setData({
179 179 issinglechildData: issinglechild_Data,
180 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 182 input_disable: true
183 183 })
184 184 }
... ... @@ -328,6 +328,7 @@ Page({
328 328 return
329 329 }
330 330 if (this.data.issinglechildData.selected == "否") {
  331 + console.log("reduce_amount", this.data.reduce_amount)
331 332 if (this.data.shareMethodData.selected.length < 1) {
332 333 this.showToast("请选择分摊方式")
333 334 return
... ... @@ -336,7 +337,7 @@ Page({
336 337 this.showToast("请输入扣除金额")
337 338 return
338 339 }
339   - if (format.checkNumber(this.data.reduce_amount)){
  340 + if (!format.checkNumber(this.data.reduce_amount+"")){
340 341 this.showToast("请输入正确格式")
341 342 return
342 343 }
... ... @@ -569,20 +570,15 @@ Page({
569 570 },
570 571
571 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 576 this.showToast("请输入正确格式");
576 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 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 142
143 143 //验证字符串是否是数字
144 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 148 return true;
148 149 }
149 150 return false;
... ...
注册登录 后发表评论