更改区县根据定位

This commit is contained in:
闫晓茹 2023-11-13 10:37:21 +08:00
parent 67c22e8731
commit 38f694e948
3 changed files with 304 additions and 279 deletions

View File

@ -20,7 +20,6 @@
预约状态 预约状态
<!-- <span v-if="item.exceedStatus == '0'">生效中</span> <!-- <span v-if="item.exceedStatus == '0'">生效中</span>
<span v-if="item.exceedStatus == '1'">已过期</span> --> <span v-if="item.exceedStatus == '1'">已过期</span> -->
<uni-tag v-if="item.exceedStatus == '0'" text="生效中" size="mini" type="success" /> <uni-tag v-if="item.exceedStatus == '0'" text="生效中" size="mini" type="success" />
<uni-tag v-if="item.exceedStatus == '1'" size="mini" text="已过期" /> <uni-tag v-if="item.exceedStatus == '1'" size="mini" text="已过期" />
</view> </view>

View File

@ -62,7 +62,6 @@
</view> </view>
<u-action-sheet :show="showSex" :actions="actions" title="请选择性别" @close="showSex = false" @select="sexSelect"> <u-action-sheet :show="showSex" :actions="actions" title="请选择性别" @close="showSex = false" @select="sexSelect">
</u-action-sheet> </u-action-sheet>
11
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>

View File

@ -197,14 +197,15 @@
protocolshow: false, protocolshow: false,
radio: '', radio: '',
stepnumber: 1, stepnumber: 1,
code:'',
query: { query: {
province: '370000000000', province: '370000000000',
provinceName: '山东省', provinceName: '山东省',
residentName: null, residentName: null,
identity: null, identity: null,
phone: null, phone: null,
city: '371400000000', city: '',
cityName: '德州市', cityName: '',
county: null, county: null,
countyName: null, countyName: null,
town: null, town: null,
@ -303,7 +304,7 @@
title: '请先同意并签署服务协议', title: '请先同意并签署服务协议',
type: 'error', type: 'error',
}) })
}else{ } else {
// if (!this.query.county || !this.query.orgNo || !this.query.userName || !this.query.crowdList || this.query // if (!this.query.county || !this.query.orgNo || !this.query.userName || !this.query.crowdList || this.query
@ -440,6 +441,11 @@
}, },
//list //list
arealistinfo(code, list) { arealistinfo(code, list) {
var region = uni.getStorageSync('region')
//
if (region == 1) {
this.query.city='371400000000'
this.query.cityName='德州市'
arealist(code).then(res => { arealist(code).then(res => {
if (list == 'county') { if (list == 'county') {
this.countylist = res.data this.countylist = res.data
@ -449,6 +455,20 @@
this.villagelist = res.data this.villagelist = res.data
} }
}) })
} else {
this.query.city = 370500000000
this.query.cityName='东营市'
arealist(code).then(res => {
if (list == 'county') {
this.countylist = res.data
} else if (list == 'Township') {
this.Townshiplist = res.data
} else if (list == 'village') {
this.villagelist = res.data
}
})
}
}, },
// //
gochoosedoctor() { gochoosedoctor() {
@ -482,7 +502,7 @@
}, },
// //
villageshowtrue() { villageshowtrue() {
if (!this.query.town) { if (!this.query.townName) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请先选择街道/乡镇', title: '请先选择街道/乡镇',
type: 'error', type: 'error',
@ -591,7 +611,14 @@
}, },
}, },
onLoad(options) { onLoad(options) {
var region = uni.getStorageSync('region')
//
if (region == 1) {
this.arealistinfo('371400000000 ', 'county'); this.arealistinfo('371400000000 ', 'county');
} else {
this.arealistinfo('370500000000', 'county');
}
// }
this.getCrowdinfo(); this.getCrowdinfo();
let date = new Date(); let date = new Date();
let year = date.getFullYear(); let year = date.getFullYear();