Commit 8f64803d by chenwq

fix(validReferralCount): 修复凭证列表为空时缺少空状态显示的问题

调整 WXML 中凭证列表的条件渲染逻辑,当 fileList 为空时显示空数据组件,避免空白区域。
同时统一函数声明格式并移除不必要的 image 标签属性。
1 parent 95f5c876
<!--packageWorkspace/pages/validReferralCount/components/detailItem/detailItem.wxml--> <!--packageWorkspace/pages/validReferralCount/components/detailItem/detailItem.wxml-->
<wxs module="utils"> <wxs module="utils">
var formatBrandName = function(name) { var formatBrandName = function (name) {
if (!name) return ''; if (!name) return '';
if (name.length > 10) { if (name.length > 10) {
return name.substring(0, 10) + '...'; return name.substring(0, 10) + '...';
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<!-- Title --> <!-- Title -->
<view class="header"> <view class="header">
<view class="title-bar"> <view class="title-bar">
<image src="{{IMG_URL}}title_icon.png" mode=""/> <image src="{{IMG_URL}}title_icon.png" mode="" />
<text class="title">{{sceneMap[item.sceneType] || ''}}</text> <text class="title">{{sceneMap[item.sceneType] || ''}}</text>
</view> </view>
</view> </view>
...@@ -49,17 +49,14 @@ ...@@ -49,17 +49,14 @@
<!-- Evidence --> <!-- Evidence -->
<view class="section" wx:if="{{fileList.length > 0}}"> <view class="section" wx:if="{{fileList.length > 0}}">
<view class="section-title label">凭证</view> <view class="section-title label">凭证</view>
<view class="image-list"> <view class="image-list" wx-if="{{fileList.length}}">
<block wx:for="{{fileList}}" wx:key="index"> <block wx:for="{{fileList}}" wx:key="index">
<image <image class="image-item" src="{{item.fileUrl}}" mode="aspectFill" data-index="{{index}}" bindtap="previewImage" />
class="image-item"
src="{{item.fileUrl}}"
mode="aspectFill"
data-index="{{index}}"
bindtap="previewImage"
/>
</block> </block>
</view> </view>
<view wx:else>
<empty-data />
</view>
</view> </view>
<!-- Remark --> <!-- Remark -->
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!