提交 886f48c67022595a062268882dbcc6f5a3368798

作者 wangyu
1 个父辈 d28925d5

优化

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