Browse Source

upload

product
HolyKnightIX 1 year ago
parent
commit
f89cd54088
3 changed files with 27 additions and 7 deletions
  1. +4
    -4
      ext.json
  2. +22
    -2
      pages2/appointment/appointment.js
  3. +1
    -1
      pages2/appointment/appointment.ttml

+ 4
- 4
ext.json View File

@@ -1,17 +1,17 @@
{ {
"ext": { "ext": {
"attr": { "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": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#fff" "navigationBarBackgroundColor": "#fff"
}, },
"extAppid": "tt90b5e6080f896bde01",
"extAppid": "tt2dc35b7eb2ffca5501",
"extEnable": true, "extEnable": true,
"directCommit": false, "directCommit": false,
"networkTimeout": { "networkTimeout": {


+ 22
- 2
pages2/appointment/appointment.js View File

@@ -14,6 +14,7 @@ Page({
endTime: "", endTime: "",
mallTenantId: "", mallTenantId: "",
pickedAddress: "请选择地址", pickedAddress: "请选择地址",
isDetail: false,
pickedAddressDetail: "", pickedAddressDetail: "",
pickedDate: "请选择日期", pickedDate: "请选择日期",
pickedStartTime: "请选择", pickedStartTime: "请选择",
@@ -244,10 +245,28 @@ Page({
success: function (res) { success: function (res) {
that.setData({ that.setData({
pickedAddress: res.address, pickedAddress: res.address,
isDetail: true
}) })
}, },
fail: function (error) { fail: function (error) {
console.log(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) {} complete: function (data) {}
}) })
@@ -296,9 +315,9 @@ Page({
confirm() { confirm() {
const tempData = this.data const tempData = this.data


if (tempData.pickedAddress == '请选择地址') {
if (tempData.pickedAddress == '请选择地址' && !tempData.pickedAddressDetail) {
tt.showToast({ tt.showToast({
title: '请选择地址!',
title: '请选择或填写地址!',
icon: 'fail' icon: 'fail'
}); });
return return
@@ -445,6 +464,7 @@ Page({
that.setData({ that.setData({
pickedAddress: res.data.userAddress || '请选择地址', pickedAddress: res.data.userAddress || '请选择地址',
pickedAddressDetail: res.data.detailedAddress, pickedAddressDetail: res.data.detailedAddress,
isDetail: true,
pickedDate: util.timestampToTime(res.data.startDate, 'YYYY-MM-DD') || '请选择日期', pickedDate: util.timestampToTime(res.data.startDate, 'YYYY-MM-DD') || '请选择日期',
pickedStartTime: util.timestampToTime(res.data.startDate, 'hh:mm') || '请选择', pickedStartTime: util.timestampToTime(res.data.startDate, 'hh:mm') || '请选择',
pickedEndTime: util.timestampToTime(res.data.endDate, 'hh:mm') || '请选择', pickedEndTime: util.timestampToTime(res.data.endDate, 'hh:mm') || '请选择',


+ 1
- 1
pages2/appointment/appointment.ttml View File

@@ -14,7 +14,7 @@
</text> </text>
</view> </view>


<view tt:if="{{ pickedAddress != '请选择地址' }}" class="addressTextarea">
<view tt:if="{{ isDetail }}" class="addressTextarea">
<textarea class="describe" placeholder="请填写详细地址:单元楼、门牌号等" bindinput="inputAddressDetail" <textarea class="describe" placeholder="请填写详细地址:单元楼、门牌号等" bindinput="inputAddressDetail"
value="{{ pickedAddressDetail }}"></textarea> value="{{ pickedAddressDetail }}"></textarea>
</view> </view>


Loading…
Cancel
Save