fix: 拼团详情页面、售后单详情页面空置页判断条件修复,头部导航栏判断修复

pull/8/head
kele 2023-01-10 18:23:18 +08:00
parent 9df2d4320b
commit ea385b4f89
2 changed files with 14 additions and 8 deletions

View File

@ -1,7 +1,7 @@
<template>
<s-layout title="拼团详情" class="detail-wrap" navbar="inner" :onShareAppMessage="shareInfo">
<s-layout title="拼团详情" class="detail-wrap" :navbar="state.data && !state.loading ? 'inner': 'normal'" :onShareAppMessage="shareInfo">
<view v-if="state.loading"></view>
<view v-else-if="state.data && !state.loading">
<view v-if="state.data && !state.loading">
<view
class="recharge-box"
v-if="state.data.goods"
@ -193,7 +193,7 @@
/>
</view>
</view>
<s-empty v-else-if="!state.data && !state.loading" icon="/static/goods-empty.png"> </s-empty>
<s-empty v-if="!state.data && !state.loading" icon="/static/goods-empty.png"> </s-empty>
</s-layout>
</template>

View File

@ -1,9 +1,8 @@
<!-- 售后详情 -->
<template>
<s-layout title="售后详情" navbar="inner">
<view class="content_box" v-if="JSON.stringify(state.info) != '{}'">
<s-layout title="售后详情" :navbar="!isEmpty(state.info) && state.loading?'inner': 'normal'">
<view class="content_box" v-if="!isEmpty(state.info) && state.loading">
<!-- 步骤条 -->
<!-- TODO-jj: 步骤条样式 -->
<view
class="steps-box ss-flex"
:style="[
@ -100,8 +99,12 @@
</view>
</view>
</view>
<s-empty v-if="state.info === null" icon="/static/order-empty.png" text="暂无该订单售后详情" />
<su-fixed bottom placeholder bg="bg-white" v-if="JSON.stringify(state.info) != '{}'">
<s-empty
v-if="isEmpty(state.info) && state.loading"
icon="/static/order-empty.png"
text="暂无该订单售后详情"
/>
<su-fixed bottom placeholder bg="bg-white" v-if="!isEmpty(state.info)">
<view class="foot_box">
<button
class="ss-reset-button btn"
@ -127,6 +130,7 @@
import sheep from '@/sheep';
import { onLoad } from '@dcloudio/uni-app';
import { reactive } from 'vue';
import { isEmpty } from 'lodash';
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
const state = reactive({
@ -141,6 +145,7 @@
title: '处理中',
},
],
loading: false,
});
function onApply(orderId) {
@ -177,6 +182,7 @@
};
async function getDetail(id) {
const { error, data } = await sheep.$api.order.aftersale.detail(id);
state.loading = true;
if (error === 0) {
state.info = data;
if (state.info.aftersale_status === -2 || state.info.aftersale_status === -1) {