Commit 4674451f by zhangxw

省市区选择bug修复

1 parent 81300294
......@@ -72,7 +72,7 @@ Component({
// 已是区级
if (input.length === 6 && input.slice(4) !== '00') return input
// 传市级:找该市下第一个区
if (areaList && areaList.county_list && areaList.county_list[cityCode]) return cityCode // unlikely
if (areaList && areaList.county_list && !areaList.county_list[cityCode]) return cityCode // 当市下没有区级数据时 选中市级
if (areaList && areaList.county_list) {
const prefix = cityCode.slice(0, 4)
const match = Object.keys(areaList.county_list).find(c => c.slice(0, 4) === prefix)
......
......@@ -102,6 +102,6 @@
<car-brand id="car-brand" popupShow="{{carBrandPopupShow}}" multiple selectedList="{{selectedMainBrand}}"></car-brand>
</popup>
<select-popup show="{{showSelectPopup}}" options="{{selectOptions}}" multiple="{{selectMultiple}}" values="{{selectValues}}" value="{{selectValue}}" bindconfirm="handlePopupConfirm" bindcancel="hideSelectPopup" title="{{selectTitle}}"></select-popup>
<select-area show="{{showSelectArea}}" areaList="{{areaList}}" bindconfirm="areaConfirm" bindcancel="areaCancel" value="{{infoData.districtId || ''}}"></select-area>
<select-area show="{{showSelectArea}}" areaList="{{areaList}}" bindconfirm="areaConfirm" bindcancel="areaCancel" value="{{infoData.districtId || infoData.cityId || ''}}"></select-area>
<!-- 结果弹窗组件:统一反馈弹窗 -->
<result-dialog id="resultDialog" bind:ok="onDialogOk" bind:close="onDialogClose" />
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!