修改001bug若干
This commit is contained in:
parent
9ecaf1a1de
commit
566b6f8929
|
|
@ -1,115 +1,112 @@
|
|||
<template>
|
||||
<view class="success-page">
|
||||
<!-- 自定义导航栏 -->
|
||||
<custom-navbar
|
||||
title="支付成功"
|
||||
:showBack="true"
|
||||
backgroundColor="#FFFFFF"
|
||||
></custom-navbar>
|
||||
<view class="success-page">
|
||||
<!-- 自定义导航栏 -->
|
||||
<custom-navbar title="支付成功" :showBack="true" backgroundColor="#FFFFFF"></custom-navbar>
|
||||
|
||||
<!-- 成功提示 -->
|
||||
<view class="success-content">
|
||||
<image src="/static/images/success_icon.png"
|
||||
mode="aspectFit"
|
||||
class="success-icon"></image>
|
||||
<text class="success-text">支付成功</text>
|
||||
</view>
|
||||
<!-- 成功提示 -->
|
||||
<view class="success-content">
|
||||
<image src="/static/images/success_icon.png" mode="aspectFit" class="success-icon"></image>
|
||||
<text class="success-text">支付成功</text>
|
||||
</view>
|
||||
|
||||
<!-- 查看订单按钮 -->
|
||||
<view class="btn-box" @click="goToOrder">
|
||||
<text class="btn-text">查看订单</text>
|
||||
<!-- 查看订单按钮 -->
|
||||
<view class="btn-box" @click="goToOrder">
|
||||
<text class="btn-text">查看订单</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import customNavbar from '@/components/custom-navbar/custom-navbar.vue'
|
||||
import customNavbar from '@/components/custom-navbar/custom-navbar.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
customNavbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
orderId: '',
|
||||
serviceType:1,//订单类型,1普通,2自营
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.orderId) {
|
||||
this.orderId = options.orderId
|
||||
}
|
||||
if(options.serviceType){
|
||||
this.serviceType = options.serviceType
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goToOrder() {
|
||||
if(this.serviceType==1){
|
||||
uni.redirectTo({
|
||||
url:`/pages/order/userorder-detail?id=${this.orderId}`
|
||||
})
|
||||
}else{
|
||||
uni.redirectTo({
|
||||
url: `/pages/order/userorder-detail?id=${this.orderId}&serviceType=2`
|
||||
})
|
||||
export default {
|
||||
components: {
|
||||
customNavbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
orderId: '',
|
||||
serviceType: 1, //订单类型,1普通,2自营
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options, '查看订单options');
|
||||
if (options.orderId) {
|
||||
this.orderId = options.orderId
|
||||
}
|
||||
if (options.serviceType) {
|
||||
this.serviceType = options.serviceType
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goToOrder() {
|
||||
if (this.serviceType == 1) {
|
||||
uni.redirectTo({
|
||||
url: `/pages/order/userorder-detail?id=${this.orderId}`
|
||||
})
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: `/pages/order/userorder-detail?id=${this.orderId}&serviceType=2`
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.success-page {
|
||||
min-height: 100vh;
|
||||
background-color: #FFFFFF;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
.success-page {
|
||||
min-height: 100vh;
|
||||
background-color: #FFFFFF;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.success-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-top: 120rpx;
|
||||
}
|
||||
.success-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-top: 120rpx;
|
||||
}
|
||||
|
||||
.success-icon {
|
||||
width: 250rpx;
|
||||
height: 184rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.success-icon {
|
||||
width: 250rpx;
|
||||
height: 184rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.success-text {
|
||||
font-size: 40rpx;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
}
|
||||
.success-text {
|
||||
font-size: 40rpx;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.action-button {
|
||||
width: 686rpx;
|
||||
height: 88rpx;
|
||||
background: #FF4B4B;
|
||||
border-radius: 44rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 80rpx auto 0;
|
||||
}
|
||||
.action-button {
|
||||
width: 686rpx;
|
||||
height: 88rpx;
|
||||
background: #FF4B4B;
|
||||
border-radius: 44rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 80rpx auto 0;
|
||||
}
|
||||
|
||||
/* 多端适配 */
|
||||
/* #ifdef H5 */
|
||||
.success-page {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
/* #endif */
|
||||
/* 多端适配 */
|
||||
/* #ifdef H5 */
|
||||
.success-page {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* #ifdef APP-PLUS || MP */
|
||||
.success-page {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
/* #endif */
|
||||
/* #endif */
|
||||
|
||||
/* #ifdef APP-PLUS || MP */
|
||||
.success-page {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
</style>
|
||||
|
|
@ -37,8 +37,7 @@
|
|||
</view>
|
||||
<view class="service-address" v-if="order.order_kind == 1">
|
||||
<image src="/static/images/position_icon.png" class="location-icon"></image>
|
||||
<text
|
||||
>{{Object.assign({},order.reservation_address_arr).dependency}}{{Object.assign({},order.reservation_address_arr).address}}
|
||||
<text>{{Object.assign({},order.reservation_address_arr).dependency}}{{Object.assign({},order.reservation_address_arr).address}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -55,12 +54,14 @@
|
|||
v-if="order.state == 1">取消订单</text>
|
||||
<text class="action-btn contact" @click="refoundService(order)"
|
||||
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"
|
||||
@click="payOrder(order)">立即支付</text>
|
||||
<text class="action-btn review" v-if="order.state == 6"
|
||||
@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>
|
||||
<!-- <text
|
||||
class="action-btn again"
|
||||
|
|
@ -508,6 +509,12 @@
|
|||
.order-status {
|
||||
font-size: 28rpx;
|
||||
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 {
|
||||
|
|
|
|||
|
|
@ -88,11 +88,11 @@
|
|||
<text class="label">下单时间</text>
|
||||
<text class="value">{{orderInfo.add_time}}</text>
|
||||
</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="value">{{orderInfo.server_start_time}}</text>
|
||||
</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="value">{{orderInfo.server_end_time}}</text>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -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 == 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> -->
|
||||
|
|
|
|||
|
|
@ -92,10 +92,10 @@
|
|||
<text class="label">订单编号</text>
|
||||
<text class="value">{{ orderInfo.number }}</text>
|
||||
</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="value">{{ orderInfo.server_code }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="info-item">
|
||||
<text class="label">下单时间</text>
|
||||
<text class="value">{{ orderInfo.add_time }}</text>
|
||||
|
|
@ -254,9 +254,12 @@
|
|||
reservation_address_arr: {},
|
||||
user_syr: {},
|
||||
scrollTop: 0,
|
||||
options: {}
|
||||
};
|
||||
},
|
||||
async onLoad(options) {
|
||||
console.log(options, '查看参数------------------------');
|
||||
this.options = options
|
||||
this.id = options.order_id;
|
||||
if (options.identity) {
|
||||
this.identity = options.identity;
|
||||
|
|
@ -271,11 +274,15 @@
|
|||
this.userInfo = data;
|
||||
this.getOrderDetail();
|
||||
}
|
||||
console.log(this.userInfo, 'this.userInfothis.userInfo');
|
||||
//信息读取
|
||||
if (options.push_id) {
|
||||
this.messageRead(options.push_id)
|
||||
}
|
||||
},
|
||||
async onShow() {
|
||||
this.getOrderDetail();
|
||||
},
|
||||
onPageScroll(e) {
|
||||
this.scrollTop = e.scrollTop;
|
||||
},
|
||||
|
|
@ -381,40 +388,38 @@
|
|||
afterAddingMinutes: formattedNew,
|
||||
};
|
||||
},
|
||||
getOrderDetail() {
|
||||
request
|
||||
.post(this.interfaceList[this.identity].details, {
|
||||
async getOrderDetail() {
|
||||
console.log(this.identity, 'this.identitythis.identity');
|
||||
console.log(this.id, 'this.id.ididididididid');
|
||||
request.post(this.interfaceList[this.identity].details, {
|
||||
id: this.id
|
||||
})
|
||||
.then((res) => {
|
||||
if (this.identity == 0) {
|
||||
this.orderInfo = res.data ?
|
||||
{
|
||||
...res.data.order,
|
||||
...res.data.work_hour,
|
||||
...res.data.user_syr,
|
||||
work_hour_id: res.data.work_hour.id,
|
||||
order_id: res.data.order.id,
|
||||
user_sj_id: res.data.user_syr.id,
|
||||
} :
|
||||
{};
|
||||
this.orderInfo = res.data ? {
|
||||
...res.data.order,
|
||||
...res.data.work_hour,
|
||||
...res.data.user_syr,
|
||||
work_hour_id: res.data.work_hour.id,
|
||||
order_id: res.data.order.id,
|
||||
user_sj_id: res.data.user_syr.id,
|
||||
} : {};
|
||||
console.log(this.orderInfo, '----------------------------------')
|
||||
} else if (this.identity == 1) {
|
||||
this.orderInfo = res.data ?
|
||||
{
|
||||
...res.data.order,
|
||||
...res.data.work_seat,
|
||||
...res.data.user_sj,
|
||||
work_hour_id: res.data.work_seat.id,
|
||||
order_id: res.data.order.id,
|
||||
user_sj_id: res.data.user_sj.id,
|
||||
} :
|
||||
{};
|
||||
this.orderInfo = res.data ? {
|
||||
...res.data.order,
|
||||
...res.data.work_seat,
|
||||
...res.data.user_sj,
|
||||
work_hour_id: res.data.work_seat.id,
|
||||
order_id: res.data.order.id,
|
||||
user_sj_id: res.data.user_sj.id,
|
||||
} : {};
|
||||
}
|
||||
|
||||
// 计算服务时长
|
||||
this.orderInfo.service_duration = this.calculateServiceDuration();
|
||||
|
||||
console.log(22222, this.orderInfo)
|
||||
console.log('----------------------------------', this.orderInfo)
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -1,121 +1,115 @@
|
|||
<template>
|
||||
<view class="success-page">
|
||||
<!-- 自定义导航栏 -->
|
||||
<custom-navbar
|
||||
title="支付成功"
|
||||
:showBack="true"
|
||||
backgroundColor="#FFFFFF"
|
||||
></custom-navbar>
|
||||
<view class="success-page">
|
||||
<!-- 自定义导航栏 -->
|
||||
<custom-navbar title="支付成功" :showBack="true" backgroundColor="#FFFFFF"></custom-navbar>
|
||||
|
||||
<!-- 成功提示 -->
|
||||
<view class="success-content">
|
||||
<image
|
||||
src="/static/images/success_icon.png"
|
||||
mode="aspectFit"
|
||||
class="success-icon"
|
||||
></image>
|
||||
<text class="success-text">支付成功</text>
|
||||
</view>
|
||||
<!-- 成功提示 -->
|
||||
<view class="success-content">
|
||||
<image src="/static/images/success_icon.png" mode="aspectFit" class="success-icon"></image>
|
||||
<text class="success-text">支付成功</text>
|
||||
</view>
|
||||
|
||||
<!-- 查看订单按钮 -->
|
||||
<view class="btn-box" @click="goToOrder">
|
||||
<text class="btn-text">查看订单</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 查看订单按钮 -->
|
||||
<view class="btn-box" @click="goToOrder">
|
||||
<text class="btn-text">查看订单</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import customNavbar from "@/components/custom-navbar/custom-navbar.vue";
|
||||
import customNavbar from "@/components/custom-navbar/custom-navbar.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
customNavbar,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
orderId: "",
|
||||
path: "",
|
||||
identity:"",
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.orderId) {
|
||||
this.orderId = options.orderId;
|
||||
}
|
||||
if (options.path) {
|
||||
this.path = options.path;
|
||||
}
|
||||
if(options.identity)
|
||||
{
|
||||
this.identity = options.identity;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goToOrder() {
|
||||
if (this.path) {
|
||||
uni.redirectTo({
|
||||
url: `${this.path}?id=${this.orderId}&identity=${this.identity}`,
|
||||
});
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: "/pages/shop/buyorder-detail?id=" + this.orderId,
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
export default {
|
||||
components: {
|
||||
customNavbar,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
orderId: "",
|
||||
path: "",
|
||||
identity: "",
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options, 'options查看订单');
|
||||
if (options.orderId) {
|
||||
this.orderId = options.orderId;
|
||||
}
|
||||
if (options.path) {
|
||||
this.path = options.path;
|
||||
}
|
||||
if (options.identity) {
|
||||
this.identity = options.identity;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goToOrder() {
|
||||
if (this.path) {
|
||||
uni.redirectTo({
|
||||
url: `${this.path}?order_id=${this.orderId}&identity=${this.identity}`,
|
||||
});
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: "/pages/shop/buyorder-detail?id=" + this.orderId,
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.success-page {
|
||||
min-height: 100vh;
|
||||
background-color: #ffffff;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
.success-page {
|
||||
min-height: 100vh;
|
||||
background-color: #ffffff;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.success-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-top: 120rpx;
|
||||
}
|
||||
.success-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-top: 120rpx;
|
||||
}
|
||||
|
||||
.success-icon {
|
||||
width: 250rpx;
|
||||
height: 184rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.success-icon {
|
||||
width: 250rpx;
|
||||
height: 184rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.success-text {
|
||||
font-size: 40rpx;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
}
|
||||
.success-text {
|
||||
font-size: 40rpx;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.action-button {
|
||||
width: 686rpx;
|
||||
height: 88rpx;
|
||||
background: #ff4b4b;
|
||||
border-radius: 44rpx;
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 80rpx auto 0;
|
||||
}
|
||||
.action-button {
|
||||
width: 686rpx;
|
||||
height: 88rpx;
|
||||
background: #ff4b4b;
|
||||
border-radius: 44rpx;
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 80rpx auto 0;
|
||||
}
|
||||
|
||||
/* 多端适配 */
|
||||
/* #ifdef H5 */
|
||||
.success-page {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
/* #endif */
|
||||
/* 多端适配 */
|
||||
/* #ifdef H5 */
|
||||
.success-page {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* #ifdef APP-PLUS || MP */
|
||||
.success-page {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
/* #endif */
|
||||
/* #endif */
|
||||
|
||||
/* #ifdef APP-PLUS || MP */
|
||||
.success-page {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
</style>
|
||||
|
|
@ -285,7 +285,7 @@
|
|||
<view class="handel-button btn-bg" v-if="orderInfo.state == 3" @click.stop="startOrder($event, orderInfo)">
|
||||
<text class="button-text">开始服务</text>
|
||||
</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>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
Loading…
Reference in New Issue