Explorar el Código

商户折叠、预约跳转、预约地址详情

product
HolyKnightIX hace 1 año
padre
commit
e3bbde5e12
Se han modificado 9 ficheros con 110 adiciones y 12 borrados
  1. +1
    -1
      components/shop/shop.less
  2. +34
    -0
      components/shop/shop.ttml
  3. +0
    -1
      components/shop/shop.ttss
  4. +16
    -0
      package2/pages/appointment/appointment.js
  5. +7
    -2
      package2/pages/appointment/appointment.ttml
  6. +10
    -1
      package2/pages/appointment/appointment.ttss
  7. +2
    -2
      pages/coupon/confirmation/confirmation.js
  8. +31
    -5
      pages/order/detail/index.js
  9. +9
    -0
      project.private.config.json

+ 1
- 1
components/shop/shop.less Ver fichero

@@ -137,7 +137,7 @@
.shopVoList { .shopVoList {
white-space: nowrap !important; white-space: nowrap !important;
overflow-y: scroll; overflow-y: scroll;
height: 60rpx !important;
// height: 60rpx !important;
width: 360rpx; width: 360rpx;
font-size: 16px; font-size: 16px;
color: #333; color: #333;


+ 34
- 0
components/shop/shop.ttml Ver fichero

@@ -27,6 +27,40 @@


<!-- 当item.expand为true且商户数量不大于三个时 --> <!-- 当item.expand为true且商户数量不大于三个时 -->
<view class="shop" tt:if="{{item.expand}}"> <view class="shop" tt:if="{{item.expand}}">
<view class='posi' tt:for="{{[item.merchantVoList[0]]}}" tt:for-index="itemIndex" tt:key="{{itemIndex}}">
<view class='posi_logo'>
<view bindtap='gotoDetail' data-id='{{item.id}}' data-tenantId='{{item.tenantId}}'>
<image src='{{item.merchantImgUrl}}'></image>
</view>
<view bindtap='gotoDetail' data-id='{{item.id}}' data-tenantId='{{item.tenantId}}'>
<view class='name'>{{item.merchantName}}</view>
<view class='shopVoList'>
<view tt:for="{{item.shopVoList}}" tt:key="{{index}}" tt:for-item="itemName">
<text>{{itemName.buildingName}}{{itemName.floorName}}--{{itemName.shopNumber}}</text>
<text class='douhao' tt:if="{{item.shopVoList.length>1}}">,</text>
</view>
</view>
</view>
<view class="telBox" tt:if="{{item.linkLinePhone}}">
<image bindtap='phone' data-merchantLinkPhone='{{item.linkLinePhone}}' class="telImg"
src="{{telJpgUrl}}" mode="widthFix" />
<view class="telText">电话</view>
</view>
<!-- <view class="certificationBox" tt:if="{{item.latitude&&item.longitude}}" bindtap="goCertification"
data-id="{{item.id}}">
<image class="certificationImg" src="../../assets/imgData/certification.png" mode="widthFix" />
<view class="telText">资质</view>
</view> -->
</view>
<view class="siteBox" tt:if="{{item.latitude&&item.longitude}}" bindtap="goMap" data-item="{{item}}">
<view class="siteText">{{item.addr}}</view>
<image class="siteImg" src="../../assets/imgData/siteImg.png" mode="widthFix" />
</view>
<view class="dividerInside" tt:if="{{(itemIndex+1)<list[index].merchantVoList.length}}"></view>
</view>
</view>

<view class="shop" tt:if="{{!item.expand}}">
<view class='posi' tt:for="{{item.merchantVoList}}" tt:for-index="itemIndex" tt:key="{{itemIndex}}"> <view class='posi' tt:for="{{item.merchantVoList}}" tt:for-index="itemIndex" tt:key="{{itemIndex}}">
<view class='posi_logo'> <view class='posi_logo'>
<view bindtap='gotoDetail' data-id='{{item.id}}' data-tenantId='{{item.tenantId}}'> <view bindtap='gotoDetail' data-id='{{item.id}}' data-tenantId='{{item.tenantId}}'>


+ 0
- 1
components/shop/shop.ttss Ver fichero

@@ -112,7 +112,6 @@
.components .body .shop .posi .posi_logo .shopVoList { .components .body .shop .posi .posi_logo .shopVoList {
white-space: nowrap !important; white-space: nowrap !important;
overflow-y: scroll; overflow-y: scroll;
height: 60rpx !important;
width: 360rpx; width: 360rpx;
font-size: 16px; font-size: 16px;
color: #333; color: #333;


+ 16
- 0
package2/pages/appointment/appointment.js Ver fichero

@@ -13,6 +13,7 @@ Page({
endTime: "", endTime: "",
mallTenantId: "", mallTenantId: "",
pickedAddress: "请选择地址", pickedAddress: "请选择地址",
pickedAddressDetail: "",
pickedDate: "请选择日期", pickedDate: "请选择日期",
pickedStartTime: "请选择", pickedStartTime: "请选择",
pickedEndTime: "请选择", pickedEndTime: "请选择",
@@ -178,6 +179,12 @@ Page({
}) })
}, },


chooseAddressDetail() {
this.setData({
pickedAddressDetailFlag: false
})
},

chooseDate(e) { chooseDate(e) {
console.log(e.detail.value, 'e'); console.log(e.detail.value, 'e');
this.setData({ this.setData({
@@ -199,6 +206,13 @@ Page({
}) })
}, },



inputAddressDetail(e) {
this.setData({
pickedAddressDetail: e.detail.value
})
},

describing(e) { describing(e) {
this.setData({ this.setData({
describeStr: e.detail.value describeStr: e.detail.value
@@ -243,6 +257,7 @@ Page({
const data = { const data = {
couponOrderId: tempData.orderId, couponOrderId: tempData.orderId,
userAddress: tempData.pickedAddress, userAddress: tempData.pickedAddress,
detailedAddress: tempData.pickedAddressDetail,
startDate: tempData.pickedDate + " " + tempData.pickedStartTime + ":00", startDate: tempData.pickedDate + " " + tempData.pickedStartTime + ":00",
endDate: tempData.pickedDate + " " + tempData.pickedEndTime + ":00", endDate: tempData.pickedDate + " " + tempData.pickedEndTime + ":00",
describeStr: tempData.describeStr, describeStr: tempData.describeStr,
@@ -355,6 +370,7 @@ Page({
const status = res.data.status const status = res.data.status
that.setData({ that.setData({
pickedAddress: res.data.userAddress || '请选择地址', pickedAddress: res.data.userAddress || '请选择地址',
pickedAddressDetail: res.data.detailedAddress,
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'),


+ 7
- 2
package2/pages/appointment/appointment.ttml Ver fichero

@@ -14,6 +14,11 @@
</text> </text>
</view> </view>


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

<view class="datePickerFlex"> <view class="datePickerFlex">
<picker mode="date" start="{{ startTime }}" end="{{ endTime }}" disabled="{{ !isShowBtns }}" <picker mode="date" start="{{ startTime }}" end="{{ endTime }}" disabled="{{ !isShowBtns }}"
bindchange='chooseDate'>选择服务日期:</picker> bindchange='chooseDate'>选择服务日期:</picker>
@@ -47,10 +52,10 @@
disabled="{{false}}" bindchange="setMerchant"> disabled="{{false}}" bindchange="setMerchant">
<text> 选择可用商户:<text class="pickerInside">{{ mallList[currentIndex].merchantName }} <text <text> 选择可用商户:<text class="pickerInside">{{ mallList[currentIndex].merchantName }} <text
class="distanceFoot">{{ mallList[currentIndex].distance_str }}</text></text></text> class="distanceFoot">{{ mallList[currentIndex].distance_str }}</text></text></text>
</picker><!-- -->
</picker>
</view> </view>


<view class="textarea">
<view class="describeTextarea">
<textarea class="describe" placeholder="备注:说点什么吧" disabled="{{ !isShowBtns }}" bindinput="describing" <textarea class="describe" placeholder="备注:说点什么吧" disabled="{{ !isShowBtns }}" bindinput="describing"
value="{{ describeStr }}"></textarea> value="{{ describeStr }}"></textarea>
</view> </view>


+ 10
- 1
package2/pages/appointment/appointment.ttss Ver fichero

@@ -21,6 +21,7 @@ page {
color: #8a8a8a; color: #8a8a8a;
} }



.addressPickerFlex { .addressPickerFlex {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@@ -55,7 +56,15 @@ page {
margin: 35rpx auto; margin: 35rpx auto;
} }


.textarea {
.addressTextarea {
height: 130rpx;
margin: 35rpx auto;
overflow: hidden;
border-radius: 20rpx;

}

.describeTextarea {
margin: 35rpx auto; margin: 35rpx auto;
overflow: hidden; overflow: hidden;
border-radius: 20rpx; border-radius: 20rpx;


+ 2
- 2
pages/coupon/confirmation/confirmation.js Ver fichero

@@ -352,6 +352,7 @@ Page({
.then(res => { .then(res => {
tt.hideLoading() tt.hideLoading()
// 有价券 // 有价券
tt.setStorageSync('appointment', true);
if (!type && type != 'free') { if (!type && type != 'free') {
console.log('Over Here! type'); console.log('Over Here! type');
setTimeout(() => { setTimeout(() => {
@@ -371,8 +372,7 @@ Page({
} else if (type == 'free') { } else if (type == 'free') {
console.log('Over Here! type2'); console.log('Over Here! type2');
tt.navigateTo({ tt.navigateTo({
url: `/pages/order/detail/index?orderId=${orderId
}&mallTenantId=${that.data.mallTenantId}`
url: `/pages/order/detail/index?orderId=${orderId}&mallTenantId=${that.data.mallTenantId}`
}); });
} }
}) })


+ 31
- 5
pages/order/detail/index.js Ver fichero

@@ -66,7 +66,7 @@ Page({
appointEnd: "", appointEnd: "",
appointmentId: "", appointmentId: "",
appointmentStatus: "", appointmentStatus: "",
use_num_per_consume: ""
use_num_per_consume: "",
}, },


imCallback(e) { imCallback(e) {
@@ -181,9 +181,9 @@ Page({
}) })
}, },


goAppointment(e) {
goAppointment(e, orderIdin) {
const that = this const that = this
const orderId = e.currentTarget.dataset.id
const orderId = e ? e.currentTarget.dataset.id : orderIdin
const id = this.data.appointmentId const id = this.data.appointmentId
const startTime = that.data.order.validStartDATE const startTime = that.data.order.validStartDATE
const endTime = that.data.order.validEndDate const endTime = that.data.order.validEndDate
@@ -527,6 +527,28 @@ Page({


} }


if (tempData.type == 69 && tempData.couponOrderStatus == 0) {
const Appointment = tt.getStorageSync('appointment');
if (Appointment) {
tt.showModal({
title: "提示",
content: "是否立即填写预约信息?",
showCancel: true,
confirmText: "现在预约",
confirmColor: "#deb472",
cancelText: "稍后预约",
success(res) {
if (res.confirm) {
tt.setStorageSync('appointment', false);
that.goAppointment(false, tempData.couponOrderId)
}
if (res.cancel) {

}
}
});
}
}


that.setData({ that.setData({
outOrderNo: res.data.id, outOrderNo: res.data.id,
@@ -897,6 +919,8 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (option) { onLoad: function (option) {
console.log(option, 'option');

let options = null let options = null
if (option.params) { if (option.params) {
options = JSON.parse(option.params) options = JSON.parse(option.params)
@@ -910,6 +934,7 @@ Page({
}) })
} }



this.setData({ this.setData({
mouldType: app.globalData.mouldType mouldType: app.globalData.mouldType
}) })
@@ -1323,6 +1348,7 @@ Page({
}, 1600); }, 1600);
setTimeout(() => { setTimeout(() => {
console.log('Here1'); console.log('Here1');
tt.setStorageSync('appointment', true);
let url = "" let url = ""
if (_this.data.orderFlag) { if (_this.data.orderFlag) {
tt.redirectTo({ tt.redirectTo({
@@ -1330,7 +1356,7 @@ Page({
}); });
} else { } else {
tt.redirectTo({ tt.redirectTo({
url: `/pages/order/detail/index?orderId=${orderId}}&mallTenantId=${that.data.mallTenantId}`
url: `/pages/order/detail/index?orderId=${orderId}&mallTenantId=${that.data.mallTenantId}`
}); });
} }


@@ -1340,7 +1366,7 @@ Page({
} else if (type == 'free') { } else if (type == 'free') {
console.log('Here2'); console.log('Here2');
tt.redirectTo({ tt.redirectTo({
url: `/pages/order/detail/index?orderId=${orderId}}&mallTenantId=${that.data.mallTenantId}`
url: `/pages/order/detail/index?orderId=${orderId}&mallTenantId=${that.data.mallTenantId}`
}); });
} }
}) })


+ 9
- 0
project.private.config.json Ver fichero

@@ -56,6 +56,15 @@
"scene": "011007", "scene": "011007",
"launchFrom": "scan", "launchFrom": "scan",
"location": "audit" "location": "audit"
},
{
"id": 1687681696486,
"name": "package2/pages/appointment/appointment",
"pathName": "package2/pages/appointment/appointment",
"query": "id=&orderId=832862588988481536&startTime=1687622400000&endTime=2023-06-30&mallList=%255B%257B%2522tenantId%2522%253A%25221040%2522%252C%2522mallName%2522%253A%2522%25E5%25AF%258C%25E8%258C%2582%25E5%25AE%25B6%25E6%2594%25BF%2522%252C%2522merchantVoList%2522%253A%255B%257B%2522merchantStatus%2522%253A1%252C%2522shopVoList%2522%253A%255B%257B%2522imgUrl%2522%253A%2522https%253A%252F%252Fformall.oss-accelerate.aliyuncs.com%252F234%252FWechatIMG5071.png%2522%252C%2522buildingName%2522%253A%2522%25E5%25AF%258C%25E8%258C%2582%25E5%25AE%25B6%25E6%2594%25BF%2522%252C%2522linkPhone%2522%253A%2522%2522%252C%2522shopNumber%2522%253A%2522001%2522%252C%2522id%2522%253A%2522828071776068100096%2522%252C%2522floorName%2522%253A%25221F%2522%252C%2522floor%2522%253A%2522825939503087149056%2522%252C%2522addr%2522%253A%2522%2522%252C%2522linkPerson%2522%253A%2522%2522%252C%2522building%2522%253A%2522825939503074566144%2522%257D%255D%252C%2522latitude%2522%253A%252230.277748%2522%252C%2522businessId%2522%253A6%252C%2522supplierExtId%2522%253A%2522828072047632506880%2522%252C%2522isAdmin%2522%253A0%252C%2522merchantName%2522%253A%2522%25E5%25AE%25B6%25E5%25B8%25AE%25E6%25B1%2587%25E5%25AE%25B6%25E6%2594%25BF%25E4%25BF%259D%25E6%25B4%2581%28%25E6%25B2%25B3%25E6%25B1%25A0%25E5%25B8%2582%25E5%25BA%2586%25E8%25BF%259C%25E9%2595%2587%29%2522%252C%2522ttPoi%2522%253A%25227241459164742944771%2522%252C%2522merchantImgUrl%2522%253A%2522https%253A%252F%252Fformall.oss-accelerate.aliyuncs.com%252F234%252FWechatIMG5071.png%2522%252C%2522merchantLinkPhone%2522%253A%252218988778877%2522%252C%2522parameter%2522%253A%2522%257B%255C%2522subsidyNumStr%255C%2522%253A%25200%257D%2522%252C%2522tenantId%2522%253A%25221040%2522%252C%2522finalTenantId%2522%253A%25221040%2522%252C%2522id%2522%253A%2522828072047632506880%2522%252C%2522longitude%2522%253A%2522119.996078%2522%257D%255D%252C%2522expand%2522%253Atrue%257D%255D",
"scene": "990001",
"launchFrom": "scan",
"location": "qr_code"
} }
] ]
} }


Cargando…
Cancelar
Guardar