baodeng_xcx/pages/nearbystores/index.vue
2025-08-19 17:02:49 +08:00

575 lines
13 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="page">
<u-navbar title="订单详情" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36' height='45'
back-icon-color='#fff'></u-navbar>
<view class="jiaoyi">
<view class="pic">
<image src="https://api.ccttiot.com/smartmeter/img/static/uWrJccOpg5kcTZ0xRxkH" mode=""></image>
<text v-if="orderobj.status == 'FINISHED'">交易成功</text>
<text v-if="orderobj.status == 'WAIT PAY'">交易取消</text>
<text v-if="orderobj.status == 'CANCELED'">交易取消</text>
<text v-if="orderobj.status == 'REFUNDED'">交易成功</text>
<text v-if="orderobj.status == 'WAIT_PAY'">待支付</text>
</view>
<view class="gx">
<text>感谢您的支持,欢迎再次光临</text>
</view>
</view>
<view class="ordermx">
<view class="top">
订单信息
</view>
<view class="xuxian">
<view class="one">
<view class="qian">
订单编号
</view>
<view class="shen">
{{orderobj.orderNo == null ? '--' : orderobj.orderNo}}
<image src="https://api.ccttiot.com/smartmeter/img/static/uimYURcxkn9ItLquwPpM" mode=""></image>
</view>
</view>
<view class="one">
<view class="qian">
下单时间
</view>
<view class="shen">
{{orderobj.createTime == null ? '--' : orderobj.createTime}}
</view>
</view>
</view>
<view class="xuxian">
<view class="one">
<view class="qian">
支付类型
</view>
<view class="shen">
{{orderobj.channelName == null ? '--' : orderobj.channelName}}
</view>
</view>
<view class="one">
<view class="qian">
订单类型
</view>
<view class="shen" style="color: #FF8998;">
{{txt}}
</view>
</view>
</view>
<view class="xuxian" style="border: 0;">
<view class="one">
<view class="qian">
店铺名称
</view>
<view class="shen">
{{orderobj.storeName == null ? '--' : orderobj.storeName}}
</view>
</view>
<view class="one">
<view class="qian">
详细地址
</view>
<view class="shen">
{{orderobj.address == null ? '--' : orderobj.address}}
</view>
</view>
<view class="one" v-if="txt == '爆灯次数订单'">
<view class="qian">
爆灯次数
</view>
<view class="shen">
{{orderobj.suitNum == null ? '--' : orderobj.suitNum}}次
</view>
</view>
<view class="one">
<view class="qian">
商品总额
</view>
<view class="shen" style="color: #FF8998;" v-if="txt == '爆灯次数订单'">
¥{{orderobj.suitAmount == null ? '--' : orderobj.suitAmount}}
</view>
<view class="shen" style="color: #FF8998;" v-if="txt == '余额充值订单'">
¥{{orderobj.rechargeAmount == null ? '--' : orderobj.rechargeAmount}}
</view>
<view class="shen" style="color: #FF8998;" v-if="txt == '商品购买订单'">
¥{{orderobj.originalAmount == null ? '--' : orderobj.originalAmount}}
</view>
</view>
<view class="one" v-if="txt == '余额充值订单'">
<view class="qian">
赠送金额
</view>
<view class="shen">
{{orderobj.giftedAmount == null ? '--' : orderobj.giftedAmount}}元
</view>
</view>
<view class="one" v-if="txt == '商品购买订单'">
<view class="qian">
优惠金额
</view>
<view class="shen">
{{orderobj.discountedAmount == null ? '--' : orderobj.discountedAmount}}元
</view>
</view>
<view class="one">
<view class="qian">
实付金额
</view>
<view class="shen" style="color: #FF8998;" v-if="txt == '爆灯次数订单'">
¥{{orderobj.payedAmount == null ? '--' : orderobj.payedAmount}}
</view>
<view class="shen" style="color: #FF8998;" v-if="txt == '余额充值订单'">
¥{{orderobj.rechargeAmount == null ? '--' : orderobj.rechargeAmount}}
</view>
<view class="shen" style="color: #FF8998;" v-if="txt == '商品购买订单'">
¥{{orderobj.payAmount == null ? '--' : orderobj.payAmount}}
</view>
</view>
</view>
</view>
<!-- 购买商品列表 -->
<view class="goods-list" v-if="txt == '商品购买订单'">
<view class="goods-item" v-for="item in orderobj.goodsOrderSkuVOList" :key="item.id">
<image class="goods-img" :src="item.picture" mode="aspectFill"></image>
<view class="goods-info">
<view class="goods-title">{{ item.goodsName }}</view>
<view class="goods-spec">
规格:
<text v-if="item.specValue && item.specValue.length > 0">
{{ item.specValue.map(s => s.value).join('、') }}
</text>
<text v-else>--</text>
</view>
<view class="goods-qty">数量x{{ item.number }}</view>
<view class="goods-amount">¥{{ item.actualAmount }}</view>
</view>
</view>
</view>
<view class="kefu" @click="btntel">
联系客服
</view>
<!-- 平台客服弹窗 -->
<view class="kefutc" v-if="kefuflag">
<image src="https://api.ccttiot.com/smartmeter/img/static/umtjJg2CJLiOS6hfAEzo" mode=""
@click="kefuflag = false"></image>
<view class="box">
<view class="" style="max-height: 280rpx;overflow: scroll;">
<view class="top" v-for="(item,index) in kefulist" :key="index">
<view class="dianhua">
{{item.name == null ? '--' : item.name}}{{item.contact == null ? '--' : item.contact}}
<view class="wz">
工作时间{{item.startTime}}~{{item.endTime}}
</view>
</view>
<view class="boda" @click.stop="btnptkf(item.contact)">
<u-icon name="phone-fill" color="#4297F3" size="28"></u-icon>
<text>拨打</text>
</view>
</view>
</view>
<view class="bot">
<view class="wzs">
客服电话高峰期可能遇忙请耐心等待
</view>
</view>
</view>
</view>
<view class="mask" v-if="kefuflag"></view>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: "#010000",
},
id: 0,
info: {},
rideDuration: '', // 新增属性用于存储骑行时间
kefulist: [],
kefuflag: false,
orderid: '',
orderobj: {},
txt: ''
}
},
onLoad(e) {
this.orderid = e.orderid
if (e.navindex == 0) {
this.getxq()
this.txt = '爆灯次数订单'
} else if (e.navindex == 1) {
this.getcz()
this.txt = '余额充值订单'
} else if (e.navindex == 2) {
this.getgm()
this.txt = '商品购买订单'
}
},
methods: {
// 请求爆灯次数订单详情
getxq() {
this.$u.get(`/app/order/orderDetail/${this.orderid}`).then(res => {
if (res.code == 200) {
this.orderobj = res.data
}
})
},
// 请求充值余额订单详情
getcz() {
this.$u.get(`/app/rechargeOrder/rechargeOrderDetail/${this.orderid}`).then(res => {
if (res.code == 200) {
this.orderobj = res.data
}
})
},
// 请求购买商品订单详情
getgm() {
this.$u.get(`/app/goodsOrder/goodsOrderDetail?id=${this.orderid}`).then(res => {
if (res.code == 200) {
this.orderobj = res.data
}
})
},
// 点击拨打电话 联系客服
btntel() {
if (this.orderobj.mchPhone) {
uni.makePhoneCall({
phoneNumber: this.orderobj.mchPhone,
success: function(res) {
console.log('拨打电话成功', res)
},
fail: function(err) {
console.error('拨打电话失败', err)
}
})
} else {
uni.showToast({
title: '暂无客服电话',
icon: 'none',
duration: 2000
})
}
}
}
}
</script>
<style lang="scss">
page {
background-color: #010000;
}
.kefutc {
animation: fadeIn 0.5s ease-in-out forwards;
position: fixed;
top: 660rpx;
left: 50%;
transform: translateX(-50%);
z-index: 10;
.bot {
margin-top: 30rpx;
.wz {
margin-top: 10rpx;
font-weight: 600;
font-size: 28rpx;
color: #3D3D3D;
}
.wzs {
margin-top: 10rpx;
font-size: 24rpx;
color: #7C7C7C;
}
}
.top {
width: 538rpx;
height: 122rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.1);
border-radius: 14rpx 14rpx 14rpx 14rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding-right: 14rpx;
box-sizing: border-box;
margin-top: 20rpx;
.dianhua {
font-weight: 600;
font-size: 28rpx;
color: #3D3D3D;
padding-left: 26rpx;
box-sizing: border-box;
}
.boda {
width: 94rpx;
height: 94rpx;
background: #DCEDFF;
border-radius: 8rpx 8rpx 8rpx 8rpx;
text-align: center;
padding-top: 8rpx;
box-sizing: border-box;
text {
display: block;
}
}
}
image {
position: absolute;
top: -280rpx;
z-index: -1;
left: 50%;
transform: translateX(-50%);
width: 614rpx;
height: 748rpx;
}
}
.mask {
width: 100%;
height: 100vh;
position: fixed;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.3);
z-index: 9;
}
.page {
width: 750rpx;
background: #010000;
border-radius: 0rpx 0rpx 0rpx 0rpx;
padding-bottom: 200rpx;
box-sizing: border-box;
.kefu {
width: 680rpx;
height: 100rpx;
line-height: 100rpx;
background-color: #202020;
color: #FF8998;
font-size: 36rpx;
font-weight: 600;
text-align: center;
position: fixed;
left: 50%;
transform: translateX(-50%);
bottom: 50rpx;
border-radius: 20rpx;
}
.qixing {
width: 702rpx;
height: 466rpx;
background: #FFFFFF;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 0 42rpx;
box-sizing: border-box;
margin: auto;
margin-top: 32rpx;
.top {
font-weight: 600;
font-size: 32rpx;
color: #3D3D3D;
padding: 36rpx 0 24rpx 0;
box-sizing: border-box;
border-bottom: 1px dashed #D8D8D8;
}
.xuxian {
.one {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 30rpx;
.qian {
color: #808080;
font-size: 28rpx;
}
.shen {
color: #3D3D3D;
}
}
}
}
.ordermx {
width: 702rpx;
max-height: 1862rpx;
background: #202020;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 0 42rpx;
box-sizing: border-box;
margin: auto;
margin-top: 32rpx;
.xuxian {
padding-bottom: 24rpx;
box-sizing: border-box;
border-bottom: 1px dashed #676767;
.one {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 30rpx;
.qian {
color: #9F9F9F;
font-size: 28rpx;
}
.shen {
color: #fff;
image {
width: 23rpx;
height: 28rpx;
vertical-align: baseline;
margin-left: 10rpx;
}
}
}
}
.top {
font-weight: 600;
font-size: 32rpx;
color: #fff;
padding: 36rpx 0 24rpx 0;
box-sizing: border-box;
border-bottom: 1px dashed #676767;
}
}
.jiaoyi {
width: 702rpx;
height: 182rpx;
background: #202020;
border-radius: 16rpx 16rpx 16rpx 16rpx;
margin: auto;
text-align: center;
margin-top: 26rpx;
.pic {
padding-top: 34rpx;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
image {
width: 38rpx;
height: 38rpx;
margin-right: 10rpx;
}
font-weight: 600;
font-size: 40rpx;
color: #FF8998;
}
.gx {
font-size: 28rpx;
color: #808080;
margin-top: 20rpx;
}
}
}
.goods-list {
margin: 32rpx auto 0;
width: 702rpx;
background: #202020;
border-radius: 16rpx;
padding: 12rpx 0;
.goods-item {
display: flex;
align-items: stretch;
padding: 12rpx 24rpx;
border-bottom: 1px solid #333;
min-height: 80rpx;
position: relative;
&:last-child {
border-bottom: none;
}
.goods-img {
width: 72rpx;
height: 72rpx;
border-radius: 8rpx;
background: #fff;
margin-right: 16rpx;
flex-shrink: 0;
align-self: flex-start;
margin-top: 10rpx;
}
.goods-info {
flex: 1;
color: #fff;
display: flex;
flex-direction: column;
justify-content: flex-start;
min-height: 72rpx;
position: relative;
.goods-title {
font-size: 28rpx;
font-weight: 600;
line-height: 36rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 0rpx;
}
.goods-spec {
font-size: 22rpx;
color: #bbb;
line-height: 28rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 0rpx;
}
.goods-qty {
font-size: 22rpx;
color: #bbb;
line-height: 28rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 0rpx;
}
.goods-amount {
position: absolute;
right: 0;
bottom: 0;
color: #FF8998;
font-weight: 600;
font-size: 24rpx;
line-height: 32rpx;
background: transparent;
}
}
}
}
</style>