增加空状态提示

main
yanzai 4 months ago
parent 83a56766a2
commit 17a336d5c0

@ -1,5 +1,5 @@
let url_ = "https://api.gaobuyy.cn"; let url_ = "https://api.gaobuyy.cn";
const dev = 1 const dev = 0
if (dev === 1) { if (dev === 1) {
url_ = "http://gaobuyy-local" url_ = "http://gaobuyy-local"
} }

@ -2,7 +2,7 @@ import {
$post $post
} from '@/lu/axios.js' } from '@/lu/axios.js'
let url_ = "https://api.gaobuyy.cn"; let url_ = "https://api.gaobuyy.cn";
const dev = 1 const dev = 0
if (dev === 1) { if (dev === 1) {
url_ = "http://gaobuyy-local" url_ = "http://gaobuyy-local"
} }

@ -0,0 +1,18 @@
<template>
<view style="width: 100%;">
<img src="../static/empty.png" style="width:100%;" />
<view style="color: #bababa;margin-top: 30rpx;font-size: 26rpx;">{{title}}</view>
</view>
</template>
<script setup>
const props = defineProps({
title: {
type: String,
default: '暂无内容'
}
});
</script>
<style>
</style>

@ -17,6 +17,8 @@
import { import {
onShow onShow
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
import Empty from '../../../components/Empty.vue';
let tishi=ref('')
const $props = defineProps({ const $props = defineProps({
id_number: { id_number: {
type: String, type: String,
@ -37,6 +39,9 @@
uni.hideLoading(); uni.hideLoading();
$response(response, () => { $response(response, () => {
report_list.value = response.data.list report_list.value = response.data.list
if(report_list.value.length===0){
tishi.value='暂无报告'
}
}) })
} }
const report_list = ref([]) const report_list = ref([])
@ -85,7 +90,7 @@
<text class="tip_title_wrapper">温馨提示</text> <text class="tip_title_wrapper">温馨提示</text>
<text class="tip_text_wrapper">如电子报告与纸质报告不相符请以纸质版报告为准</text> <text class="tip_text_wrapper">如电子报告与纸质报告不相符请以纸质版报告为准</text>
</view> </view>
<view class="report_list_wrapper" :style="{top : !!report_status ? '222rpx' : '85rpx'}"> <view v-if="report_list.length>0" class="report_list_wrapper" :style="{top : !!report_status ? '222rpx' : '85rpx'}">
<view @click="toReport(i.id)" class="report_item_wrapper" v-for="(i,k) in report_list" :key="k"> <view @click="toReport(i.id)" class="report_item_wrapper" v-for="(i,k) in report_list" :key="k">
<view class="report_item_icon_wrapper"> <view class="report_item_icon_wrapper">
<image :src="$image('/storage/assets/report/home/报告@2x.png')"></image> <image :src="$image('/storage/assets/report/home/报告@2x.png')"></image>
@ -103,6 +108,12 @@
</view> </view>
</view> </view>
</view> </view>
<view v-else style="margin-top: 20%; font-size: 28rpx; color: #666; text-align: center;">
<view v-if="tishi!==''" style="display: flex;align-items: center;width: 100%; justify-content: center;">
<Empty title="暂无报告" style="width: 30%;"></Empty>
</view>
</view>
</view> </view>
</template> </template>
<style scoped> <style scoped>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Loading…
Cancel
Save