返回内容的时候增加判断

master
于肖磊 2025-04-24 16:20:27 +08:00
parent 29e15a09d6
commit 7e3395086e
2 changed files with 6 additions and 4 deletions

View File

@ -29,6 +29,7 @@
</template>
<script>
const app = getApp();
import { isEmpty } from '@/common/js/common/common.js';
import componentPopup from "@/components/popup/popup";
export default {
data() {
@ -200,9 +201,10 @@ export default {
},
//
sub_ragion_event(e) {
let province = this.columns[0][this.columns_index[0]];
let city = this.columns[1][this.columns_index[1]];
let areal = this.columns[2][this.columns_index[2]];
// 0
let province = this.columns[0][isEmpty(this.columns_index[0]) ? 0 : this.columns_index[0]];
let city = this.columns[1][isEmpty(this.columns_index[1]) ? 0 : this.columns_index[1]];
let areal = this.columns[2][isEmpty(this.columns_index[2]) ? 0 : this.columns_index[2]];
uni.setStorageSync(this.cache_key, {
province: province,
city: city,

View File

@ -736,7 +736,7 @@
region_picker_show: false,
});
},
region_event(address1, address2, address3) {
region_event() {
let data = uni.getStorageSync(app.globalData.data.cache_region_picker_choice_key) || {};
if((data.province || null) == null) {
data.province = {};