mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 14:19:38 +08:00
描述:预约记录
This commit is contained in:
parent
0f3142081b
commit
a3c744c01f
@ -47,8 +47,6 @@ Page({
|
||||
if (isDataAll) {
|
||||
return;
|
||||
}
|
||||
// 显示-导航条加载动画
|
||||
wx.showNavigationBarLoading()
|
||||
// 查询数据
|
||||
selectReservationListByUserIdRq({
|
||||
pageNum,
|
||||
@ -56,14 +54,63 @@ Page({
|
||||
userId
|
||||
}).then(res => {
|
||||
console.log('selectReservationListByUserIdRq', res);
|
||||
// 隐藏-导航条加载动画
|
||||
wx.hideNavigationBarLoading()
|
||||
// 判断数据是否全部查询
|
||||
let queryDataList = res.rows;
|
||||
if (queryDataList && queryDataList.length > 0) {
|
||||
// 格式化数据
|
||||
queryDataList = queryDataList.map(item => {
|
||||
item.timeSlot = selfFormatTimeYMD(item.startTime) + ' ' + selfFormatTimeHM(item.startTime) + '~' + selfFormatTimeHM(item.endDate);
|
||||
// 状态字体颜色
|
||||
let statusColor = "#FFB119";
|
||||
// 按钮是否显示
|
||||
let statusValue = item.statusValue;
|
||||
let showPay = false;
|
||||
let showInvite = false;
|
||||
let showCancel = false;
|
||||
let showDetail = false;
|
||||
// 待支付 0 :去支付、取消订单、查看详情
|
||||
if (statusValue == 0) {
|
||||
showPay = true;
|
||||
showCancel = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#FFB119";
|
||||
}
|
||||
// 待使用 1:去邀请、取消订单、查看详情
|
||||
if (statusValue == 1) {
|
||||
showInvite = true;
|
||||
showCancel = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#3794FF";
|
||||
}
|
||||
// 进行中 2:去邀请、查看详情
|
||||
if (statusValue == 2) {
|
||||
showInvite = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#FF4040";
|
||||
}
|
||||
// 已结束 3:查看详情
|
||||
if (statusValue == 3) {
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#333333";
|
||||
}
|
||||
// 已取消 4:查看详情
|
||||
if (statusValue == 4) {
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#7F7F7F";
|
||||
}
|
||||
//
|
||||
// 赋值
|
||||
item.showPay = showPay;
|
||||
item.showInvite = showInvite;
|
||||
item.showCancel = showCancel;
|
||||
item.showDetail = showDetail;
|
||||
// 状态字体颜色
|
||||
item.statusColor = statusColor;
|
||||
return item;
|
||||
})
|
||||
// 更新参数
|
||||
|
@ -1,10 +1,10 @@
|
||||
<view class="containerView public">
|
||||
<van-tabs bind:click="onClick">
|
||||
<van-tabs bind:click="onClick" color="#4e96f8" border animated title-active-color="black" title-inactive-color="gray">
|
||||
<van-tab title="预约记录">
|
||||
<view class="itemView" wx:for="{{dataList}}" wx:for-item="item" wx:key="*this">
|
||||
<view class="headView">
|
||||
<view class="number">{{item.reservationNumber}}</view>
|
||||
<view class="status">{{item.statusName}}</view>
|
||||
<view class="status" style="color: {{item.statusColor}};">{{item.statusName}}</view>
|
||||
</view>
|
||||
<view class="contentView" bind:tap="jumpMeetingDetail" data-id="{{item.id}}">
|
||||
<image class="img" src="{{IMG_NAME + '/profile/static/index/banner/1.jpg'}}" mode="aspectFill"></image>
|
||||
@ -19,17 +19,18 @@
|
||||
<view class="price">¥{{item.orderMoney}}</view>
|
||||
</view>
|
||||
<view class="btnView">
|
||||
<view class="btn" bind:tap="jumpPay">去支付</view>
|
||||
<view class="btn">去邀请
|
||||
<view class="btn" wx:if="{{item.showPay}}" bind:tap="jumpPay">去支付</view>
|
||||
<view class="btn" wx:if="{{item.showInvite}}">去邀请
|
||||
<button class="shareBtn" open-type="share">转发</button>
|
||||
</view>
|
||||
<view class="btn">取消订单</view>
|
||||
<view class="btn" bind:tap="jumpMeetingDetail" data-id="{{item.id}}">查看详情</view>
|
||||
<view class="btn" wx:if="{{item.showCancel}}">取消订单</view>
|
||||
<view class="btn" wx:if="{{item.showDetail}}" bind:tap="jumpMeetingDetail" data-id="{{item.id}}">查看详情</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</van-tab>
|
||||
<van-tab title="参与记录">
|
||||
|
||||
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user