diff --git a/packageA/pages/profile/profile.js b/packageA/pages/profile/profile.js
index 5747b04..a7dc0c7 100644
--- a/packageA/pages/profile/profile.js
+++ b/packageA/pages/profile/profile.js
@@ -78,6 +78,7 @@ Page({
lon: null, //经度
loading: 0,
oldBirtthDayLength:0, //生日日期个数
+ oldbirthday:'',//生日日期
},
//通过路径跳转到其他页面
goto: function (e) {
@@ -1147,6 +1148,10 @@ Page({
console.log("获取生日222222222");
console.log(e);
let b = this.getInput(e);
+ let reg=/^[0-9\-]*$/
+ if (!(reg.test(b))){
+ return this.data.oldbirthday
+ }
let length = b.length;
let oldBirtthDayLength=this.data.oldBirtthDayLength
if (length > oldBirtthDayLength) {
@@ -1164,6 +1169,7 @@ Page({
this.setData({
datet: b,
oldBirtthDayLength:length,
+ oldbirthday:b
});
},
//获取生日
diff --git a/packageA/pages/profile/profile.wxml b/packageA/pages/profile/profile.wxml
index 9277f88..8e453f8 100644
--- a/packageA/pages/profile/profile.wxml
+++ b/packageA/pages/profile/profile.wxml
@@ -91,7 +91,7 @@
出生日期:
-
+