Showing
3 changed files
with
199 additions
and
8 deletions
| ... | @@ -13,9 +13,11 @@ declare module '@vue/runtime-core' { | ... | @@ -13,9 +13,11 @@ declare module '@vue/runtime-core' { |
| 13 | Counter: typeof import('./src/components/Counter.vue')['default'] | 13 | Counter: typeof import('./src/components/Counter.vue')['default'] |
| 14 | NavBar: typeof import('./src/components/navBar.vue')['default'] | 14 | NavBar: typeof import('./src/components/navBar.vue')['default'] |
| 15 | NutAvatar: typeof import('@nutui/nutui-taro')['Avatar'] | 15 | NutAvatar: typeof import('@nutui/nutui-taro')['Avatar'] |
| 16 | + NutButton: typeof import('@nutui/nutui-taro')['Button'] | ||
| 16 | NutCalendar: typeof import('@nutui/nutui-taro')['Calendar'] | 17 | NutCalendar: typeof import('@nutui/nutui-taro')['Calendar'] |
| 17 | NutCol: typeof import('@nutui/nutui-taro')['Col'] | 18 | NutCol: typeof import('@nutui/nutui-taro')['Col'] |
| 18 | NutConfigProvider: typeof import('@nutui/nutui-taro')['ConfigProvider'] | 19 | NutConfigProvider: typeof import('@nutui/nutui-taro')['ConfigProvider'] |
| 20 | + NutCountdown: typeof import('@nutui/nutui-taro')['Countdown'] | ||
| 19 | NutInput: typeof import('@nutui/nutui-taro')['Input'] | 21 | NutInput: typeof import('@nutui/nutui-taro')['Input'] |
| 20 | NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber'] | 22 | NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber'] |
| 21 | NutNumberKeyboard: typeof import('@nutui/nutui-taro')['NumberKeyboard'] | 23 | NutNumberKeyboard: typeof import('@nutui/nutui-taro')['NumberKeyboard'] |
| ... | @@ -26,7 +28,10 @@ declare module '@vue/runtime-core' { | ... | @@ -26,7 +28,10 @@ declare module '@vue/runtime-core' { |
| 26 | NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem'] | 28 | NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem'] |
| 27 | NutTabPane: typeof import('@nutui/nutui-taro')['TabPane'] | 29 | NutTabPane: typeof import('@nutui/nutui-taro')['TabPane'] |
| 28 | NutTabs: typeof import('@nutui/nutui-taro')['Tabs'] | 30 | NutTabs: typeof import('@nutui/nutui-taro')['Tabs'] |
| 31 | + NutTag: typeof import('@nutui/nutui-taro')['Tag'] | ||
| 29 | NutTextarea: typeof import('@nutui/nutui-taro')['Textarea'] | 32 | NutTextarea: typeof import('@nutui/nutui-taro')['Textarea'] |
| 33 | + NutToast: typeof import('@nutui/nutui-taro')['Toast'] | ||
| 34 | + OrderCard: typeof import('./src/components/orderCard.vue')['default'] | ||
| 30 | Picker: typeof import('./src/components/time-picker-data/picker.vue')['default'] | 35 | Picker: typeof import('./src/components/time-picker-data/picker.vue')['default'] |
| 31 | PosterBuilder: typeof import('./src/components/PosterBuilder/index.vue')['default'] | 36 | PosterBuilder: typeof import('./src/components/PosterBuilder/index.vue')['default'] |
| 32 | RoomCard: typeof import('./src/components/roomCard.vue')['default'] | 37 | RoomCard: typeof import('./src/components/roomCard.vue')['default'] | ... | ... |
src/components/orderCard.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="order-card-component"> | ||
| 3 | + <view style="padding: 0.5rem;"> | ||
| 4 | + <nut-row> | ||
| 5 | + <nut-col span="16"> | ||
| 6 | + <view style="font-weight: bold; font-size: 34rpx;">家庭豪华连排三室套房</view> | ||
| 7 | + <view style="color: #7D7C7C; font-size: 24rpx;">两室 宜住3人 </view> | ||
| 8 | + </nut-col> | ||
| 9 | + <nut-col span="8"> | ||
| 10 | + <image style="width: 100%; height: 3rem; border-radius: 10rpx;" mode="aspectFill" src="https://img.yzcdn.cn/vant/cat.jpeg" /> | ||
| 11 | + </nut-col> | ||
| 12 | + </nut-row> | ||
| 13 | + </view> | ||
| 14 | + <view style="padding: 0 0.5rem;"><nut-tag color="#FA685D">待支付</nut-tag></view> | ||
| 15 | + <view style="padding: 0.5rem;"> | ||
| 16 | + <nut-row> | ||
| 17 | + <nut-col span="18"> | ||
| 18 | + <view style="height: 2rem; display: flex; align-items: center;"> | ||
| 19 | + <text style="color: #EB2E2E; font-size: 1.3rem; font-weight: bold;">¥980</text> | ||
| 20 | + <text style="color: #7D7C7C; text-decoration: line-through; font-size: 0.85rem; margin-left: 5px;">¥1280</text> | ||
| 21 | + </view> | ||
| 22 | + </nut-col> | ||
| 23 | + <nut-col span="6" style="text-align: right;"> | ||
| 24 | + <text style="font-size: 28rpx;">x1</text> | ||
| 25 | + </nut-col> | ||
| 26 | + </nut-row> | ||
| 27 | + </view> | ||
| 28 | + <view class="calendar-select-page"> | ||
| 29 | + <nut-row gutter=""> | ||
| 30 | + <nut-col span="9"> | ||
| 31 | + <view style="color: #7D7C7C; font-size: 0.8rem;">入住日期</view> | ||
| 32 | + <view style="color: #7D7C7C; font-size: 0.85rem; font-weight: bold;">2023.12.07 星期四</view> | ||
| 33 | + </nut-col> | ||
| 34 | + <nut-col span="5" style="padding: 0 10rpx;"> | ||
| 35 | + <view style="color: #7D7C7C; margin-top: 15%; font-size: 0.8rem; text-align: center; background-color: #fff; padding: 0.25rem 0; border-radius: 0.5rem;"> | ||
| 36 | + 共1晚 | ||
| 37 | + </view> | ||
| 38 | + </nut-col> | ||
| 39 | + <nut-col span="9" style="margin-left: 10rpx;"> | ||
| 40 | + <view style="color: #7D7C7C; font-size: 0.8rem;">退房日期</view> | ||
| 41 | + <view style="color: #7D7C7C; font-size: 0.85rem; font-weight: bold;">2023.12.08 星期五</view> | ||
| 42 | + </nut-col> | ||
| 43 | + </nut-row> | ||
| 44 | + </view> | ||
| 45 | + <view style="padding: 0.5rem;"> | ||
| 46 | + <nut-row> | ||
| 47 | + <nut-col span="6"> | ||
| 48 | + <view @tap="showOrderInfo('id')" style="display: flex; align-items: center; margin: 20rpx 0;height: 60rpx;"> | ||
| 49 | + <text style="font-size: 26rpx; color: #7D7C7C;">入住信息</text> | ||
| 50 | + <IconFont v-if="show_info" name="rect-up" size="12" color="#7D7C7C"></IconFont> | ||
| 51 | + <IconFont v-else name="rect-down" size="12" color="#7D7C7C"></IconFont> | ||
| 52 | + </view> | ||
| 53 | + </nut-col> | ||
| 54 | + <nut-col span="18"> | ||
| 55 | + <view style="display: flex; align-items: center;height: 100rpx; justify-content: flex-end;"> | ||
| 56 | + <nut-button @tap="cancelOrder('id')" plain color="#6A4925" size="small">取消订单</nut-button> | ||
| 57 | + <nut-button @tap="payOrder('id')" color="#6A4925" size="small">立即支付</nut-button> | ||
| 58 | + </view> | ||
| 59 | + </nut-col> | ||
| 60 | + </nut-row> | ||
| 61 | + </view> | ||
| 62 | + <!-- <view v-if="flag" style="display: flex; justify-content: flex-end; font-size: 20rpx; margin-bottom: 1rem;"> | ||
| 63 | + <text>支付剩余时间</text> | ||
| 64 | + <nut-countdown v-model="resetTime" :end-time="end" @end="onEnd('id')"> | ||
| 65 | + <text style="font-size: 20rpx; color: red;">{{ resetTime.m }}:{{ resetTime.s }}</text> | ||
| 66 | + </nut-countdown> | ||
| 67 | + </view> --> | ||
| 68 | + <view v-if="show_info"> | ||
| 69 | + <view style="border-bottom: 1px dashed #979797; padding: 0.5rem;"> | ||
| 70 | + <nut-row> | ||
| 71 | + <nut-col span="12"> | ||
| 72 | + <view style="color: #7D7C7C; font-size: 0.85rem;">入住时间</view> | ||
| 73 | + </nut-col> | ||
| 74 | + <nut-col span="12"> | ||
| 75 | + <view style="color: #7D7C7C; font-size: 0.85rem; text-align: right;">12月7日 14:00后</view> | ||
| 76 | + </nut-col> | ||
| 77 | + </nut-row> | ||
| 78 | + <nut-row> | ||
| 79 | + <nut-col span="12"> | ||
| 80 | + <view style="color: #7D7C7C; font-size: 0.85rem; margin: 0.25rem 0;">退房日期</view> | ||
| 81 | + </nut-col> | ||
| 82 | + <nut-col span="12"> | ||
| 83 | + <view style="color: #7D7C7C; font-size: 0.85rem; text-align: right; margin: 0.25rem 0;">12月8日 12:00前</view> | ||
| 84 | + </nut-col> | ||
| 85 | + </nut-row> | ||
| 86 | + <nut-row> | ||
| 87 | + <nut-col span="12"> | ||
| 88 | + <view style="color: #7D7C7C; font-size: 0.85rem;">早餐</view> | ||
| 89 | + </nut-col> | ||
| 90 | + <nut-col span="12"> | ||
| 91 | + <view style="color: #7D7C7C; font-size: 0.85rem; text-align: right;">3份</view> | ||
| 92 | + </nut-col> | ||
| 93 | + </nut-row> | ||
| 94 | + <view style="font-size: 0.85rem; margin-top: 0.25rem;"> | ||
| 95 | + <view style="color: red; margin: auto; display: inline-block;">*</view> <view style="color: #7D7C7C; margin: auto; display: inline-block;">12月7日 20:00后未入住,订单将被取消</view> | ||
| 96 | + </view> | ||
| 97 | + </view> | ||
| 98 | + <view style="padding: 0.5rem; font-size: 28rpx; color: #7D7C7C;"> | ||
| 99 | + <nut-row style="margin-bottom: 10rpx;"> | ||
| 100 | + <nut-col span="6">联系人:</nut-col> | ||
| 101 | + <nut-col span="18" style="text-align: right;">王二虎</nut-col> | ||
| 102 | + </nut-row> | ||
| 103 | + <nut-row style="margin-bottom: 10rpx;"> | ||
| 104 | + <nut-col span="6">联系电话:</nut-col> | ||
| 105 | + <nut-col span="18" style="text-align: right;">18996999786</nut-col> | ||
| 106 | + </nut-row> | ||
| 107 | + <nut-row style="margin-bottom: 10rpx;"> | ||
| 108 | + <nut-col span="6">备注:</nut-col> | ||
| 109 | + <nut-col span="18" style="text-align: right;"></nut-col> | ||
| 110 | + </nut-row> | ||
| 111 | + <nut-row style="margin-bottom: 10rpx;"> | ||
| 112 | + <nut-col span="6">下单时间:</nut-col> | ||
| 113 | + <nut-col span="18" style="text-align: right;">2023-12-06</nut-col> | ||
| 114 | + </nut-row> | ||
| 115 | + <nut-row style="margin-bottom: 10rpx;"> | ||
| 116 | + <nut-col span="6">订单号:</nut-col> | ||
| 117 | + <nut-col span="18" style="text-align: right;">20231206</nut-col> | ||
| 118 | + </nut-row> | ||
| 119 | + </view> | ||
| 120 | + </view> | ||
| 121 | + </view> | ||
| 122 | +</template> | ||
| 123 | + | ||
| 124 | +<script setup> | ||
| 125 | +import { ref } from 'vue' | ||
| 126 | +import Taro from '@tarojs/taro' | ||
| 127 | +import { IconFont } from '@nutui/icons-vue-taro'; | ||
| 128 | + | ||
| 129 | +const end = ref(Date.now() + 60 * 1000); | ||
| 130 | +const resetTime = ref({ | ||
| 131 | + m: '00', | ||
| 132 | + s: '00' | ||
| 133 | +}); | ||
| 134 | + | ||
| 135 | +const flag = ref(false); | ||
| 136 | +const onEnd = (id) => { | ||
| 137 | + console.warn(id); | ||
| 138 | + flag.value = false; | ||
| 139 | +} | ||
| 140 | + | ||
| 141 | +const show_info = ref(false); | ||
| 142 | +const showOrderInfo = (id) => { | ||
| 143 | + show_info.value = !show_info.value; | ||
| 144 | +} | ||
| 145 | + | ||
| 146 | +const cancelOrder = (id) => { | ||
| 147 | + Taro.showModal({ | ||
| 148 | + title: '温馨提示', | ||
| 149 | + content: '是否确认取消订单?', | ||
| 150 | + success: function (res) { | ||
| 151 | + if (res.confirm) { | ||
| 152 | + console.log('用户点击确定') | ||
| 153 | + } else if (res.cancel) { | ||
| 154 | + console.log('用户点击取消') | ||
| 155 | + } | ||
| 156 | + } | ||
| 157 | + }) | ||
| 158 | +} | ||
| 159 | +const payOrder = (id) => { | ||
| 160 | + Taro.showToast({ | ||
| 161 | + title: '支付已超时', | ||
| 162 | + icon: 'error', | ||
| 163 | + duration: 2000 | ||
| 164 | + }); | ||
| 165 | +} | ||
| 166 | +</script> | ||
| 167 | + | ||
| 168 | +<style lang="less"> | ||
| 169 | +.order-card-component { | ||
| 170 | + margin: 0 1rem; | ||
| 171 | + // padding: 0.5rem; | ||
| 172 | + background-color: white; | ||
| 173 | + box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.1); | ||
| 174 | + border: 1px solid #f9f9f9; | ||
| 175 | + border-radius: 0.5rem; | ||
| 176 | + overflow: hidden; | ||
| 177 | + .calendar-select-page { | ||
| 178 | + margin: 0 0.5rem; | ||
| 179 | + background-color: #F6ECE1; | ||
| 180 | + border-radius: 10rpx; | ||
| 181 | + padding: 1rem 0; | ||
| 182 | + padding-left: 0.5rem; | ||
| 183 | + } | ||
| 184 | +} | ||
| 185 | +</style> |
| 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-18 10:26:00 | 4 | + * @LastEditTime: 2023-12-18 12:46:49 |
| 5 | * @FilePath: /meihuaApp/src/pages/my/index.vue | 5 | * @FilePath: /meihuaApp/src/pages/my/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -19,15 +19,15 @@ | ... | @@ -19,15 +19,15 @@ |
| 19 | </view> | 19 | </view> |
| 20 | <view style="position: absolute; left: 0%; right: 0%; bottom: 0%; height: 20rpx; width: 100%; background-color: #FFF; border-top-left-radius: 20rpx;border-top-right-radius: 20rpx;"></view> | 20 | <view style="position: absolute; left: 0%; right: 0%; bottom: 0%; height: 20rpx; width: 100%; background-color: #FFF; border-top-left-radius: 20rpx;border-top-right-radius: 20rpx;"></view> |
| 21 | </view> | 21 | </view> |
| 22 | - <view> | 22 | + <view v-if="showContent"> |
| 23 | <view id="title" style="padding-left: 1.5rem; font-size: 35rpx; font-weight: bold;">我的订单</view> | 23 | <view id="title" style="padding-left: 1.5rem; font-size: 35rpx; font-weight: bold;">我的订单</view> |
| 24 | <view> | 24 | <view> |
| 25 | - <nut-tabs v-model="value" title-scroll title-gutter="10" name="tabName" background="#FFF" color="#6A4925" animated-time="0"> | 25 | + <nut-tabs v-model="value" title-scroll title-gutter="0" name="tabName" background="#FFF" color="#6A4925" animated-time="0"> |
| 26 | <nut-tab-pane v-for="item in tabList" :title="item.title" :pane-key="item.key"> | 26 | <nut-tab-pane v-for="item in tabList" :title="item.title" :pane-key="item.key"> |
| 27 | <view class="book-list"> | 27 | <view class="book-list"> |
| 28 | <scroll-view :style="scrollStyle" :scroll-y="true" :scroll-with-animation="true" @scrolltolower="onScrollToLower"> | 28 | <scroll-view :style="scrollStyle" :scroll-y="true" :scroll-with-animation="true" @scrolltolower="onScrollToLower"> |
| 29 | <view v-for="(item, index) in 10" :key="index"> | 29 | <view v-for="(item, index) in 10" :key="index"> |
| 30 | - <room-card :key="index"></room-card> | 30 | + <order-card :key="index"></order-card> |
| 31 | <view v-if="index === 9" style="height: 2rem;"></view> | 31 | <view v-if="index === 9" style="height: 2rem;"></view> |
| 32 | </view> | 32 | </view> |
| 33 | </scroll-view> | 33 | </scroll-view> |
| ... | @@ -45,7 +45,7 @@ import Taro from '@tarojs/taro' | ... | @@ -45,7 +45,7 @@ import Taro from '@tarojs/taro' |
| 45 | import { ref } from "vue"; | 45 | import { ref } from "vue"; |
| 46 | import { IconFont } from '@nutui/icons-vue-taro'; | 46 | import { IconFont } from '@nutui/icons-vue-taro'; |
| 47 | import navBar from '@/components/navBar.vue' | 47 | import navBar from '@/components/navBar.vue' |
| 48 | -import roomCard from '@/components/roomCard.vue' | 48 | +import orderCard from '@/components/orderCard.vue' |
| 49 | 49 | ||
| 50 | const value = ref('0'); | 50 | const value = ref('0'); |
| 51 | const tabList = ref([{ | 51 | const tabList = ref([{ |
| ... | @@ -81,9 +81,10 @@ export default { | ... | @@ -81,9 +81,10 @@ export default { |
| 81 | // 设置首页封面高度 | 81 | // 设置首页封面高度 |
| 82 | const windowHeight = wx.getSystemInfoSync().windowHeight; | 82 | const windowHeight = wx.getSystemInfoSync().windowHeight; |
| 83 | // 处理切换显示白屏问题 | 83 | // 处理切换显示白屏问题 |
| 84 | - setTimeout(() => { | 84 | + // setTimeout(() => { |
| 85 | - this.showContent = true; | 85 | + // this.showContent = true; |
| 86 | - }, 100); | 86 | + // }, 1); |
| 87 | + this.showContent = true; | ||
| 87 | setTimeout(async () => { | 88 | setTimeout(async () => { |
| 88 | const navHeight = await $('#navbar-page').height(); | 89 | const navHeight = await $('#navbar-page').height(); |
| 89 | const avatorHeight = await $('#avator').height(); | 90 | const avatorHeight = await $('#avator').height(); | ... | ... |
-
Please register or login to post a comment