订单样式修改

feature/v-xuexi
wangdong 8 months ago
parent 0184470dad
commit e4098474fd
  1. 36
      pages/special/order.vue
  2. 8
      pages/special/order_store_list.vue

@ -1,6 +1,6 @@
<template> <template>
<BaseContainer class="order-detail"> <BaseContainer class="order-detail">
<NavBar title="订单详情"/> <NavBar title="订单详情" :class="{ 'showNavBg': scrollTop > 20 }"/>
<view v-if="orderInfo.id" class="detail-box" @click="showOperateBox = false;"> <view v-if="orderInfo.id" class="detail-box" @click="showOperateBox = false;">
<!-- 退款 --> <!-- 退款 -->
<view class="section return" v-if="orderInfo.refund_reason && orderInfo.refund_status === 0"> <view class="section return" v-if="orderInfo.refund_reason && orderInfo.refund_status === 0">
@ -29,9 +29,9 @@
<view class="section contact"> <view class="section contact">
<view v-if="orderInfo._status._type > 1" class="express-delivery-info flex"> <view v-if="orderInfo._status._type > 1" class="express-delivery-info flex">
<image src="@/static/images/special/car.png" mode="aspectFill"></image> <image src="@/static/images/special/car.png" mode="aspectFill"></image>
<view class="info-box"> <view class="info-box" @click="express">
<view class="info-title flex">您的快递已发车 <text class="more"></text> </view> <view class="info-title flex">您的快递已发车 <text class="more"></text> </view>
<view class="info-time">2023-05-25 22:34:23</view> <view class="info-time"></view>
</view> </view>
</view> </view>
<view class="address-info flex"> <view class="address-info flex">
@ -183,7 +183,7 @@
(orderInfo._status._type === 3 && orderInfo.pay_price === 0) (orderInfo._status._type === 3 && orderInfo.pay_price === 0)
">删除订单</view> ">删除订单</view>
<!-- <view class="footer-btn" @click="services">联系客服</view> --> <!-- <view class="footer-btn" @click="services">联系客服</view> -->
<view class="footer-btn" v-if="orderInfo.status >= 1" @click="express">查看物流</view> <!-- <view class="footer-btn" v-if="orderInfo.status >= 1" @click="express">查看物流</view> -->
<template v-else-if="orderInfo._status._type === 2"> <template v-else-if="orderInfo._status._type === 2">
<view class="red footer-btn" @click="userTake">确认收货</view> <view class="red footer-btn" @click="userTake">确认收货</view>
</template> </template>
@ -225,6 +225,7 @@
gold_name: "", gold_name: "",
isOpenWeixing: false, isOpenWeixing: false,
showOperateBox: false, showOperateBox: false,
scrollTop: 0,
}; };
}, },
computed: { computed: {
@ -244,6 +245,10 @@
this.isOpenWeixing = false this.isOpenWeixing = false
} }
}, },
onPageScroll(e) {
console.log(e.scrollTop);
this.scrollTop = e.scrollTop;
},
methods: { methods: {
getOrderDetail() { getOrderDetail() {
return getOrderDetail(this.orderId).then(({ data }) => { return getOrderDetail(this.orderId).then(({ data }) => {
@ -322,6 +327,7 @@
await userRemoveOrder(this.orderId); await userRemoveOrder(this.orderId);
uni.hideLoading(); uni.hideLoading();
this.$util.showMsg(title + "成功!"); this.$util.showMsg(title + "成功!");
uni.navigateBack();
} catch (err) { } catch (err) {
uni.hideLoading(); uni.hideLoading();
this.$util.showMsg(err.msg); this.$util.showMsg(err.msg);
@ -419,10 +425,26 @@
background: linear-gradient(to top, #f6f6f6 0%, #f6f6f6 60%, #F6F8FA 70%, #A1BFFD 100%); background: linear-gradient(to top, #f6f6f6 0%, #f6f6f6 60%, #F6F8FA 70%, #A1BFFD 100%);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh; min-height: 100vh;
padding-bottom: 130rpx; padding-bottom: 130rpx;
.nav-box { ::v-deep {
background: transparent!important; .nav-box {
background: transparent!important;
}
.showNavBg {
background: #fff!important;
}
// #ifdef MP-WEIXIN
.base-container {
background: transparent!important;
padding-bottom: calc(0rpx + var(--safe-top))!important;
}
.showNavBg {
.nav-box {
background: #fff!important;
}
}
// #endif
} }
.detail-box { .detail-box {
flex: 1; flex: 1;

@ -192,6 +192,14 @@
this.$util.wxh5PayIsSuccess(this.orderId, 1, this) this.$util.wxh5PayIsSuccess(this.orderId, 1, this)
this.isOpenWeixing = false this.isOpenWeixing = false
} }
this.orderList = {
first: 0,
limit: 8,
list: [],
loaded: false,
top: 0,
};
this.getOrderList();
}, },
onLoad({ type }) { onLoad({ type }) {
type !== undefined && (this.type = type); type !== undefined && (this.type = type);

Loading…
Cancel
Save