<view> <van-popup show="{{ yy_show }}" closeabl...
Создано: 16 февраля 2025 г.
Создано: 16 февраля 2025 г.
</view>text<!-- 医院列表 start--> <label wx:for="{{yy_list}}" wx:key="index"> <view class="tui-coupon-item tui-top20"> <image class="tui-coupon-bg" mode="widthFix" src="/img/bg_coupon_3x.png"></image> <view class="tui-coupon-item-left"> <view class="tui-coupon-price-box"> <view class="tui-coupon-price-sign" wx:if="{{item.lx!=4}}">¥</view> <view class="tui-coupon-price" wx:if="{{item.lx!=4}}">{{item.yhje}}</view> <view class="tui-coupon-price-sign" wx:if="{{item.lx==4}}" style="color: #e41f19;" bindtap="xz_zp" data-bh="{{item.bh}}">赠品-查看/更换</view> </view> <view class="tui-coupon-intro">{{item.yhbz}}</view> </view> <view class="tui-coupon-item-right"> <view class="tui-coupon-content"> <view class="tui-coupon-title-box"> <view class="tui-coupon-btn {{item.zt!=0?'tui-bg-grey':''}}">{{item.mc}}</view> <!-- <view class="tui-coupon-title">全部商品可用</view> --> </view> <view class="tui-coupon-rule"> <view class="tui-rule-box tui-padding-btm"> <view class="tui-coupon-circle"></view> <view class="tui-coupon-text" style="color: #e41f19;">{{item.wm}}</view> </view> <view class="tui-rule-box tui-padding-btm"> <view class="tui-coupon-circle"></view> <view class="tui-coupon-text">不可叠加使用</view> </view> <view class="tui-rule-box"> <view class="tui-coupon-circle"></view> <!-- <view class="tui-coupon-text">{{index%2==0?'自领取之日起30天有效':'2019-11-01至2019-12-31'}}</view> --> <view class="tui-coupon-text">{{item.yxq}}</view> </view> </view> </view> <radio checked="{{item.bh==yh}}" class="tui-coupon-radio" color="#e41f19" value="{{item.bh}}"></radio> </view> </view> </label> <!-- 医院列表 end--> </radio-group> <view class="tui-seat__box tui-top20"></view> </scroll-view> <!-- <view class="tui-btn-pay"> <tui-button shadow bindclick="save_yh" height="88rpx" shape="circle" type="danger">确定</tui-button> </view> --> </view> </van-popup>
[ WXML 文件编译错误] ./pages/addorder/index.wxml
expect end-tag view
., near van-pop...
161 | -->
162 | </view>
163 | </van-popup>
| ^
164 | </view>
165 | <!-- 医院选择 end-->
at files://pages/addorder/index.wxml#163(env: Windows,mp,1.06.2407092; lib: 2.32.3)
[system] Subpackages: N/A
[system] LazyCodeLoading: false
[ WXML 文件编译错误] ./pages/addorder/index.wxml
expect end-tagview
., nearvan-pop...
161 | -->
162 | </view>
163 | </van-popup>
| ^
164 | </view>
165 | <!-- 医院选择 end-->
at files://pages/addorder/index.wxml#163(env: Windows,mp,1.06.2407092; lib: 2.32.3)
The error you're encountering in your WXML file indicates that there is a mismatch in the opening and closing tags for the view
and van-popup
components. The error message points to an issue around the closing tag of van-popup
.
Here's what could be wrong and how to fix it:
Check the Closing Tags: Ensure that every opening <view>
tag has a corresponding closing </view>
tag, and the same goes for the van-popup
tag. In the provided code, you may have accidentally closed a view
tag too early or missed closing one of the components.
Fix the WXML Structure: Make sure that the structure is consistent and correctly nested. If you're closing a view
tag before the van-popup
, then the parser will be confused.
Here is a cleaned-up version of your WXML code that ensures proper tag closure:
xml<view> <van-popup show="{{ yy_show }}" closeable position="bottom" custom-style="height: 20%" bind:close="onClose"> <view class="tui-coupon__box"> <view class="tui-coupon__title"> <text>医院</text> <view bindtap="close" class="tui-icon-close"> <tui-icon color="#BFBFBF" name="shut" size="{{22}}"></tui-icon> </view> </view> <scroll-view scrollY class="tui-coupon__list"> <radio-group bindchange="xz_hd"> <!-- 医院列表 start--> <label wx:for="{{yy_list}}" wx:key="index"> <view class="tui-coupon-item tui-top20"> <image class="tui-coupon-bg" mode="widthFix" src="/img/bg_coupon_3x.png"></image> <view class="tui-coupon-item-left"> <view class="tui-coupon-price-box"> <view class="tui-coupon-price-sign" wx:if="{{item.lx!=4}}">¥</view> <view class="tui-coupon-price" wx:if="{{item.lx!=4}}">{{item.yhje}}</view> <view class="tui-coupon-price-sign" wx:if="{{item.lx==4}}" style="color: #e41f19;" bindtap="xz_zp" data-bh="{{item.bh}}">赠品-查看/更换</view> </view> <view class="tui-coupon-intro">{{item.yhbz}}</view> </view> <view class="tui-coupon-item-right"> <view class="tui-coupon-content"> <view class="tui-coupon-title-box"> <view class="tui-coupon-btn {{item.zt!=0?'tui-bg-grey':''}}">{{item.mc}}</view> </view> <view class="tui-coupon-rule"> <view class="tui-rule-box tui-padding-btm"> <view class="tui-coupon-circle"></view> <view class="tui-coupon-text" style="color: #e41f19;">{{item.wm}}</view> </view> <view class="tui-rule-box tui-padding-btm"> <view class="tui-coupon-circle"></view> <view class="tui-coupon-text">不可叠加使用</view> </view> <view class="tui-rule-box"> <view class="tui-coupon-circle"></view> <view class="tui-coupon-text">{{item.yxq}}</view> </view> </view> </view> <radio checked="{{item.bh==yh}}" class="tui-coupon-radio" color="#e41f19" value="{{item.bh}}"></radio> </view> </view> </label> <!-- 医院列表 end--> </radio-group> <view class="tui-seat__box tui-top20"></view> </scroll-view> </view> </van-popup> </view>
van-popup
component correctly encapsulates all content, and the closing </van-popup>
tag is placed at the end.view
tag.Try this and see if it resolves the issue.