diff --git a/pages/index/index.vue b/pages/index/index.vue index bcb85bb..0e48559 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -47,7 +47,6 @@ this.getNotice() this.getStat() this.open() - this.getRegionList() }, methods: { getBanner(){ @@ -89,8 +88,6 @@ success(res) { console.log('res.latitude', res.latitude); console.log('res.longitude', res.longitude); - uni.setStorageSync('latitude', res.latitude); - uni.setStorageSync('longitude', res.longitude); qqmapsdk.reverseGeocoder({ location: { latitude: res.latitude, @@ -106,6 +103,7 @@ uni.setStorageSync('city_code', re.result.ad_info.city_code.substring(3)); uni.setStorageSync('city', city.slice(0, 2)); uni.setStorageSync('district', district); + that.getRegionList() // that.position = city.slice(0, 2) + district.slice(0, 2) }, fail: (re) => { diff --git a/pages/publish/publishTransfer/publishTransfer.vue b/pages/publish/publishTransfer/publishTransfer.vue index 3ca6f12..a281b2b 100644 --- a/pages/publish/publishTransfer/publishTransfer.vue +++ b/pages/publish/publishTransfer/publishTransfer.vue @@ -5,56 +5,62 @@ 发布房源图片({{ShopInfomation.count}}/5) - - - - - - 请选择所属区域 - - - - - - - - - - 请选择行业类型 - - - - - - - 请选择行业业态 - - - - - - - - - - - - - - - - - - - - - - - - - - 发布 - + + + + + + 请选择所属区域 + + + + + + + + + + 请选择行业类型 + + + + + + + 请选择行业业态 + + + + + + + + + + + + + + + + + + + + + + + + + + 发布 + @@ -62,91 +68,96 @@ export default { data() { return { - regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[], - ShopInfomation:{ - city:'', - area:'', - count:0, - + regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [], + ShopInfomation: { + city: '', + area: '', + count: 0, + }, - - form:{ - title:'', - region:'', - place:'', - trade:'', - karma:'', - size:'', - rent:'', - sell:'', - name:'', - call:'', - introduce:'' + + form: { + title: '', + region: '', + place: '', + trade: '', + karma: '', + size: '', + rent: '', + sell: '', + name: '', + call: '', + introduce: '' }, - columns:[ - + columns: [ + ], - show1:false, - show2:false, - show3:false, - rules:{ - 'title':[{ - type:'string', - require:true, - message:'请输入姓名', - trigger: ['change','blur'] - }], - 'place':[{ - type:'string', - require:true, - message:'请输入地址', - trigger:['change','blur'] - }], - - }, + show1: false, + show2: false, + show3: false, + rules: { + 'title': [{ + type: 'string', + require: true, + message: '请输入姓名', + trigger: ['change', 'blur'] + }], + 'place': [{ + type: 'string', + require: true, + message: '请输入地址', + trigger: ['change', 'blur'] + }], + + }, } - }, methods: { + handleSearchAddress() { + uni.navigateTo({ + url: '/pages/publish/chooseAddress/chooseAddress' + }) + }, confirmArea(e) { - this.ShopInfomation.city = e.value[0] - this.ShopInfomation.area = e.value[1] - this.show1 = false - }, + this.ShopInfomation.city = e.value[0] + this.ShopInfomation.area = e.value[1] + this.show1 = false + }, submit() { - this.$refs.uForm.validate().then(res => { - console.log("提交表单信息:" + JSON.stringify(this.form)) - uni.$u.toast('发布成功') - // 调用服务端入表接口W - }).catch(errors => { - console.log("失败信息:" + JSON.stringify(errors)) - // uni.$u.toast('校验失败') - }) - } + this.$refs.uForm.validate().then(res => { + console.log("提交表单信息:" + JSON.stringify(this.form)) + uni.$u.toast('发布成功') + // 调用服务端入表接口W + }).catch(errors => { + console.log("失败信息:" + JSON.stringify(errors)) + // uni.$u.toast('校验失败') + }) + } }, - - onReady() { - this.$refs.uForm.setRules(this.rules) + + onReady() { + this.$refs.uForm.setRules(this.rules) }, } + \ No newline at end of file