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-25 12:52:08 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
401b1ee06c70f7fc0c87e48a4d228174851649d1
401b1ee0
1 parent
6f99b5b5
价格显示优化
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
60 additions
and
24 deletions
components.d.ts
src/components/orderCard.vue
src/components/payCard.vue
src/components/roomCard.vue
src/pages/confirm/index.less
src/pages/confirm/index.vue
src/pages/detail/index.less
src/pages/detail/index.vue
components.d.ts
View file @
401b1ee
...
...
@@ -22,6 +22,7 @@ declare module '@vue/runtime-core' {
NutInput
:
typeof
import
(
'@nutui/nutui-taro'
)[
'Input'
]
NutInputNumber
:
typeof
import
(
'@nutui/nutui-taro'
)[
'InputNumber'
]
NutPopup
:
typeof
import
(
'@nutui/nutui-taro'
)[
'Popup'
]
NutPrice
:
typeof
import
(
'@nutui/nutui-taro'
)[
'Price'
]
NutRadio
:
typeof
import
(
'@nutui/nutui-taro'
)[
'Radio'
]
NutRadioGroup
:
typeof
import
(
'@nutui/nutui-taro'
)[
'RadioGroup'
]
NutRow
:
typeof
import
(
'@nutui/nutui-taro'
)[
'Row'
]
...
...
src/components/orderCard.vue
View file @
401b1ee
...
...
@@ -18,8 +18,8 @@
<nut-row>
<nut-col span="18">
<view class="order-card-price-text">
<text class="left"><
text style="font-size: 30rpx;">¥</text>980
</text>
<text class="right">
¥1280
</text>
<text class="left"><
nut-price :price="980" size="normal" />
</text>
<text class="right">
<nut-price :price="1280" size="small" strike-through style="color: #7D7C7C;" />
</text>
</view>
</nut-col>
<nut-col span="6" class="order-card-price-num">
...
...
src/components/payCard.vue
View file @
401b1ee
<!--
* @Date: 2023-12-20 14:11:11
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-2
0 16:25:26
* @LastEditTime: 2023-12-2
5 07:08:02
* @FilePath: /meihuaApp/src/components/payCard.vue
* @Description: 文件描述
-->
...
...
@@ -97,6 +97,38 @@ const goToPay = () => {
Taro.navigateTo({
url: '/pages/payInfo/index?id=123',
});
// this.$parent.sdk.post('c/app/prepay', {
// id: this.params.id
// }).then(res => {
// if (res.data.ret === 'OK') {
// let pay = res.data.content.payargs;
// wx.requestPayment({
// timeStamp: pay.timeStamp,
// nonceStr: pay.nonceStr,
// package: pay.package,
// signType: pay.signType,
// paySign: pay.paySign,
// success: (result) => {
// that.$parent.sdk.post('c/order/paySuccess', {
// id: that.params.id
// }).then(pRes => {
// if (pRes.data.ret === 'OK') {
// that.Toast('success', '感谢您的捐赠', 3000)
// wx.navigateBack({
// delta: 1
// });
// } else {
// that.Toast('fail', pRes.data.err, 3000);
// }
// }).catch(err => {
// console.error(err)
// })
// }
// });
// } else {
// this.Toast('fail', res.data.msg, 3000);
// }
// })
}
</script>
...
...
src/components/roomCard.vue
View file @
401b1ee
<!--
* @Date: 2023-12-13 13:42:23
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-25 1
1:04:5
6
* @LastEditTime: 2023-12-25 1
2:49:4
6
* @FilePath: /meihuaApp/src/components/roomCard.vue
* @Description: 房间详情组件
-->
...
...
@@ -15,8 +15,8 @@
<view class="room-info-desc">两室 宜住3人</view>
</nut-col>
<nut-col span="6" class="room-info-right">
<view class="room-info-discount"><
text style="font-size: 25rpx;">¥</text>980
</view>
<view class="room-info-price">
¥1280
</view>
<view class="room-info-discount"><
nut-price :price="980" size="normal" />
</view>
<view class="room-info-price">
<nut-price :price="1280" size="small" strike-through style="color: #7D7C7C;" />
</view>
</nut-col>
</nut-row>
</view>
...
...
@@ -160,10 +160,6 @@ onMounted(() => {
}
.room-info-price {
float: right;
color: #7D7C7C;
// font-weight: bold;
font-size: 0.8rem;
text-decoration: line-through;
}
}
}
...
...
src/pages/confirm/index.less
View file @
401b1ee
...
...
@@ -150,10 +150,8 @@
font-weight: bold;
}
.price-text-right {
color: #7d7c7c;
text-decoration: line-through;
font-size: 0.85rem;
margin-left: 5px;
margin-left: 5rpx;
margin-top: 8rpx;
}
}
.confirm-btn {
...
...
src/pages/confirm/index.vue
View file @
401b1ee
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-25 1
0:57:42
* @LastEditTime: 2023-12-25 1
2:48:26
* @FilePath: /meihuaApp/src/pages/confirm/index.vue
* @Description: 确认订单页面
-->
...
...
@@ -130,8 +130,8 @@
<nut-row>
<nut-col :span="18">
<view class="price">
<
text class="price-text-left"><text style="font-size: 32rpx;">¥</text>{{ room_price_info.discount * book_count * booking_info.days }}</text
>
<
text class="price-text-right">¥{{ room_price_info.price * book_count * booking_info.days }}</text
>
<
view class="price-text-left"><nut-price :price="price_discount" size="large" /></view
>
<
view class="price-text-right"><nut-price :price="price_old" size="small" strike-through style="color: #7D7C7C;" /></view
>
</view>
</nut-col>
<nut-col :span="6">
...
...
@@ -145,7 +145,7 @@
<script setup>
import Taro from '@tarojs/taro'
import { ref, reactive, onMounted } from "vue";
import { ref, reactive, onMounted
, computed
} from "vue";
import { getCurrentPageParam } from "@/utils/weapp";
import { IconFont } from '@nutui/icons-vue-taro';
import payCard from '@/components/payCard.vue'
...
...
@@ -167,8 +167,16 @@ const booking_info = ref({
});
const room_price_info = ref({
discount: 980,
price: 1280,
discount: 980.18,
price: 1280.25,
});
const price_discount = computed(() => {
return ((room_price_info.value.discount * book_count.value * booking_info.value.days) * 100) / 100;
});
const price_old = computed(() => {
return ((room_price_info.value.price * book_count.value * booking_info.value.days) * 100) / 100;
});
const book_count = ref(1); // 预定房间数
...
...
src/pages/detail/index.less
View file @
401b1ee
...
...
@@ -48,7 +48,8 @@
color: #EB2E2E; font-size: 1.3rem; font-weight: bold;
}
.old-price {
color: #7D7C7C; text-decoration: line-through; font-size: 0.85rem; margin-left: 5px;
margin-left: 5rpx;
margin-top: 8rpx;
}
}
.book-btn {
...
...
src/pages/detail/index.vue
View file @
401b1ee
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-25 1
0:56:14
* @LastEditTime: 2023-12-25 1
2:42:48
* @FilePath: /meihuaApp/src/pages/detail/index.vue
* @Description: 房间详情页面
-->
...
...
@@ -30,8 +30,8 @@
<nut-row>
<nut-col :span="18">
<view class="book-price">
<
text class="price"><text style="font-size: 32rpx;">¥</text>980</text
>
<
text class="old-price">¥1280</text
>
<
view class="price"><nut-price :price="980" size="large" /></view
>
<
view class="old-price"><nut-price :price="1280" size="small" strike-through style="color: #7D7C7C;" /></view
>
</view>
</nut-col>
<nut-col :span="6">
...
...
Please
register
or
login
to post a comment