hookehuyr

fix

......@@ -27,7 +27,7 @@
</nut-col>
</nut-row>
</view>
<view class="calendar-select-page">
<view :class="['calendar-select-page', props.data.status === 'enable' || props.data.status === 'cancel' ? 'bg-gray' : '']">
<nut-row gutter="10">
<nut-col span="9">
<view class="check-in-text">入住日期</view>
......@@ -51,15 +51,17 @@
<IconFont v-else name="rect-down" size="12" color="#7D7C7C"></IconFont>
</view>
</nut-col>
<nut-col span="18">
<view v-if="props.data.status !== 'cancel'" class="order-control">
<!-- 待支付状态下,剩余时间归零 操作隐藏 -->
<nut-col span="18" v-if="props.data.status === 'no-pay' && remain_time">
<view v-if="props.data.status === 'no-pay' || props.data.status === 'apply'" class="order-control">
<nut-button @tap="cancelOrder('id')" plain color="#6A4925" size="small">取消订单</nut-button>&nbsp;
<nut-button v-if="props.data.status !== 'enable'" @tap="payOrder('id')" color="#6A4925" size="small">立即支付</nut-button>
<nut-button v-if="props.data.status !== 'apply'" @tap="payOrder('id')" color="#6A4925" size="small">立即支付</nut-button>
</view>
</nut-col>
</nut-row>
</view>
<view class="order-remain-time">
<!-- 待支付状态下,剩余时间归零 显示隐藏 -->
<view v-if="props.data.status === 'no-pay' && remain_time" class="order-remain-time">
<text>支付剩余时间</text>&nbsp;
<text style="font-size: 23rpx; color: red;">
{{ formatTime(remain_time) }}
......@@ -129,12 +131,14 @@ import { IconFont } from '@nutui/icons-vue-taro';
const STATUS_COLOR = {
'cancel': '#CECECE',
'no-pay': '#D5842D',
'enable': '#6A4925',
'apply': '#6A4925',
'enable': '#656565',
}
const STATUS_TEXT = {
'cancel': '已取消',
'enable': '待入住',
'apply': '待入住',
'enable': '已入住',
'no-pay': '待支付',
}
......@@ -268,6 +272,9 @@ onUnmounted(() => {
border-radius: 10rpx;
padding: 1rem 0;
padding-left: 0.5rem;
&.bg-gray {
background-color: #F0F0F0;
}
.check-in-text {
color: #7D7C7C; font-size: 0.8rem;
}
......
<!--
* @Date: 2023-12-13 11:13:13
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-20 17:02:35
* @LastEditTime: 2023-12-20 18:22:40
* @FilePath: /meihuaApp/src/pages/my/index.vue
* @Description: 文件描述
-->
......@@ -87,7 +87,7 @@ const orderList = ref([
time: '2023-12-13 11:13:13',
price: 1200,
remain_time: 100,
status: 'enable',
status: 'apply',
},
{
id: 3,
......@@ -97,6 +97,16 @@ const orderList = ref([
time: '2023-12-13 11:13:13',
price: 1200,
remain_time: 100,
status: 'enable',
},
{
id: 4,
name: '阿忆妞妞4',
phone: '138****8888',
address: '北京市朝阳区',
time: '2023-12-13 11:13:13',
price: 1200,
remain_time: 100,
status: 'cancel',
},
])
......
......@@ -51,10 +51,6 @@ const tel = ref('');
const imageUrl = ref(
'https://img.yzcdn.cn/vant/cat.jpeg'
);
const cutImage = (url) => {
console.warn(url);
imageUrl.value = url;
};
const uploadImg = () => {
Taro.chooseImage({
......