HolyKnightIX pirms 1 gada
vecāks
revīzija
f89cd54088
3 mainītis faili ar 27 papildinājumiem un 7 dzēšanām
  1. +4
    -4
      ext.json
  2. +22
    -2
      pages2/appointment/appointment.js
  3. +1
    -1
      pages2/appointment/appointment.ttml

+ 4
- 4
ext.json Parādīt failu

@@ -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": {


+ 22
- 2
pages2/appointment/appointment.js Parādīt failu

@@ -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') || '请选择',


+ 1
- 1
pages2/appointment/appointment.ttml Parādīt failu

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

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


Notiek ielāde…
Atcelt
Saglabāt