提交 886f48c67022595a062268882dbcc6f5a3368798

作者 wangyu
1 个父辈 d28925d5

优化

... ... @@ -34,7 +34,7 @@
34 34
35 35 .text_black_28 {
36 36 font-family: PingFangSC-Regular;
37   - font-size: 28rpx;
  37 + font-size: 26rpx;
38 38 color: #000;
39 39 line-height: 80rpx;
40 40 }
... ...
... ... @@ -23,6 +23,7 @@ Page({
23 23 birthday: '',
24 24 idInfoData: '',
25 25 id_error: false,
  26 + has_certify:false,
26 27 curAddress_haschanged: false,
27 28 birthAddress_haschanged: false,
28 29 contactAddress_haschanged: false,
... ... @@ -305,15 +306,17 @@ Page({
305 306 if (tax_info.birth_date == -62135596800 || tax_info.birth_date == 0) {
306 307 this.data.birthDate.selected = ''
307 308 } else {
308   - this.data.birthDate.selected = format.yearFormString(tax_info.birth_date) + '-' + format.monthFormString(tax_info.birth_date) + '-' + format.dayFormString(tax_info.birth_date)
  309 + // this.data.birthDate.selected = format.yearFormString(tax_info.birth_date) + '-' + format.monthFormString(tax_info.birth_date) + '-' + format.dayFormString(tax_info.birth_date)
  310 + this.data.birthDate.selected = format.formatTime_date(tax_info.birth_date)
309 311 }
310 312
311 313 console.log('this.data.birthDate', new Date(tax_info.birth_date).toLocaleDateString())
312 314 if (tax_info.join_date > 1000) {
313   - this.data.startDate.selected = format.yearFormString(tax_info.join_date) + '-' + format.monthFormString(tax_info.join_date) + '-' + format.dayFormString(tax_info.join_date)
  315 + // this.data.startDate.selected = format.yearFormString(tax_info.join_date) + '-' + format.monthFormString(tax_info.join_date) + '-' + format.dayFormString(tax_info.join_date)
  316 + this.data.startDate.selected = format.formatTime_date(tax_info.join_date)
314 317 }
315 318 if (tax_info.separate_date > 1000) {
316   - this.data.endDate.selected = format.yearFormString(tax_info.separate_date) + '-' + format.monthFormString(tax_info.separate_date) + '-' + format.dayFormString(tax_info.separate_date)
  319 + this.data.endDate.selected = format.formatTime_date(tax_info.separate_date)
317 320 }
318 321
319 322 this.data.professionData.selected = tax_info.profession.three_level_name
... ... @@ -536,6 +539,7 @@ Page({
536 539 return
537 540 }
538 541 that.setData({
  542 + has_certify:true,
539 543 idInfoData: id_info,
540 544 name: id_info.name,
541 545 birthday: birth_day,
... ... @@ -919,8 +923,8 @@ Page({
919 923 "email": formdata.email.length > 0 ? formdata.email : that.data.taxInfo.email,
920 924 "bank": that.data.bankInfo.selected,
921 925 "bank_account": formdata.bank_account.length > 0 ? formdata.bank_account : that.data.taxInfo.bank_account,
922   - "join_date": that.data.startDate.selected.length > 0 ? Date.parse(new Date(that.data.startDate.selected)) / 1000 : 0,
923   - "separate_date": that.data.endDate.selected.length > 0 ? Date.parse(new Date(that.data.endDate.selected)) / 1000 : 0,
  926 + "join_date": that.data.startDate.selected.length > 0 ? Date.parse(new Date(that.data.startDate.selected)) / 1000 : this.data.taxInfo.join_date,
  927 + "separate_date": that.data.endDate.selected.length > 0 ? Date.parse(new Date(that.data.endDate.selected)) / 1000 : this.data.taxInfo.separate_date,
924 928 "is_employee": that.data.employeeInfo.selected,
925 929 "is_specific_profession": that.data.specificIndustryInfo.selected,
926 930 "is_investor": that.data.investInfo.selected,
... ... @@ -1033,8 +1037,9 @@ Page({
1033 1037 var cardtype = this.data.cardtypeData.selected;
1034 1038 var card_no = formdata.id_card_no ? formdata.id_card_no : this.data.card_number;
1035 1039 var gender = this.data.genderData.selected;
1036   - var birth_day = this.data.birthDate.selected;
1037   - if (name == iddata.name && cardtype == '居民身份证' && card_no == iddata.id_card_number && gender == iddata.gender && birth_day == this.data.birthday) {
  1040 + var long_birth_date = Date.parse(new Date(this.data.birthDate.selected)) / 1000;
  1041 + console.log("birth_day", long_birth_date + "---" + this.data.long_birth_date)
  1042 + if (this.data.taxInfo.certification_status == 'active'||(this.data.has_certify&&name == iddata.name && cardtype == '居民身份证' && card_no == iddata.id_card_number && gender == iddata.gender && long_birth_date == this.data.long_birth_date)) {
1038 1043 return 'active'
1039 1044 } else {
1040 1045 return ''
... ...
... ... @@ -71,7 +71,7 @@
71 71
72 72 .text_666_28 {
73 73 font-family: PingFangSC-Regular;
74   - font-size: 28rpx;
  74 + font-size: 26rpx;
75 75 color: #666;
76 76 text-align: right;
77 77 line-height: 80rpx;
... ...
... ... @@ -10,6 +10,13 @@ function formatTime(date) {
10 10 return [year, month, day].map(formatNumber).join('-') + ' ' + [hour, minute].map(formatNumber).join(':')
11 11 }
12 12
  13 +function formatTime_date(date) {
  14 + var year = yearFormString(date)
  15 + var month = monthFormString(date)
  16 + var day = dayFormString(date)
  17 + return [year, month, day].map(formatNumber).join('-')
  18 +}
  19 +
13 20 function formatNumber(n) {
14 21 n = n.toString()
15 22 return n[1] ? n : '0' + n
... ... @@ -89,6 +96,7 @@ function isIDCardNum(idCardNo) {
89 96
90 97 module.exports = {
91 98 formatTime: formatTime,
  99 + formatTime_date: formatTime_date,
92 100 formatDateString: formatDateString,
93 101 yearFormString: yearFormString,
94 102 monthFormString: monthFormString,
... ...
注册登录 后发表评论