Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
meihua-island-book
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2023-12-20 18:39:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
295b97317ccb576afc373c7c798b7e746ac264b1
295b9731
1 parent
cec3d0d2
fix
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
13 deletions
src/components/orderCard.vue
src/pages/my/index.vue
src/pages/myInfo/index.vue
src/components/orderCard.vue
View file @
295b973
...
...
@@ -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>
<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>
<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;
}
...
...
src/pages/my/index.vue
View file @
295b973
<!--
* @Date: 2023-12-13 11:13:13
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-20 1
7:02:35
* @LastEditTime: 2023-12-20 1
8: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',
},
])
...
...
src/pages/myInfo/index.vue
View file @
295b973
...
...
@@ -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({
...
...
Please
register
or
login
to post a comment