Showing
4 changed files
with
68 additions
and
12 deletions
| ... | @@ -12,12 +12,14 @@ declare module '@vue/runtime-core' { | ... | @@ -12,12 +12,14 @@ declare module '@vue/runtime-core' { |
| 12 | CalendarSelect: typeof import('./src/components/calendarSelect.vue')['default'] | 12 | CalendarSelect: typeof import('./src/components/calendarSelect.vue')['default'] |
| 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 | + NutActionSheet: typeof import('@nutui/nutui-taro')['ActionSheet'] | ||
| 15 | NutAvatar: typeof import('@nutui/nutui-taro')['Avatar'] | 16 | NutAvatar: typeof import('@nutui/nutui-taro')['Avatar'] |
| 16 | NutButton: typeof import('@nutui/nutui-taro')['Button'] | 17 | NutButton: typeof import('@nutui/nutui-taro')['Button'] |
| 17 | NutCalendar: typeof import('@nutui/nutui-taro')['Calendar'] | 18 | NutCalendar: typeof import('@nutui/nutui-taro')['Calendar'] |
| 18 | NutCol: typeof import('@nutui/nutui-taro')['Col'] | 19 | NutCol: typeof import('@nutui/nutui-taro')['Col'] |
| 19 | NutConfigProvider: typeof import('@nutui/nutui-taro')['ConfigProvider'] | 20 | NutConfigProvider: typeof import('@nutui/nutui-taro')['ConfigProvider'] |
| 20 | NutCountdown: typeof import('@nutui/nutui-taro')['Countdown'] | 21 | NutCountdown: typeof import('@nutui/nutui-taro')['Countdown'] |
| 22 | + NutEmpty: typeof import('@nutui/nutui-taro')['Empty'] | ||
| 21 | NutInput: typeof import('@nutui/nutui-taro')['Input'] | 23 | NutInput: typeof import('@nutui/nutui-taro')['Input'] |
| 22 | NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber'] | 24 | NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber'] |
| 23 | NutNumberKeyboard: typeof import('@nutui/nutui-taro')['NumberKeyboard'] | 25 | NutNumberKeyboard: typeof import('@nutui/nutui-taro')['NumberKeyboard'] | ... | ... |
| ... | @@ -118,6 +118,14 @@ | ... | @@ -118,6 +118,14 @@ |
| 118 | </nut-row> | 118 | </nut-row> |
| 119 | </view> | 119 | </view> |
| 120 | </view> | 120 | </view> |
| 121 | + <!-- <nut-action-sheet v-model:visible="visible" title=""> | ||
| 122 | + <view style="padding: 2rem 1rem; text-align: center;"> | ||
| 123 | + <view style="font-size: 32rpx;">实付金额</view> | ||
| 124 | + <view style="color: red; margin: 10rpx 0;"><text style="font-size: 50rpx;">¥</text><text style="font-size: 80rpx;">980</text></view> | ||
| 125 | + <view style="font-size: 28rpx; margin-bottom: 20rpx;">支付剩余时间 <text style="color: red;">29:59</text></view> | ||
| 126 | + <nut-button block color="#6A4925">立即支付</nut-button> | ||
| 127 | + </view> | ||
| 128 | + </nut-action-sheet> --> | ||
| 121 | </view> | 129 | </view> |
| 122 | </template> | 130 | </template> |
| 123 | 131 | ||
| ... | @@ -126,6 +134,8 @@ import { ref } from 'vue' | ... | @@ -126,6 +134,8 @@ import { ref } from 'vue' |
| 126 | import Taro from '@tarojs/taro' | 134 | import Taro from '@tarojs/taro' |
| 127 | import { IconFont } from '@nutui/icons-vue-taro'; | 135 | import { IconFont } from '@nutui/icons-vue-taro'; |
| 128 | 136 | ||
| 137 | +const emit = defineEmits(["onPay"]); | ||
| 138 | + | ||
| 129 | const end = ref(Date.now() + 60 * 1000); | 139 | const end = ref(Date.now() + 60 * 1000); |
| 130 | const resetTime = ref({ | 140 | const resetTime = ref({ |
| 131 | m: '00', | 141 | m: '00', |
| ... | @@ -156,12 +166,15 @@ const cancelOrder = (id) => { | ... | @@ -156,12 +166,15 @@ const cancelOrder = (id) => { |
| 156 | } | 166 | } |
| 157 | }) | 167 | }) |
| 158 | } | 168 | } |
| 169 | +const visible = ref(false); | ||
| 159 | const payOrder = (id) => { | 170 | const payOrder = (id) => { |
| 160 | - Taro.showToast({ | 171 | + emit("onPay", id); |
| 161 | - title: '支付已超时', | 172 | + // visible.value = !visible.value; |
| 162 | - icon: 'error', | 173 | + // Taro.showToast({ |
| 163 | - duration: 2000 | 174 | + // title: '支付已超时', |
| 164 | - }); | 175 | + // icon: 'error', |
| 176 | + // duration: 2000 | ||
| 177 | + // }); | ||
| 165 | } | 178 | } |
| 166 | </script> | 179 | </script> |
| 167 | 180 | ... | ... |
| 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 12:46:49 | 4 | + * @LastEditTime: 2023-12-18 16:20:57 |
| 5 | * @FilePath: /meihuaApp/src/pages/my/index.vue | 5 | * @FilePath: /meihuaApp/src/pages/my/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -27,7 +27,7 @@ | ... | @@ -27,7 +27,7 @@ |
| 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 | - <order-card :key="index"></order-card> | 30 | + <order-card :key="index" @onPay="onPay"></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> |
| ... | @@ -36,6 +36,14 @@ | ... | @@ -36,6 +36,14 @@ |
| 36 | </nut-tabs> | 36 | </nut-tabs> |
| 37 | </view> | 37 | </view> |
| 38 | </view> | 38 | </view> |
| 39 | + <nut-action-sheet v-model:visible="visible" title=""> | ||
| 40 | + <view style="padding: 2rem 1rem; text-align: center;"> | ||
| 41 | + <view style="font-size: 32rpx;">实付金额</view> | ||
| 42 | + <view style="color: red; margin: 10rpx 0;"><text style="font-size: 50rpx;">¥</text><text style="font-size: 80rpx;">980</text></view> | ||
| 43 | + <view style="font-size: 28rpx; margin-bottom: 20rpx;">支付剩余时间 <text style="color: red;">29:59</text></view> | ||
| 44 | + <nut-button block color="#6A4925" @tap="goToPay">立即支付</nut-button> | ||
| 45 | + </view> | ||
| 46 | + </nut-action-sheet> | ||
| 39 | <nav-bar activated="my" /> | 47 | <nav-bar activated="my" /> |
| 40 | </view> | 48 | </view> |
| 41 | </template> | 49 | </template> |
| ... | @@ -60,7 +68,24 @@ const tabList = ref([{ | ... | @@ -60,7 +68,24 @@ const tabList = ref([{ |
| 60 | }, { | 68 | }, { |
| 61 | title: '已取消', | 69 | title: '已取消', |
| 62 | key: '3', | 70 | key: '3', |
| 63 | -}]) | 71 | +}]); |
| 72 | + | ||
| 73 | +const visible = ref(false); | ||
| 74 | +const onPay = (id) => { | ||
| 75 | + visible.value = !visible.value; | ||
| 76 | + console.warn(id); | ||
| 77 | + // Taro.showToast({ | ||
| 78 | + // title: '支付已超时', | ||
| 79 | + // icon: 'error', | ||
| 80 | + // duration: 2000 | ||
| 81 | + // }); | ||
| 82 | +} | ||
| 83 | +const goToPay = () => { | ||
| 84 | + visible.value = false; | ||
| 85 | + Taro.navigateTo({ | ||
| 86 | + url: '/pages/payInfo/index?id=123', | ||
| 87 | + }); | ||
| 88 | +} | ||
| 64 | </script> | 89 | </script> |
| 65 | 90 | ||
| 66 | <script> | 91 | <script> | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2023-12-15 14:03:40 | 2 | * @Date: 2023-12-15 14:03:40 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-12-15 14:04:06 | 4 | + * @LastEditTime: 2023-12-18 16:54:46 |
| 5 | * @FilePath: /meihuaApp/src/pages/payInfo/index.vue | 5 | * @FilePath: /meihuaApp/src/pages/payInfo/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | - <div class="red">{{ str }}</div> | 9 | + <view class="pay-info-page"> |
| 10 | + <view style="display: flex; align-items: center; justify-content: center; flex-direction: column; margin-top: 3rem;"> | ||
| 11 | + <image style="width: 8rem; height: 8rem; border-radius: 10rpx;" mode="aspectFill" src="https://cdn.ipadbiz.cn/meihua/edit-icon.png" /> | ||
| 12 | + <div style="margin-top: 1rem; text-align: center; color: #6A4925; font-size: 35rpx;"> | ||
| 13 | + <view>您的订单提交成功,</view> | ||
| 14 | + <view> 期待您的入住!</view> | ||
| 15 | + </div> | ||
| 16 | + </view> | ||
| 17 | + </view> | ||
| 10 | </template> | 18 | </template> |
| 11 | 19 | ||
| 12 | <script setup> | 20 | <script setup> |
| 13 | import Taro from '@tarojs/taro' | 21 | import Taro from '@tarojs/taro' |
| 14 | -import { ref } from "vue"; | 22 | +import { ref, onMounted } from "vue"; |
| 23 | + | ||
| 24 | +onMounted(() => { | ||
| 25 | + setTimeout(() => { | ||
| 26 | + Taro.redirectTo({ | ||
| 27 | + url: '/pages/my/index', | ||
| 28 | + }) | ||
| 29 | + }, 2000); | ||
| 30 | +}) | ||
| 15 | </script> | 31 | </script> |
| 16 | 32 | ||
| 17 | <script> | 33 | <script> |
| 18 | import "./index.less"; | 34 | import "./index.less"; |
| 19 | export default { | 35 | export default { |
| 20 | - name: "demoPage", | 36 | + name: "payInfoPage", |
| 21 | }; | 37 | }; |
| 22 | </script> | 38 | </script> | ... | ... |
-
Please register or login to post a comment