Compare commits

..

14 Commits

Author SHA1 Message Date
赵毅
81298faedc 优化订单详情页面的部分逻辑 2025-09-13 18:03:28 +08:00
赵毅
a64939a86a 修改点击查询停车费的页面展示逻辑 2025-09-13 17:57:23 +08:00
赵毅
07ffe842bd 订单列表页面添加供应商的显示 2025-09-13 17:54:42 +08:00
赵毅
db78fe36b0 修改停车订单页面删除最后一条数据后造成的bug 2025-09-13 11:58:45 +08:00
赵毅
849d6149bb 修改停车订单页面数据不显示的bug 2025-09-13 11:56:08 +08:00
赵毅
9e664e1a21 修改临停订单可以重复支付的bug 2025-09-13 11:14:36 +08:00
赵毅
1b552b84d2 11 2025-09-13 10:51:36 +08:00
赵毅
42a5f23564 添加湖畔社区进入小区的作用范围 2025-09-13 10:50:33 +08:00
赵毅
ca4f9cd388 取消湖畔到家页面的跳转 2025-09-13 10:46:20 +08:00
赵毅
6e40c84b89 根据后台配置的免费出场时间显示 2025-09-13 10:41:50 +08:00
赵毅
058d2d4a60 添加月卡订单页面的去支付和取消订单 2025-09-13 10:41:29 +08:00
赵毅
c3ad7f9a37 隐藏月卡充值模块入口 2025-09-13 10:33:12 +08:00
赵毅
1f0de01c5b 完成复制订单编号 2025-09-13 10:32:48 +08:00
赵毅
f767c7109b 修改临停订单,只要没有支付成功都删除该订单 2025-09-13 10:32:03 +08:00
14 changed files with 407 additions and 136 deletions

View File

@ -121,6 +121,7 @@ page {
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
font-size: 26rpx;
}
.enter-btn {

View File

@ -3,11 +3,11 @@
<view class="community-list">
<view class="community-item-box" v-for="(item, index) in communityList" :key="index">
<view class="community-item">
<view class="community-image">
<view class="community-image" @tap="enterCommunity(item)">
<image :src="item.pic" mode="aspectFill"></image>
</view>
<view class="community-info">
<view class="community-name">{{ item.name }}</view>
<view class="community-name" @tap="enterCommunity(item)">{{ item.name }}</view>
<view class="community-property">物业公司{{ item.property || '-' }}</view>
<view class="community-distance">距我当前{{ item.distance || '未知' }}</view>
<view class="community-buttons">

View File

@ -254,21 +254,21 @@ export default {
methods: {
//
chooseLocation() {
uni.navigateTo({
url: "/packages/areaPopup/index",
});
// uni.navigateTo({
// url: "/packages/areaPopup/index",
// });
},
//
searchService() {
uni.navigateTo({
url: "/packages/homeServer/search/index",
});
// uni.navigateTo({
// url: "/packages/homeServer/search/index",
// });
},
//
navigateToService(item) {
uni.navigateTo({
url: "/packages/homeServer/classify/index",
});
// uni.navigateTo({
// url: "/packages/homeServer/classify/index",
// });
// uni.navigateTo({
// url: `/packages/homeServer/serverInfo/index?service=${encodeURIComponent(
// JSON.stringify(item)
@ -280,7 +280,7 @@ export default {
// uni.navigateTo({
// url: `/packages/homeServer/reservation/index?id=${service.id}&name=${service.name}`,
// });
NavgateTo("/packages/homeServer/searchInfo/index");
// NavgateTo("/packages/homeServer/searchInfo/index");
},
//
contactService() {
@ -304,7 +304,7 @@ export default {
//
lookNotice() {
NavgateTo("/packages/homeServer/noticeManage/index");
// NavgateTo("/packages/homeServer/noticeManage/index");
},
},
onLoad() {

View File

@ -59,9 +59,25 @@ page {
border-bottom: 1rpx solid #eee;
}
.orderTitle {
width: 100%;
font-size: 24rpx;
font-weight: bold;
}
.orderTitleSupplier {
font-size: 28rpx;
color: #333;
font-weight: bold;
margin-bottom: 10rpx;
display: flex;
justify-content: space-between;
}
.status {
color: #ff5252;
font-weight: bold;
font-size: 24rpx;
}
.status2 {
@ -71,6 +87,7 @@ page {
display: flex;
padding: 10rpx;
border-radius: 10rpx;
font-size: 24rpx;
}
.status2 img {
@ -82,6 +99,13 @@ page {
.status3 {
color: #949494;
font-weight: bold;
font-size: 24rpx;
}
.order_status{
color: #333;
font-weight: bold;
font-size: 24rpx;
}
.goods-list {

View File

@ -23,16 +23,20 @@
<view class="contentList">
<!-- 订单头部信息 -->
<view class="order-header" @click="toDetails(item)">
<text>提交订单{{ item.order_time }}</text>
<view v-if="item.order_status == 6 || item.order_status == 5" class="status3">{{
getOrderStatus(item.order_status) }}</view>
<view v-else-if="item.order_status == 7" class="status2">
<img src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/refund.png" />
{{ getOrderStatus(item.order_status) }}
<view class="orderTitle">
<view class="orderTitleSupplier">{{ item.supplier_name }}
<view v-if="item.order_status == 6 || item.order_status == 5" class="status3">{{
getOrderStatus(item.order_status) }}</view>
<view v-else-if="item.order_status == 7" class="status2">
<img src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/refund.png" />
{{ getOrderStatus(item.order_status) }}
</view>
<view v-else class="order_status">{{
getOrderStatus(item.order_status)
}}</view>
</view>
<text>提交订单{{ item.order_time }}</text>
</view>
<view v-else class="order_status">{{
getOrderStatus(item.order_status)
}}</view>
</view>
<!-- 商品列表 -->
@ -65,7 +69,7 @@
<view class="btn-group" v-if="item.order_status === 5">
<text class="afterSaleNum">{{ item.commodity_order_item_list.length }}笔售后</text>
<button class="cancel-btn" @click="afterSale(item)">退换/售后</button>
<button class="pay-btn" @click="cancelOrder">评价</button>
<button class="pay-btn">评价</button>
</view>
<view class="btn-group" v-if="item.order_status === 6">
<!-- <button class="cancel-btn" @click="orderEvaluate">

View File

@ -39,9 +39,9 @@
<!-- 订单金额 -->
<view class="amount-section">
<view v-if="status !== '退款中'">
<view class="total-amount">¥{{ orderInfo.payment_amount }}</view>
<view class="total-amount">¥{{ orderInfo.total_amount }}</view>
<view class="original-price">商品下单应付
<text> ¥{{ orderInfo.payment_amount }}</text>
<text> ¥{{ orderInfo.total_amount }}</text>
</view>
</view>
<view class="goods-item" v-for="(item, index) in orderInfo.commodity_order_item_list" :key="index">
@ -62,7 +62,7 @@
</view>
<view class="hr"></view>
<view class="info-item">
<view class="info-label1">下单总金额( ¥{{ orderInfo.orderAmount }} )</view>
<view class="info-label1">下单总金额( ¥{{ orderInfo.total_amount }} )</view>
<view class="info-action">明细</view>
</view>
<view class="info-item">
@ -134,7 +134,7 @@
</view>
<view class="bottom-buttons" v-if="status === '3'">
<!-- <button class="yfd-btn" @click="cancelOrder">运费单</button> -->
<button class="cancel-btn" @click="cancelOrder">取消订单</button>
<button class="cancel-btn" @click="applyRefund">申请退款</button>
<!-- <button class="pay-btn" @click="gotoPayment">立即支付</button> -->
</view>
<view class="bottom-buttons" v-if="status === '4'">
@ -143,14 +143,14 @@
<button class="pay-btn" @click="gotoPayment">立即支付</button>
</view>
<view class="bottom-buttons" v-if="status === '5'">
<button class="cancel-btn" @click="orderEvaluate">服务评价</button>
<!-- <button class="cancel-btn" @click="orderEvaluate">服务评价</button> -->
<!-- <button class="yfd-btn" @click="cancelOrder">运费单</button> -->
<button class="pay-btn" @click="gotoPayment">立即支付</button>
</view>
<view class="bottom-buttons" v-if="status === '6'">
<!-- <button class="yfd-btn" @click="cancelOrder">运费单</button> -->
<!-- <button class="cancel-btn" @click="cancelOrder">服务评价</button> -->
<button class="pay-btn" @click="gotoPayment">再来一单</button>
<!-- <button class="pay-btn" @click="gotoPayment">再来一单</button> -->
</view>
</view>
</view>
@ -158,7 +158,8 @@
</template>
<script>
import { picUrl, NavgateTo } from "../../../utils";
import { picUrl, NavgateTo, request } from "../../../utils";
import { apiArr as afterSaleApi } from "../../../api/afterSale";
export default {
data() {
@ -170,7 +171,6 @@ export default {
},
onLoad(options) {
const item = JSON.parse(options?.item);
console.log("🚀 ~ onLoad ~ item:", item)
//
item.order_status == "1" ? this.startCountdown() : "";
this.status = JSON.stringify(item.order_status);
@ -202,15 +202,71 @@ export default {
content: "确定要取消订单吗?",
success: (res) => {
if (res.confirm) {
// API
uni.showToast({ title: "订单已取消", icon: "none" });
setTimeout(() => uni.navigateBack(), 1500);
const params = {
order_id: this.orderInfo.id,
method: 1,
cancel_reason: '用户主动取消',
}
request(afterSaleApi.cancelOrConfirm, "POST", params).then((res) => {
uni.showToast({ title: "订单已取消", icon: "none" });
setTimeout(() => {
uni.navigateBack();
}, 1500);
});
}
},
});
},
// 退
applyRefund() {
uni.showModal({
title: "申请退款",
content: "确定要申请退款吗?",
success: (res) => {
if (res.confirm) {
const params = {
nick_name: uni.getStorageSync("nickName"),
order_id: this.orderInfo.id,
goods_ids: this.orderInfo.commodity_order_item_list.map(item => item.goods_id),
after_sales_type: 1,
after_sales_reason: '用户申请退款',
refund_amount: this.orderInfo.total_amount,
order_status: 3
}
request(afterSaleApi.afterSaleCreate, "POST", params).then((res) => {
uni.showToast({ title: "退款申请已提交", icon: "none" });
setTimeout(() => {
uni.navigateBack();
}, 1500);
});
}
}
});
},
//
confirmReceiving() {
uni.showModal({
title: "确认收货",
content: "确认收货后订单状态将变为【已完成】,如有售后需求可正常申请退款/售后,确定要确认收货吗?",
success: (res) => {
if (res.confirm) {
const params = {
order_id: this.orderInfo.id,
method: 2,
}
request(afterSaleApi.cancelOrConfirm, "POST", params).then((res) => {
uni.showToast({ title: "已确认收货", icon: "none" });
setTimeout(() => {
uni.navigateBack();
}, 1500);
});
}
},
});
},
gotoPayment() {
console.log("🚀 ~ gotoPayment ~ 去支付:");
//
// uni.navigateTo({
// url: "/kitchen/pay/index",

View File

@ -62,6 +62,11 @@ page{
background: linear-gradient(to right, #ffe7e7, #ffffff);
}
.copy-icon {
width: 30rpx;
height: 30rpx;
}
.order-number {
font-size: 26rpx;
color: #333;

View File

@ -12,6 +12,8 @@
<view v-for="(order, index) in orders" :key="index" class="order-card">
<view class="order-header">
<text class="order-number">订单编号{{ order.order_sn }}</text>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/copy.png" class="copy-icon"
@click="copyOrderNo(order.order_sn)" />
<text class="order-status" :class="{
'pending': order.status == 1,
'using': order.status == 2,
@ -59,7 +61,7 @@
</view>
<!-- 待支付订单显示操作按钮 -->
<view v-if="order.status === 'pending'" class="order-footer">
<view v-if="order.status == 1" class="order-footer">
<view class="cancel-button" @tap="cancelOrder(order)">取消订单</view>
<view class="pay-button" @tap="goToPayment(order)">去支付</view>
</view>
@ -104,6 +106,24 @@ export default {
}
},
methods: {
//
copyOrderNo(order_sn) {
uni.setClipboardData({
data: order_sn,
success: () => {
uni.showToast({
title: '复制成功',
icon: 'success'
});
},
fail: () => {
uni.showToast({
title: '复制失败',
icon: 'none'
});
}
});
},
selectTab(index, item) {
this.selectedTab = index;
this.getOrderList()
@ -114,7 +134,7 @@ export default {
},
//
goToPayment(order) {
NavgateTo('../parkOrderDetail/index');
NavgateTo('../parkOrderDetail/index?item=' + JSON.stringify(order));
},
//
getOrderList() {

View File

@ -7,8 +7,9 @@
<text class="park-name">{{ orderDetail.parking.parking_name }}</text>
</view>
<view class="status-right">
<image class="success-icon" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/park_orderOk.png"
mode="aspectFit"></image>
<image class="success-icon"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/park_orderOk.png" mode="aspectFit">
</image>
</view>
</view>
@ -30,7 +31,7 @@
<!-- 电商服务区域 -->
<view class="service-section">
<text class="section-title">电商服务</text>
<text class="section-title">订单信息</text>
<view class="info-item">
<text class="info-label">车牌号码</text>
@ -71,11 +72,11 @@
<script>
import {
isPhone,
picUrl,
request,
upload,
NavgateTo
isPhone,
picUrl,
request,
upload,
NavgateTo
} from '../../../utils';
import { apiArr } from '@/api/park.js'
@ -115,22 +116,22 @@ export default {
}
});
},
//
calculateParkingDuration() {
if (!this.orderDetail || !this.orderDetail.parking_record) {
return '0分钟';
}
const inTime = new Date(this.orderDetail.parking_record.in_time);
const outTime = new Date(this.orderDetail.parking_record.out_time);
//
const diffMs = outTime - inTime;
//
const diffMinutes = Math.floor(diffMs / (1000 * 60));
if (diffMinutes < 60) {
return `${diffMinutes}分钟`;
} else {
@ -145,9 +146,17 @@ export default {
}
},
onLoad(options) {
const order = options.order;
if (order) {
this.orderDetail = JSON.parse(order);
console.log("接收的原始参数:", options);
if (options && options.order) {
try {
//
const decodedOrder = decodeURIComponent(options.order);
this.orderDetail = JSON.parse(decodedOrder);
console.log("解析成功:", this.orderDetail);
} catch (err) {
console.error("解析失败:", err);
//
}
}
}
}

View File

@ -8,33 +8,36 @@
</view>
<!-- 订单列表 -->
<view class="order-item" v-for="order in monthGroup.orders" :key="order.id" @tap="viewOrderDetail(order)">
<view class="order-left">
<view class="order-type">
<view class="order-type1">
<image class="order-icon"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/park_p.png"
mode="aspectFit"></image>
<text class="order-type-text">停车</text>
<view v-if="orderData.length > 0">
<view class="order-item" v-for="order in monthGroup.orders" :key="order.id"
@tap="viewOrderDetail(order)">
<view class="order-left">
<view class="order-type">
<view class="order-type1">
<image class="order-icon"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/park_p.png"
mode="aspectFit"></image>
<text class="order-type-text">停车</text>
</view>
<text class="order-status">{{ order.status == 1 ? '待支付' : '已支付' }}</text>
</view>
<text class="order-status">{{ order.status == 1 ? '待支付' : '已支付' }}</text>
</view>
<view class="order-park-info">
<text class="order-park-name">{{ order.record_info.parking_info.parking_name }}</text>
<text class="order-amount">¥{{ order.amount.toFixed(2) }}</text>
</view>
<view class="order-park-info">
<text class="order-park-name">{{ order.record_info.parking_info.parking_name }}</text>
<text class="order-amount">¥{{ order.amount.toFixed(2) }}</text>
</view>
<view class="order-car-info">
<text class="order-car-number">{{ order.record_info.car_number }}</text>
<text class="order-car-type">{{ order.record_info.car_billing_type == 1 ? '月租车' :
(order.record_info.car_billing_type == 2) ? '临时车' : '贵宾车' }}</text>
</view>
<view class="order-car-info">
<text class="order-car-number">{{ order.record_info.car_number }}</text>
<text class="order-car-type">{{ order.record_info.car_billing_type == 1 ? '月租车' :
(order.record_info.car_billing_type == 2) ? '临时车' : '贵宾车' }}</text>
</view>
<text class="order-time">{{ order.pay_time }}</text>
</view>
<view class="delete-button" @tap.stop="deleteOrder(order)">
<u-icon name="trash" size="45rpx"></u-icon>
<text class="order-time">{{ order.pay_time }}</text>
</view>
<view class="delete-button" @tap.stop="deleteOrder(order)">
<u-icon name="trash" size="45rpx"></u-icon>
</view>
</view>
</view>
</view>
@ -69,7 +72,10 @@ export default {
methods: {
//
viewOrderDetail(order) {
NavgateTo('../orderDetail/index?order=' + JSON.stringify(order))
const orderStr = JSON.stringify(order);
// &?
const encodedOrder = encodeURIComponent(orderStr);
NavgateTo(`../orderDetail/index?order=${encodedOrder}`);
},
//
@ -89,9 +95,7 @@ export default {
icon: 'success',
duration: 2000
});
setTimeout(() => {
that.getOrderData();
}, 1000);
that.getOrderData();
})
}
}
@ -159,7 +163,7 @@ export default {
//
this.getOrderData();
},
//
onReachBottom() {
this.page_size += 10;

View File

@ -136,7 +136,49 @@ export default {
}
},
onLoad(options) {
this.itemObj = JSON.parse(decodeURIComponent(options.item));
const rawData = JSON.parse(decodeURIComponent(options.item));
// month_card_order_list
if (rawData.carInfo) {
// trans_type
// : 71, App: 51
const systemInfo = uni.getSystemInfoSync();
let trans_type = 51; // App
//
if (systemInfo.platform === 'devtools' || systemInfo.platform === 'unknown') {
trans_type = 71; //
}
//
// #ifdef MP
trans_type = 71; //
// #endif
// #ifdef APP-PLUS
trans_type = 51; // App
// #endif
this.itemObj = {
endTime: rawData.carInfo.deadline_time || '',
headerTitle: rawData.parkingInfo.parking_name || '',
monthCount: rawData.month_num || 0,
monthPrice: rawData.monthly_rental_fee || 0,
order_id: rawData.id || 0,
paymentAmount: rawData.amount || 0,
selectedBillingRule: rawData.billing_rule_id || '',
selectedCarPlate: rawData.carInfo.car_no || '',
selectedCarPlateId: rawData.carInfo.id || 0,
selectedParkId: rawData.parking_id || 0,
selectedParkType: rawData.parkingInfo.space_type || 0,
startTime: rawData.carInfo.enable_time || '',
trans_type: trans_type,
user_id: rawData.user_id || 0
};
} else {
// 使
this.itemObj = rawData;
}
}
}
</script>

View File

@ -410,6 +410,12 @@ page {
display: block;
}
.notice-text2 {
font-size: 28rpx;
color: #999999;
text-align: center;
}
.payment-methods {
margin-bottom: 40rpx;
}

View File

@ -67,49 +67,61 @@
</view>
<!-- 停车费展示部分 -->
<view v-if="showCost1" class="cost-container">
<view>
<image class="cost-image"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/park_orderLoading.png"
mode="aspectFit" />
</view>
<view class="cost-header">
<text class="cost-title">{{ parkingLotName }} <text class="cost-title2">待支付</text></text>
</view>
<view class="cost-amount">
<text class="amount-symbol">¥</text>
<text class="amount-number">{{ costAmount }}</text>
</view>
<view class="cost-info">
<view class="info-item">
<text class="info-label">车牌号</text>
<text class="info-value">{{ currentCarNumber }}</text>
<view v-if="showCost1">
<view v-if="payStatus === 2" class="cost-container">
<view>
<image class="cost-image"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/park_orderLoading.png"
mode="aspectFit" />
</view>
<view class="info-item">
<text class="info-label">进场时间</text>
<text class="info-value">{{ entryTime }}</text>
<view class="cost-header">
<text class="cost-title">{{ parkingLotName }} <text class="cost-title2">待支付</text></text>
</view>
<view class="info-item">
<text class="info-label">计费时间</text>
<text class="info-value">{{ billingTime }}</text>
<view class="cost-amount">
<text class="amount-symbol">¥</text>
<text class="amount-number">{{ costAmount }}</text>
</view>
</view>
<view class="notice">
<text class="notice-text"> 请于付款后15分钟内离场否则将加收停车费</text>
</view>
<view class="payment-methods">
<view class="payment-item" :class="{ 'selected': paymentMethod === 'wechat' }"
@tap="selectPayment('wechat')">
<view class="payment-item-content">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_wechat.png"
mode="aspectFit" class="payment-icon"></image>
<text class="payment-name">微信支付</text>
<view class="cost-info">
<view class="info-item">
<text class="info-label">车牌号</text>
<text class="info-value">{{ currentCarNumber }}</text>
</view>
<view class="info-item">
<text class="info-label">进场时间</text>
<text class="info-value">{{ entryTime }}</text>
</view>
<view class="info-item">
<text class="info-label">计费时间</text>
<text class="info-value">{{ billingTime }}</text>
</view>
<view v-if="paymentMethod === 'wechat'" class="payment-selected"></view>
</view>
<view class="notice">
<!-- 未支付状态显示 -->
<text class="notice-text"> 请于付款后{{ feeOutTime }}分钟内离场否则将加收停车费</text>
</view>
<view class="payment-methods">
<view class="payment-item" :class="{ 'selected': paymentMethod === 'wechat' }"
@tap="selectPayment('wechat')">
<view class="payment-item-content">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_wechat.png"
mode="aspectFit" class="payment-icon"></image>
<text class="payment-name">微信支付</text>
</view>
<view v-if="paymentMethod === 'wechat'" class="payment-selected"></view>
</view>
</view>
<view class="pay-button" @tap="confirmPayment">立即付款</view>
</view>
<view v-else class="cost-container notice-text2">
<view>
<image class="cost-image"
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/park_orderLoading.png"
mode="aspectFit" />
</view>
<span v-if="!isTimeout"> 支付成功请于{{ countdownTime }}内离场否则将加收停车费</span>
<span v-else> 您已超时未离场已重新计费</span>
</view>
<view class="pay-button" @tap="confirmPayment">立即付款</view>
</view>
<view v-if="showCost2" class="cost-container not-found">
未找到停车记录
@ -173,11 +185,18 @@ export default {
parkingLotName: '',
costAmount: '',
currentCarNumber: '',
feeOutTime: '',//
entryTime: '',
billingTime: '',
paymentMethod: 'wechat',
// ID
timerId: null
timerId: null,
//
payStatus: 0,
payTime: '',
countdownTime: '',
isTimeout: false
}
},
onLoad() {
@ -214,6 +233,10 @@ export default {
numberInputResult(e) {
this.defaultNum = e;
//
this.showCost1 = false;
this.showCost2 = false;
// 使$nextTickDOM
this.$nextTick(() => {
if (this.$refs.carNumberInput) {
@ -265,6 +288,31 @@ export default {
this.billingTime = timeStr;
},
//
updateCountdown() {
const payDateTime = new Date(this.payTime);
const currentDateTime = new Date();
//
const expireDateTime = new Date(payDateTime.getTime() + parseInt(this.feeOutTime) * 60 * 1000);
//
if (currentDateTime > expireDateTime) {
this.isTimeout = true;
//
if (this.timerId) {
clearInterval(this.timerId);
this.timerId = null;
}
} else {
//
const remainingSeconds = Math.floor((expireDateTime - currentDateTime) / 1000);
// :
const minutes = Math.floor(remainingSeconds / 60);
const seconds = remainingSeconds % 60;
this.countdownTime = `${minutes}${seconds}`;
}
},
//
selectColor(index) {
this.selectedColorIndex = index;
@ -319,23 +367,40 @@ export default {
this.costAmount = res.fee_amount;
this.currentCarNumber = res.car_number;
this.entryTime = res.in_time;
this.feeOutTime = res.parking.free_out_time
//
if (this.timerId) {
clearInterval(this.timerId);
this.timerId = null;
}
if (res.car_billing_type == 1) {
this.billingTime = '月租车';
} else if (res.car_billing_type == 2) {
this.billingTime = '临时车';
} else {
//
this.updateBillingTime();
//
//
this.payStatus = res.pay_status || 0;
this.payTime = res.pay_time || '';
this.countdownTime = '';
this.isTimeout = false;
// (pay_status=1)
if (this.payStatus === 1 && this.payTime) {
//
this.updateCountdown();
//
this.timerId = setInterval(() => {
this.updateBillingTime();
this.updateCountdown();
}, 1000);
} else {
if (res.car_billing_type == 1) {
this.billingTime = '月租车';
} else if (res.car_billing_type == 2) {
this.billingTime = '临时车';
} else {
//
this.updateBillingTime();
//
this.timerId = setInterval(() => {
this.updateBillingTime();
}, 1000);
}
}
this.showCost1 = true;
@ -393,23 +458,51 @@ export default {
signType: res.signType,
paySign: res.paySign,
success: (payRes) => {
//
//
if (this.timerId) {
clearInterval(this.timerId);
this.timerId = null;
}
//
this.showCost1 = false;
this.showCost2 = false;
this.parkingLotName = '';
this.costAmount = '';
this.currentCarNumber = '';
this.entryTime = '';
this.billingTime = '';
this.feeOutTime = '';
//
this.paymentMethod = 'wechat';
const params = {
order_id: resVal.order_id,
}
request(apiArr.tempParkingOrderQuery, "POST", params).then(res => {
this.selectCost()
})
},
fail: (payErr) => {
const params = {
order_id: resVal.order_id
}
request(apiArr.tempParkingOrderDelete, "POST", params).then((res) => {
})
uni.showToast({
title: payErr.errMsg == 'requestPayment:fail cancel' ? '用户取消支付' : '支付失败',
icon: 'none'
})
//
}
})
} else {
const params = {
order_id: resVal.order_id
}
request(apiArr.tempParkingOrderDelete, "POST", params).then((res) => {
})
console.error("获取支付参数失败,缺少必要参数")
uni.showToast({
title: '获取支付信息失败',
@ -417,6 +510,13 @@ export default {
})
}
})
}).catch(error => {
console.log("111"); // 111
console.error("创建临时停车订单失败", error);
uni.showToast({
title: '创建订单失败',
icon: 'none'
})
})
},
//

View File

@ -228,11 +228,11 @@ export default {
name: "临停缴费",
url: "/packages/park/temporaryOrder/index",
},
{
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/parkIndex_icon2.png",
name: "月卡充值",
url: "/packages/park/monthlyPayment/index",
},
// {
// image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/parkIndex_icon2.png",
// name: "",
// url: "/packages/park/monthlyPayment/index",
// },
{
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/parkIndex_icon3.png",
name: "停车订单",