|
|
@@ -14,6 +14,7 @@ Page({ |
|
|
|
endTime: "", |
|
|
|
mallTenantId: "", |
|
|
|
pickedAddress: "请选择地址", |
|
|
|
isDetail: false, |
|
|
|
pickedAddressDetail: "", |
|
|
|
pickedDate: "请选择日期", |
|
|
|
pickedStartTime: "请选择", |
|
|
@@ -244,10 +245,28 @@ Page({ |
|
|
|
success: function (res) { |
|
|
|
that.setData({ |
|
|
|
pickedAddress: res.address, |
|
|
|
isDetail: true |
|
|
|
}) |
|
|
|
}, |
|
|
|
fail: function (error) { |
|
|
|
console.log(error) |
|
|
|
that.setData({ |
|
|
|
isDetail: true |
|
|
|
}) |
|
|
|
tt.showToast({ |
|
|
|
title: '请点击右上角:更多-权限设置-开启地理位置授权', |
|
|
|
icon: 'none', |
|
|
|
duration: 4000, |
|
|
|
success: () => { |
|
|
|
setTimeout(() => { |
|
|
|
tt.showToast({ |
|
|
|
title: '或直接填写详细地址', |
|
|
|
icon: 'none', |
|
|
|
duration: 3000, |
|
|
|
}); |
|
|
|
}, 4000); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
complete: function (data) {} |
|
|
|
}) |
|
|
@@ -296,9 +315,9 @@ Page({ |
|
|
|
confirm() { |
|
|
|
const tempData = this.data |
|
|
|
|
|
|
|
if (tempData.pickedAddress == '请选择地址') { |
|
|
|
if (tempData.pickedAddress == '请选择地址' && !tempData.pickedAddressDetail) { |
|
|
|
tt.showToast({ |
|
|
|
title: '请选择地址!', |
|
|
|
title: '请选择或填写地址!', |
|
|
|
icon: 'fail' |
|
|
|
}); |
|
|
|
return |
|
|
@@ -445,6 +464,7 @@ Page({ |
|
|
|
that.setData({ |
|
|
|
pickedAddress: res.data.userAddress || '请选择地址', |
|
|
|
pickedAddressDetail: res.data.detailedAddress, |
|
|
|
isDetail: true, |
|
|
|
pickedDate: util.timestampToTime(res.data.startDate, 'YYYY-MM-DD') || '请选择日期', |
|
|
|
pickedStartTime: util.timestampToTime(res.data.startDate, 'hh:mm') || '请选择', |
|
|
|
pickedEndTime: util.timestampToTime(res.data.endDate, 'hh:mm') || '请选择', |
|
|
|