update pages/order/aftersale/return-delivery.vue.

修改1:进入该页面报: Cannot read properties of undefined (reading 'name'),原因是在{{ state.expresses[state.expressIndex].name }}这行代码,onLoad异步加载后端快递公司列表,在state.expresses为空数组时,直接读取name字段导致报错。
修改方式:增加v-if判断。

修改2:物流公司右侧增加箭头图标。icon-jiantou替换为_icon-forward。



Signed-off-by: zhaowg <suolong.hzw@foxmail.com>
pull/59/head
zhaowg 2024-07-17 03:35:24 +00:00 committed by Gitee
parent 6550441bc9
commit e289c10270
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 9 additions and 8 deletions

View File

@ -6,15 +6,16 @@
<view class='list borRadius14'> <view class='list borRadius14'>
<view class='item acea-row row-between-wrapper' style="display: flex;align-items: center;"> <view class='item acea-row row-between-wrapper' style="display: flex;align-items: center;">
<view>物流公司</view> <view>物流公司</view>
<view v-if="state.expresses.length>0" style="flex:1">
<picker mode='selector' class='num' @change="bindPickerChange" :value="state.expressIndex" <picker mode='selector' class='num' @change="bindPickerChange" :value="state.expressIndex"
:range="state.expresses" range-key="name"> :range="state.expresses" range-key="name">
<view class="picker acea-row row-between-wrapper"> <view class="picker acea-row row-between-wrapper" style="display: flex;justify-content: space-between;">
<view class='reason'>{{ state.expresses[state.expressIndex].name }}</view> <view class='reason'>{{ state.expresses[state.expressIndex].name }}</view>
<!-- TODO 芋艿这里样式有问题少了 > 按钮 --> <text class='iconfont _icon-forward' />
<text class='iconfont icon-jiantou' />
</view> </view>
</picker> </picker>
</view> </view>
</view>
<view class='item textarea acea-row row-between' style="display: flex;align-items: center;"> <view class='item textarea acea-row row-between' style="display: flex;align-items: center;">
<view>物流单号</view> <view>物流单号</view>
<input placeholder='请填写物流单号' class='num' name="logisticsNo" <input placeholder='请填写物流单号' class='num' name="logisticsNo"