修改001bug若干

This commit is contained in:
丁杰 2026-04-16 18:10:00 +08:00
parent 9ecaf1a1de
commit 566b6f8929
7 changed files with 1962 additions and 1959 deletions

View File

@ -1,17 +1,11 @@
<template> <template>
<view class="success-page"> <view class="success-page">
<!-- 自定义导航栏 --> <!-- 自定义导航栏 -->
<custom-navbar <custom-navbar title="支付成功" :showBack="true" backgroundColor="#FFFFFF"></custom-navbar>
title="支付成功"
:showBack="true"
backgroundColor="#FFFFFF"
></custom-navbar>
<!-- 成功提示 --> <!-- 成功提示 -->
<view class="success-content"> <view class="success-content">
<image src="/static/images/success_icon.png" <image src="/static/images/success_icon.png" mode="aspectFit" class="success-icon"></image>
mode="aspectFit"
class="success-icon"></image>
<text class="success-text">支付成功</text> <text class="success-text">支付成功</text>
</view> </view>
@ -36,6 +30,7 @@ export default {
} }
}, },
onLoad(options) { onLoad(options) {
console.log(options, '查看订单options');
if (options.orderId) { if (options.orderId) {
this.orderId = options.orderId this.orderId = options.orderId
} }
@ -104,6 +99,7 @@ export default {
.success-page { .success-page {
padding-bottom: 0; padding-bottom: 0;
} }
/* #endif */ /* #endif */
/* #ifdef APP-PLUS || MP */ /* #ifdef APP-PLUS || MP */
@ -111,5 +107,6 @@ export default {
padding-bottom: constant(safe-area-inset-bottom); padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
} }
/* #endif */ /* #endif */
</style> </style>

View File

@ -37,8 +37,7 @@
</view> </view>
<view class="service-address" v-if="order.order_kind == 1"> <view class="service-address" v-if="order.order_kind == 1">
<image src="/static/images/position_icon.png" class="location-icon"></image> <image src="/static/images/position_icon.png" class="location-icon"></image>
<text <text>{{Object.assign({},order.reservation_address_arr).dependency}}{{Object.assign({},order.reservation_address_arr).address}}
>{{Object.assign({},order.reservation_address_arr).dependency}}{{Object.assign({},order.reservation_address_arr).address}}
</text> </text>
</view> </view>
</view> </view>
@ -55,12 +54,14 @@
v-if="order.state == 1">取消订单</text> v-if="order.state == 1">取消订单</text>
<text class="action-btn contact" @click="refoundService(order)" <text class="action-btn contact" @click="refoundService(order)"
v-if="order.state == 2 || order.state == 3">申请退款</text> v-if="order.state == 2 || order.state == 3">申请退款</text>
<text class="action-btn contact" @click="contactService(order.order_shopphone)">联系客服</text> <text class="action-btn contact" @click="contactService(order.order_shopphone)"
v-if="order.state != 7 || order.state!=2">联系客服</text>
<text class="action-btn primary" v-if="order.state == 1" <text class="action-btn primary" v-if="order.state == 1"
@click="payOrder(order)">立即支付</text> @click="payOrder(order)">立即支付</text>
<text class="action-btn review" v-if="order.state == 6" <text class="action-btn review" v-if="order.state == 6"
@click="reviewOrder(order)">评价</text> @click="reviewOrder(order)">评价</text>
<text class="action-btn again" v-if="order.state == 5 || order.state == 6" <text class="action-btn again"
v-if="order.state == 5 || order.state == 6 || order.state == 7"
@click="orderAgain(order)">再来一单</text> @click="orderAgain(order)">再来一单</text>
<!-- <text <!-- <text
class="action-btn again" class="action-btn again"
@ -508,6 +509,12 @@
.order-status { .order-status {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
background-image: url('https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5349af61-d67a-4ecf-91ce-6e4f05ad5edb.png');
background-repeat: no-repeat;
background-size: 100%;
height: 49rpx;
width: 128rpx;
padding-left: 30rpx;
} }
.status-pending { .status-pending {

View File

@ -88,11 +88,11 @@
<text class="label">下单时间</text> <text class="label">下单时间</text>
<text class="value">{{orderInfo.add_time}}</text> <text class="value">{{orderInfo.add_time}}</text>
</view> </view>
<view class="info-item" v-if="orderInfo.state != 1 && orderInfo.state != 2 && orderInfo.state != 3"> <view class="info-item" v-if="orderInfo.state != 1 && orderInfo.state != 2 && orderInfo.state != 3 && orderInfo.state != 7">
<text class="label">开始服务时间</text> <text class="label">开始服务时间</text>
<text class="value">{{orderInfo.server_start_time}}</text> <text class="value">{{orderInfo.server_start_time}}</text>
</view> </view>
<view class="info-item" v-if="orderInfo.state != 1 && orderInfo.state != 2 && orderInfo.state != 3 && orderInfo.state != 4"> <view class="info-item" v-if="orderInfo.state != 1 && orderInfo.state != 2 && orderInfo.state != 3 && orderInfo.state != 4 && orderInfo.state != 7">
<text class="label">服务完成时间</text> <text class="label">服务完成时间</text>
<text class="value">{{orderInfo.server_end_time}}</text> <text class="value">{{orderInfo.server_end_time}}</text>
</view> </view>

View File

@ -51,7 +51,7 @@
<view class="btn accept-btn" v-if="dataItem.state == 2 || dataItem.state == 3" @click.stop="emitRefund">申请退款</view> <view class="btn accept-btn" v-if="dataItem.state == 2 || dataItem.state == 3" @click.stop="emitRefund">申请退款</view>
<!-- 已完成状态再来一单 --> <!-- 已完成状态再来一单 -->
<view class="btn accept-btn" v-if="dataItem.state == 5 || dataItem.state == 7" @click.stop="emitReOrder">来一单</view> <view class="btn accept-btn" v-if="dataItem.state == 5 || dataItem.state == 7" @click.stop="emitReOrder">次购买</view>
<!-- 已取消状态重新预订 --> <!-- 已取消状态重新预订 -->
<!-- <view class="btn accept-btn" v-if="dataItem.state == 7" @click.stop="emitReOrder">重新预订</view> --> <!-- <view class="btn accept-btn" v-if="dataItem.state == 7" @click.stop="emitReOrder">重新预订</view> -->

View File

@ -92,10 +92,10 @@
<text class="label">订单编号</text> <text class="label">订单编号</text>
<text class="value">{{ orderInfo.number }}</text> <text class="value">{{ orderInfo.number }}</text>
</view> </view>
<view class="info-item" v-if="orderInfo.server_code && orderInfo.state !=7"> <!-- <view class="info-item" v-if="orderInfo.server_code && orderInfo.state !=7">
<text class="label">服务码</text> <text class="label">服务码</text>
<text class="value">{{ orderInfo.server_code }}</text> <text class="value">{{ orderInfo.server_code }}</text>
</view> </view> -->
<view class="info-item"> <view class="info-item">
<text class="label">下单时间</text> <text class="label">下单时间</text>
<text class="value">{{ orderInfo.add_time }}</text> <text class="value">{{ orderInfo.add_time }}</text>
@ -254,9 +254,12 @@
reservation_address_arr: {}, reservation_address_arr: {},
user_syr: {}, user_syr: {},
scrollTop: 0, scrollTop: 0,
options: {}
}; };
}, },
async onLoad(options) { async onLoad(options) {
console.log(options, '查看参数------------------------');
this.options = options
this.id = options.order_id; this.id = options.order_id;
if (options.identity) { if (options.identity) {
this.identity = options.identity; this.identity = options.identity;
@ -271,11 +274,15 @@
this.userInfo = data; this.userInfo = data;
this.getOrderDetail(); this.getOrderDetail();
} }
console.log(this.userInfo, 'this.userInfothis.userInfo');
// //
if (options.push_id) { if (options.push_id) {
this.messageRead(options.push_id) this.messageRead(options.push_id)
} }
}, },
async onShow() {
this.getOrderDetail();
},
onPageScroll(e) { onPageScroll(e) {
this.scrollTop = e.scrollTop; this.scrollTop = e.scrollTop;
}, },
@ -381,40 +388,38 @@
afterAddingMinutes: formattedNew, afterAddingMinutes: formattedNew,
}; };
}, },
getOrderDetail() { async getOrderDetail() {
request console.log(this.identity, 'this.identitythis.identity');
.post(this.interfaceList[this.identity].details, { console.log(this.id, 'this.id.ididididididid');
request.post(this.interfaceList[this.identity].details, {
id: this.id id: this.id
}) })
.then((res) => { .then((res) => {
if (this.identity == 0) { if (this.identity == 0) {
this.orderInfo = res.data ? this.orderInfo = res.data ? {
{
...res.data.order, ...res.data.order,
...res.data.work_hour, ...res.data.work_hour,
...res.data.user_syr, ...res.data.user_syr,
work_hour_id: res.data.work_hour.id, work_hour_id: res.data.work_hour.id,
order_id: res.data.order.id, order_id: res.data.order.id,
user_sj_id: res.data.user_syr.id, user_sj_id: res.data.user_syr.id,
} : } : {};
{}; console.log(this.orderInfo, '----------------------------------')
} else if (this.identity == 1) { } else if (this.identity == 1) {
this.orderInfo = res.data ? this.orderInfo = res.data ? {
{
...res.data.order, ...res.data.order,
...res.data.work_seat, ...res.data.work_seat,
...res.data.user_sj, ...res.data.user_sj,
work_hour_id: res.data.work_seat.id, work_hour_id: res.data.work_seat.id,
order_id: res.data.order.id, order_id: res.data.order.id,
user_sj_id: res.data.user_sj.id, user_sj_id: res.data.user_sj.id,
} : } : {};
{};
} }
// //
this.orderInfo.service_duration = this.calculateServiceDuration(); this.orderInfo.service_duration = this.calculateServiceDuration();
console.log(22222, this.orderInfo) console.log('----------------------------------', this.orderInfo)
}); });
}, },

View File

@ -1,19 +1,11 @@
<template> <template>
<view class="success-page"> <view class="success-page">
<!-- 自定义导航栏 --> <!-- 自定义导航栏 -->
<custom-navbar <custom-navbar title="支付成功" :showBack="true" backgroundColor="#FFFFFF"></custom-navbar>
title="支付成功"
:showBack="true"
backgroundColor="#FFFFFF"
></custom-navbar>
<!-- 成功提示 --> <!-- 成功提示 -->
<view class="success-content"> <view class="success-content">
<image <image src="/static/images/success_icon.png" mode="aspectFit" class="success-icon"></image>
src="/static/images/success_icon.png"
mode="aspectFit"
class="success-icon"
></image>
<text class="success-text">支付成功</text> <text class="success-text">支付成功</text>
</view> </view>
@ -39,14 +31,14 @@ export default {
}; };
}, },
onLoad(options) { onLoad(options) {
console.log(options, 'options查看订单');
if (options.orderId) { if (options.orderId) {
this.orderId = options.orderId; this.orderId = options.orderId;
} }
if (options.path) { if (options.path) {
this.path = options.path; this.path = options.path;
} }
if(options.identity) if (options.identity) {
{
this.identity = options.identity; this.identity = options.identity;
} }
}, },
@ -54,7 +46,7 @@ export default {
goToOrder() { goToOrder() {
if (this.path) { if (this.path) {
uni.redirectTo({ uni.redirectTo({
url: `${this.path}?id=${this.orderId}&identity=${this.identity}`, url: `${this.path}?order_id=${this.orderId}&identity=${this.identity}`,
}); });
} else { } else {
uni.redirectTo({ uni.redirectTo({
@ -110,6 +102,7 @@ export default {
.success-page { .success-page {
padding-bottom: 0; padding-bottom: 0;
} }
/* #endif */ /* #endif */
/* #ifdef APP-PLUS || MP */ /* #ifdef APP-PLUS || MP */
@ -117,5 +110,6 @@ export default {
padding-bottom: constant(safe-area-inset-bottom); padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
} }
/* #endif */ /* #endif */
</style> </style>

View File

@ -285,7 +285,7 @@
<view class="handel-button btn-bg" v-if="orderInfo.state == 3" @click.stop="startOrder($event, orderInfo)"> <view class="handel-button btn-bg" v-if="orderInfo.state == 3" @click.stop="startOrder($event, orderInfo)">
<text class="button-text">开始服务</text> <text class="button-text">开始服务</text>
</view> </view>
<view class="handel-button btn-bg" v-if="orderInfo.state == 4" @click.stop="endOrder($event, orderInfo)"> <view class="handel-button btn-bg" v-if="orderInfo.state != 4" @click.stop="endOrder($event, orderInfo)">
<text class="button-text">服务完成</text> <text class="button-text">服务完成</text>
</view> </view>
</view> </view>