fix: 订单详情页面添加判断条件按钮

pull/8/head
kele 2023-01-17 15:31:19 +08:00
parent 39b87625dd
commit 5fa43dfb5b
1 changed files with 23 additions and 1 deletions

View File

@ -213,6 +213,20 @@
@tap="onComment(state.orderInfo.order_sn)" @tap="onComment(state.orderInfo.order_sn)"
>评价晒单</button >评价晒单</button
> >
<button
v-if="state.orderInfo.btns?.includes('invoice')"
class="ss-reset-button cancel-btn"
@tap.stop="onOrderInvoice(state.orderInfo.invoice?.id)"
>
查看发票
</button>
<button
v-if="state.orderInfo.btns?.includes('re_apply_refund')"
class="ss-reset-button cancel-btn"
@tap.stop="onRefund(state.orderInfo.id)"
>
重新退款
</button>
</view> </view>
</su-fixed> </su-fixed>
</s-layout> </s-layout>
@ -224,6 +238,7 @@
import { computed, reactive } from 'vue'; import { computed, reactive } from 'vue';
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2; const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
const headerBg = sheep.$url.css('/assets/addons/shopro/frontend_img/order/order_bg.png');
const state = reactive({ const state = reactive({
orderInfo: {}, orderInfo: {},
}); });
@ -298,6 +313,13 @@
} }
} }
//
function onOrderInvoice(invoiceId) {
sheep.$router.go('/pages/order/invoice', {
invoiceId,
});
}
// //
function onComment(orderSN) { function onComment(orderSN) {
uni.$once('SELECT_INVOICE', (e) => { uni.$once('SELECT_INVOICE', (e) => {
@ -337,7 +359,7 @@
.state-box { .state-box {
color: rgba(#fff, 0.9); color: rgba(#fff, 0.9);
width: 100%; width: 100%;
background: v-bind("sheep.$url.css('/static/img/shop/order/order_bg.png')") no-repeat, background: v-bind(headerBg) no-repeat,
linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient)); linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
background-size: 750rpx 100%; background-size: 750rpx 100%;
box-sizing: border-box; box-sizing: border-box;