Commit 3d5e8525 authored by linwenqing's avatar linwenqing

refactor:证书列表缺醒页

parent ddae4473
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
@refresherrestore="onRestore" @refresherrestore="onRestore"
@refresherabort="onAbort" @refresherabort="onAbort"
> >
<view class="list-view"> <view v-if="hasData" class="list-view">
<view class="item" v-for="(item, key) in countryCertList" :key="key" @tap="goDetail(item)"> <view class="item" v-for="(item, key) in countryCertList" :key="key" @tap="goDetail(item)">
<u-image :src="item.bgImage" width="100%" height="100%" class="bg-image"></u-image> <u-image :src="item.bgImage" width="100%" height="100%" class="bg-image"></u-image>
<view class="name"> <view class="name">
...@@ -104,6 +104,17 @@ ...@@ -104,6 +104,17 @@
</view> </view>
</view> </view>
</view> </view>
<view v-else class="list-view empty-value">
<u-image
width="374rpx"
height="322rpx"
:src="nothing"
style="margin-top: 100rpx;"
></u-image>
<text style="margin-top: 20rpx;font-size: 28rpx;color: #9EA5BB;"
>当前暂无证书内容</text
>
</view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
</swiper> </swiper>
...@@ -127,6 +138,7 @@ export default { ...@@ -127,6 +138,7 @@ export default {
learnCertList: [], learnCertList: [],
countryCertImage: process.uniEnv.qn_base_url + 'zhengshubeijing@2x.png', countryCertImage: process.uniEnv.qn_base_url + 'zhengshubeijing@2x.png',
learnCertImage: process.uniEnv.qn_base_url + 'xueshizhengmingbeijing@2x.png', learnCertImage: process.uniEnv.qn_base_url + 'xueshizhengmingbeijing@2x.png',
nothing: process.uniEnv.qn_base_url + 'zanwucuoti@3x.png',
isEmptyList: true,//学时证和国家证都为空显示空 isEmptyList: true,//学时证和国家证都为空显示空
value: '', value: '',
type: 'select', type: 'select',
...@@ -160,7 +172,17 @@ export default { ...@@ -160,7 +172,17 @@ export default {
_freshing: false, _freshing: false,
} }
}, },
computed: {}, computed: {
hasData(){
if(this.countryCertList && this.countryCertList.length > 0){
return true
}else if(this.learnCertList && this.learnCertList.length > 0){
return true
}else{
return false
}
}
},
onLoad() { onLoad() {
this.checkType = '特种作业操作证查询' this.checkType = '特种作业操作证查询'
}, },
...@@ -610,4 +632,12 @@ page { ...@@ -610,4 +632,12 @@ page {
} }
} }
} }
.empty-value{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 30rpx;
text-align: center;
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment