|
@@ -16,10 +16,21 @@ Component({
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ choosePhoneContact() {
|
|
|
+ my.choosePhoneContact({
|
|
|
+ success: ({ mobile }) => {
|
|
|
+ this.setData({
|
|
|
+ phone: mobile.replace(/(\s|-|\+)/g, ""),
|
|
|
+ });
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
async onSave() {
|
|
|
const {
|
|
|
query = {
|
|
|
- id: "", relationShip: "",
|
|
|
+ id: "",
|
|
|
+ relationShip: "",
|
|
|
},
|
|
|
} = this.$page.data;
|
|
|
const phoneNumber = this.data.phone;
|
|
@@ -27,7 +38,7 @@ Component({
|
|
|
if (/^[1]([3-9])[0-9]{9}$/.test(phoneNumber)) {
|
|
|
patientUpdate({
|
|
|
id: query.id,
|
|
|
- // relationShip: query.relationShip,
|
|
|
+ // relationShip: query.relationShip,
|
|
|
phoneNumber: await getEncryptStr(this.data.phone),
|
|
|
}).then(() => {
|
|
|
EventHub.dispatchEvent("onPatienDetailUpdate", true);
|