| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476 |
- <template>
- <view class="container">
- <!-- 顶部订单状态信息区域 -->
- <view class="header">
- <!-- 背景图片区域 -->
- <img src="../../static/my/headerImg.png" />
- <!-- 标题区域 -->
- <view class="header_title">订单详情</view>
- <!-- 返回图标区域 -->
- <img class="header_icon" src="../../static/index/left.png" @click="handleBack" />
- <view class="header_type">已支付</view>
- <view class="header_info">订单号:2307311449380724</view>
- <view class="header_type" v-if="type === '1'">代付款</view>
- <view class="header_info" v-if="type === '1'">超时后,订单将会自动取消</view>
- <view class="header_type" v-if="type === '2'">支付超时</view>
- <view class="header_info" v-if="type === '2'">订单已超过可支付时间,请重新下单</view>
- <view class="header_type" v-if="type === '3'">已支付</view>
- <view class="header_info" v-if="type === '3'">订单已支付,请等待商家接单</view>
- <view class="header_type" v-if="type === '4'">已取消</view>
- <view class="header_info" v-if="type === '4'">订单已取消,请重新下单</view>
- <view class="header_type" v-if="type === '5'">已退单</view>
- <view class="header_info" v-if="type === '5'">订单已被商家退单,请重新下单</view>
- <view class="header_type" v-if="type === '6'">待入住</view>
- <view class="header_info" v-if="type === '6'">订单已被商家接单,请前往办理入住</view>
- <view class="header_type" v-if="type === '7'">已入住</view>
- <view class="header_info" v-if="type === '7'">订单已办理入住</view>
- <view class="header_type" v-if="type === '8'">已退款</view>
- <view class="header_info" v-if="type === '8'">订单已退款</view>
- <view class="header_type" v-if="type === '9'">已消费</view>
- <view class="header_info" v-if="type === '9'">您的订单已消费,期待您再次预定哦</view>
- </view>
- <!-- 主体内容区域 -->
- <view class="body">
- <!-- 房型信息和用户信息区域 -->
- <view class="body_box2">
- <view class="info_time">
- 7月26日
- <text class="gap">今天</text>
- <view class="time_line"></view>
- <view class="time_num">1晚</view>
- <view class="time_line"></view>
- <view class="gap">7月26日</view>
- <text>明天</text>
- </view>
- <view class="info_msg">大床房</view>
- <view class="info_type">
- <view class="type_item">包吃住型</view>
- <view class="type_item">包吃住型</view>
- <view class="type_item">包吃住型</view>
- </view>
- <view class="info_tag">
- <view class="tag_item">16-20㎡</view>
- <view class="tag_item">双人床</view>
- <view class="tag_item">窗户位于走廊/窗户较小</view>
- </view>
- <view class="info_box">
- <view class="box_key">住客姓名</view>
- <view class="box_value">张三</view>
- </view>
- <view class="info_box">
- <view class="box_key">联系电话</view>
- <view class="box_value">13677985689</view>
- </view>
- <view class="info_box">
- <view class="box_key">预计到店</view>
- <view class="box_value">7月26日14:00之前</view>
- </view>
- </view>
- <!-- 费用信息区域 -->
- <view class="body_box">
- <view class="box_title">费用信息</view>
- <view class="box_container">
- <view class="container_key">在线支付</view>
- <view class="container_value price">¥280</view>
- </view>
- <view class="box_container">
- <view class="container_key">发票报销</view>
- <view class="container_value">如需发票,请先与酒店确认</view>
- </view>
- </view>
- <!-- 按钮区域 -->
- <view class="body_btn">
- <view class="btn_item type">退单</view>
- <view class="btn_item type2">接单</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- // 订单类型
- type: null
- }
- },
- onLoad(options) {
- this.type = options.type
- },
- methods: {
- // 点击复制文字回调
- handleCopy(text) {
- uni.setClipboardData({
- data: text,
- success: () => {}
- })
- },
- handleBack() {
- uni.navigateBack(1)
- },
- // 点击地图/导航文字回调
- handleMap() {
- uni.openLocation({
- latitude: 28.86054,
- longitude: 115.361744,
- name: '',
- address: '靖安县---详细地址',
- success: () => {}
- })
- },
- // 点击联系商家文字回调
- handlePhone(phone) {
- uni.makePhoneCall({
- phoneNumber: phone
- })
- },
- // 点击去支付按钮回调
- handlePay() {
- uni.navigateTo({
- url: '/pages/pay/pay'
- })
- },
- // 点击取消订单按钮回调
- handleCancel() {
- uni.showModal({
- title: '提示',
- content: '确定取消该订单吗?',
- success: (res) => {
- if (res.confirm) {
- uni.showToast({
- title: '取消成功',
- icon: 'success'
- })
- setTimeout(() => {
- uni.redirectTo({
- url: '/pages/orderManage/orderManage'
- })
- }, 1500)
- }
- }
- })
- },
- // 点击再次预定按钮回调
- handleAgain() {
- uni.navigateTo({
- url: '/pages/detail/detail'
- })
- },
- // 点击删除订单按钮回调
- handleDelete() {
- uni.showModal({
- title: '提示',
- content: '确定删除该订单吗?',
- success: (res) => {
- if (res.confirm) {
- uni.showToast({
- title: '删除成功',
- icon: 'success'
- })
- setTimeout(() => {
- uni.redirectTo({
- url: '/pages/orderManage/orderManage'
- })
- }, 1500)
- }
- }
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .container {
- position: relative;
- height: 100vh;
- background-color: #f2f2f2;
- .header {
- height: 480rpx;
- color: #fff;
- img {
- width: 100%;
- }
- .header_title {
- position: absolute;
- top: 65rpx;
- left: 308rpx;
- color: #fff;
- font-size: 28rpx;
- }
- .header_icon {
- position: absolute;
- top: 76rpx;
- left: 10rpx;
- width: 47rpx;
- height: 47rpx;
- }
- .header_type {
- position: absolute;
- top: 144rpx;
- left: 30rpx;
- font-size: 40rpx;
- font-weight: bold;
- }
- .header_info {
- position: absolute;
- top: 215rpx;
- left: 30rpx;
- font-size: 24rpx;
- }
- }
- .body {
- position: absolute;
- top: 278rpx;
- left: 0;
- right: 0;
- box-sizing: border-box;
- padding: 20rpx;
- height: calc(100vh - 278rpx);
- border-radius: 20rpx 20rpx 0 0;
- background-color: #ebeced;
- overflow-y: auto;
- .body_box {
- box-sizing: border-box;
- padding: 0 30rpx;
- margin-bottom: 20rpx;
- display: flex;
- flex-direction: column;
- height: 240rpx;
- border-radius: 14rpx;
- background-color: #fff;
- .box_title {
- line-height: 90rpx;
- font-size: 28rpx;
- font-weight: bold;
- border-bottom: 1rpx solid #e5e5e5;
- }
- .box_container {
- display: flex;
- margin-top: 25rpx;
- font-size: 28rpx;
- .container_key {
- width: 160rpx;
- color: #808080;
- }
- .container_value {
- }
- .container_copy {
- margin-left: auto;
- color: #096562;
- }
- .price {
- color: #ff5733;
- }
- }
- .box_info {
- display: flex;
- margin-top: 20rpx;
- height: 130rpx;
- img {
- width: 100rpx;
- height: 100rpx;
- border-radius: 10rpx;
- }
- .info_msg {
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- margin-top: -10rpx;
- margin-left: 18rpx;
- width: 540rpx;
- .msg_name {
- font-size: 28rpx;
- font-weight: bold;
- }
- .msg_address {
- color: #808080;
- font-size: 24rpx;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- }
- }
- }
- .box_btn {
- display: flex;
- justify-content: space-around;
- align-items: center;
- height: 110rpx;
- .btn_item {
- display: flex;
- align-items: center;
- width: 200rpx;
- .img {
- margin-right: 14rpx;
- width: 38rpx;
- height: 38rpx;
- }
- .img2 {
- width: 66rpx;
- height: 66rpx;
- }
- }
- }
- }
- .body_box2 {
- display: flex;
- flex-direction: column;
- box-sizing: border-box;
- padding: 0 30rpx;
- margin-bottom: 20rpx;
- height: 478rpx;
- border-radius: 15rpx;
- background-color: #fff;
- .info_time {
- display: flex;
- align-items: center;
- margin-top: 20rpx;
- font-size: 32rpx;
- font-weight: bold;
- .time_line {
- width: 17rpx;
- height: 1rpx;
- background-color: #096562;
- }
- .time_num {
- box-sizing: border-box;
- padding: 0 15rpx;
- height: 46rpx;
- line-height: 46rpx;
- font-size: 24rpx;
- font-weight: 400;
- border-radius: 66rpx;
- border: 1rpx solid #096562;
- background-color: #f0f2f5;
- }
- .gap {
- margin: 0 10rpx;
- }
- text {
- font-size: 24rpx;
- font-weight: 400;
- }
- }
- .info_msg {
- margin-top: 15rpx;
- font-size: 28rpx;
- font-weight: bold;
- }
- .info_type {
- display: flex;
- flex-wrap: wrap;
- margin-top: 15rpx;
- .type_item {
- box-sizing: border-box;
- padding: 0 15rpx;
- margin-right: 20rpx;
- height: 41rpx;
- line-height: 41rpx;
- font-size: 24rpx;
- color: #fff;
- border-radius: 34rpx;
- background-color: #096562;
- }
- }
- .info_tag {
- display: flex;
- flex-wrap: wrap;
- margin: 18rpx 0 0;
- box-sizing: border-box;
- padding-bottom: 30rpx;
- color: #808080;
- font-size: 24rpx;
- border-bottom: 1rpx solid #e5e5e5;
- .tag_item {
- margin-right: 20rpx;
- }
- }
- .info_box {
- display: flex;
- margin-top: 23rpx;
- font-size: 28rpx;
- .box_key {
- width: 160rpx;
- color: #808080;
- }
- .box_value {
- }
- }
- }
- .body_btn {
- box-sizing: border-box;
- padding: 0 32rpx;
- margin-top: 140rpx;
- display: flex;
- justify-content: space-between;
- height: 96rpx;
- .btn_item {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 300rpx;
- height: 96rpx;
- border-radius: 64rpx;
- font-size: 32rpx;
- }
- .type {
- color: #d43030;
- border: 1rpx solid #d43030;
- }
- .type2 {
- color: #fff;
- background-color: #096562;
- }
- }
- }
- }
- </style>
|