diff --git a/ext.json b/ext.json index e765f19..d461a44 100644 --- a/ext.json +++ b/ext.json @@ -1,17 +1,17 @@ { "ext": { "attr": { - "configUrl": "https://ctest.malls.iformall.com/C/api" + "configUrl": "https://c.malls.iformall.com/C/api" }, - "name": "富茂家政", - "weappId": "tt90b5e6080f896bde01" + "name": "YOU家政保洁家电清洗", + "weappId": "tt2dc35b7eb2ffca5501" }, "window": { "backgroundTextStyle": "light", "navigationBarTextStyle": "black", "navigationBarBackgroundColor": "#fff" }, - "extAppid": "tt90b5e6080f896bde01", + "extAppid": "tt2dc35b7eb2ffca5501", "extEnable": true, "directCommit": false, "networkTimeout": { diff --git a/pages2/appointment/appointment.js b/pages2/appointment/appointment.js index b2a8c8c..ee9d924 100644 --- a/pages2/appointment/appointment.js +++ b/pages2/appointment/appointment.js @@ -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') || '请选择', diff --git a/pages2/appointment/appointment.ttml b/pages2/appointment/appointment.ttml index a575910..44a478d 100644 --- a/pages2/appointment/appointment.ttml +++ b/pages2/appointment/appointment.ttml @@ -14,7 +14,7 @@ - +