Commit 9ab5b031 by 胡悦

fix(vehicleDetail): 修复车辆详情页初始化数据为null的问题并增加分页大小

将vehicleDetail页面的detail默认值从空对象改为null
增加SecondHandCar组件中VehicleList的分页大小从5改为10
修复mileage显示条件判断不严谨的问题
1 parent 6fa71c1f
...@@ -22,7 +22,7 @@ Component({ ...@@ -22,7 +22,7 @@ Component({
this.setData({ this.setData({
pageParams: { pageParams: {
pageNum: 1, pageNum: 1,
pageSize: 5 pageSize: 10
}, },
scrollTop: 0 scrollTop: 0
}) })
...@@ -44,7 +44,7 @@ Component({ ...@@ -44,7 +44,7 @@ Component({
vehicle_category, vehicle_category,
pageParams: { pageParams: {
pageNum: 1, pageNum: 1,
pageSize: 5 pageSize: 10
}, },
total: 0, total: 0,
sortParams: {}, sortParams: {},
...@@ -82,7 +82,7 @@ Component({ ...@@ -82,7 +82,7 @@ Component({
sortParams: params, sortParams: params,
pageParams: { pageParams: {
pageNum: 1, pageNum: 1,
pageSize: 5 pageSize: 10
}, },
scrollTop: 0 scrollTop: 0
}) })
......
...@@ -10,7 +10,7 @@ Page({ ...@@ -10,7 +10,7 @@ Page({
'https://scrm.test.glsx.com.cn/group1/M00/07/3F/wKgD3mc255SAdNJ4AAAWi9wQ6GM113.png', 'https://scrm.test.glsx.com.cn/group1/M00/07/3F/wKgD3mc255SAdNJ4AAAWi9wQ6GM113.png',
'https://scrm.test.glsx.com.cn/group1/M00/07/3B/wKgD3mcsaZGAdjzYAAFI8MRvYEs452.jpg'], 'https://scrm.test.glsx.com.cn/group1/M00/07/3B/wKgD3mcsaZGAdjzYAAFI8MRvYEs452.jpg'],
current: 0, current: 0,
detail: {}, detail: null,
usageTypeEnum: { usageTypeEnum: {
1: '非营运', 1: '非营运',
2: '营运', 2: '营运',
......
<!-- packagesList/packageOutput/pages/vehicleDetail/vehicleDetail.wxml --> <!-- packagesList/packageOutput/pages/vehicleDetail/vehicleDetail.wxml -->
<wxs src="../../index.wxs" module="filter" /> <wxs src="../../index.wxs" module="filter" />
<view class="vehicle-detail"> <view class="vehicle-detail" wx:if="{{detail}}">
<view class="swiper-contain"> <view class="swiper-contain">
<swiper class="swiper-box" current="{{current}}" bindchange="onSwiperChange"> <swiper class="swiper-box" current="{{current}}" bindchange="onSwiperChange">
<block wx:for="{{detail.bannerList}}" wx:key="*this"> <block wx:for="{{detail.bannerList}}" wx:key="*this">
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<view class="label">首次上牌</view> <view class="label">首次上牌</view>
</view> </view>
<view class="info-item"> <view class="info-item">
<view class="value">{{detail.mileage ? filter.mileageFormat(detail.mileage) : '-'}}</view> <view class="value">{{detail.mileage !== undefined && detail.mileage !== null ? filter.mileageFormat(detail.mileage) : '-'}}</view>
<view class="label">表显里程</view> <view class="label">表显里程</view>
</view> </view>
<view class="info-item"> <view class="info-item">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!