Showing
3 changed files
with
26 additions
and
13 deletions
| ... | @@ -27,7 +27,7 @@ | ... | @@ -27,7 +27,7 @@ |
| 27 | </nut-col> | 27 | </nut-col> |
| 28 | </nut-row> | 28 | </nut-row> |
| 29 | </view> | 29 | </view> |
| 30 | - <view class="calendar-select-page"> | 30 | + <view :class="['calendar-select-page', props.data.status === 'enable' || props.data.status === 'cancel' ? 'bg-gray' : '']"> |
| 31 | <nut-row gutter="10"> | 31 | <nut-row gutter="10"> |
| 32 | <nut-col span="9"> | 32 | <nut-col span="9"> |
| 33 | <view class="check-in-text">入住日期</view> | 33 | <view class="check-in-text">入住日期</view> |
| ... | @@ -51,15 +51,17 @@ | ... | @@ -51,15 +51,17 @@ |
| 51 | <IconFont v-else name="rect-down" size="12" color="#7D7C7C"></IconFont> | 51 | <IconFont v-else name="rect-down" size="12" color="#7D7C7C"></IconFont> |
| 52 | </view> | 52 | </view> |
| 53 | </nut-col> | 53 | </nut-col> |
| 54 | - <nut-col span="18"> | 54 | + <!-- 待支付状态下,剩余时间归零 操作隐藏 --> |
| 55 | - <view v-if="props.data.status !== 'cancel'" class="order-control"> | 55 | + <nut-col span="18" v-if="props.data.status === 'no-pay' && remain_time"> |
| 56 | + <view v-if="props.data.status === 'no-pay' || props.data.status === 'apply'" class="order-control"> | ||
| 56 | <nut-button @tap="cancelOrder('id')" plain color="#6A4925" size="small">取消订单</nut-button> | 57 | <nut-button @tap="cancelOrder('id')" plain color="#6A4925" size="small">取消订单</nut-button> |
| 57 | - <nut-button v-if="props.data.status !== 'enable'" @tap="payOrder('id')" color="#6A4925" size="small">立即支付</nut-button> | 58 | + <nut-button v-if="props.data.status !== 'apply'" @tap="payOrder('id')" color="#6A4925" size="small">立即支付</nut-button> |
| 58 | </view> | 59 | </view> |
| 59 | </nut-col> | 60 | </nut-col> |
| 60 | </nut-row> | 61 | </nut-row> |
| 61 | </view> | 62 | </view> |
| 62 | - <view class="order-remain-time"> | 63 | + <!-- 待支付状态下,剩余时间归零 显示隐藏 --> |
| 64 | + <view v-if="props.data.status === 'no-pay' && remain_time" class="order-remain-time"> | ||
| 63 | <text>支付剩余时间</text> | 65 | <text>支付剩余时间</text> |
| 64 | <text style="font-size: 23rpx; color: red;"> | 66 | <text style="font-size: 23rpx; color: red;"> |
| 65 | {{ formatTime(remain_time) }} | 67 | {{ formatTime(remain_time) }} |
| ... | @@ -129,12 +131,14 @@ import { IconFont } from '@nutui/icons-vue-taro'; | ... | @@ -129,12 +131,14 @@ import { IconFont } from '@nutui/icons-vue-taro'; |
| 129 | const STATUS_COLOR = { | 131 | const STATUS_COLOR = { |
| 130 | 'cancel': '#CECECE', | 132 | 'cancel': '#CECECE', |
| 131 | 'no-pay': '#D5842D', | 133 | 'no-pay': '#D5842D', |
| 132 | - 'enable': '#6A4925', | 134 | + 'apply': '#6A4925', |
| 135 | + 'enable': '#656565', | ||
| 133 | } | 136 | } |
| 134 | 137 | ||
| 135 | const STATUS_TEXT = { | 138 | const STATUS_TEXT = { |
| 136 | 'cancel': '已取消', | 139 | 'cancel': '已取消', |
| 137 | - 'enable': '待入住', | 140 | + 'apply': '待入住', |
| 141 | + 'enable': '已入住', | ||
| 138 | 'no-pay': '待支付', | 142 | 'no-pay': '待支付', |
| 139 | } | 143 | } |
| 140 | 144 | ||
| ... | @@ -268,6 +272,9 @@ onUnmounted(() => { | ... | @@ -268,6 +272,9 @@ onUnmounted(() => { |
| 268 | border-radius: 10rpx; | 272 | border-radius: 10rpx; |
| 269 | padding: 1rem 0; | 273 | padding: 1rem 0; |
| 270 | padding-left: 0.5rem; | 274 | padding-left: 0.5rem; |
| 275 | + &.bg-gray { | ||
| 276 | + background-color: #F0F0F0; | ||
| 277 | + } | ||
| 271 | .check-in-text { | 278 | .check-in-text { |
| 272 | color: #7D7C7C; font-size: 0.8rem; | 279 | color: #7D7C7C; font-size: 0.8rem; |
| 273 | } | 280 | } | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2023-12-13 11:13:13 | 2 | * @Date: 2023-12-13 11:13:13 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-12-20 17:02:35 | 4 | + * @LastEditTime: 2023-12-20 18:22:40 |
| 5 | * @FilePath: /meihuaApp/src/pages/my/index.vue | 5 | * @FilePath: /meihuaApp/src/pages/my/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -87,7 +87,7 @@ const orderList = ref([ | ... | @@ -87,7 +87,7 @@ const orderList = ref([ |
| 87 | time: '2023-12-13 11:13:13', | 87 | time: '2023-12-13 11:13:13', |
| 88 | price: 1200, | 88 | price: 1200, |
| 89 | remain_time: 100, | 89 | remain_time: 100, |
| 90 | - status: 'enable', | 90 | + status: 'apply', |
| 91 | }, | 91 | }, |
| 92 | { | 92 | { |
| 93 | id: 3, | 93 | id: 3, |
| ... | @@ -97,6 +97,16 @@ const orderList = ref([ | ... | @@ -97,6 +97,16 @@ const orderList = ref([ |
| 97 | time: '2023-12-13 11:13:13', | 97 | time: '2023-12-13 11:13:13', |
| 98 | price: 1200, | 98 | price: 1200, |
| 99 | remain_time: 100, | 99 | remain_time: 100, |
| 100 | + status: 'enable', | ||
| 101 | + }, | ||
| 102 | + { | ||
| 103 | + id: 4, | ||
| 104 | + name: '阿忆妞妞4', | ||
| 105 | + phone: '138****8888', | ||
| 106 | + address: '北京市朝阳区', | ||
| 107 | + time: '2023-12-13 11:13:13', | ||
| 108 | + price: 1200, | ||
| 109 | + remain_time: 100, | ||
| 100 | status: 'cancel', | 110 | status: 'cancel', |
| 101 | }, | 111 | }, |
| 102 | ]) | 112 | ]) | ... | ... |
| ... | @@ -51,10 +51,6 @@ const tel = ref(''); | ... | @@ -51,10 +51,6 @@ const tel = ref(''); |
| 51 | const imageUrl = ref( | 51 | const imageUrl = ref( |
| 52 | 'https://img.yzcdn.cn/vant/cat.jpeg' | 52 | 'https://img.yzcdn.cn/vant/cat.jpeg' |
| 53 | ); | 53 | ); |
| 54 | -const cutImage = (url) => { | ||
| 55 | - console.warn(url); | ||
| 56 | - imageUrl.value = url; | ||
| 57 | -}; | ||
| 58 | 54 | ||
| 59 | const uploadImg = () => { | 55 | const uploadImg = () => { |
| 60 | Taro.chooseImage({ | 56 | Taro.chooseImage({ | ... | ... |
-
Please register or login to post a comment