diff --git a/components/DropDown/DropDown.vue b/components/DropDown/DropDown.vue index 759b222..d53355f 100644 --- a/components/DropDown/DropDown.vue +++ b/components/DropDown/DropDown.vue @@ -1,26 +1,21 @@ @@ -31,23 +26,27 @@ */ import DropDownItem from "./DropDownItem.vue" export default { - name:"DropDown", + name: "DropDown", components: { DropDownItem }, props: { postlist: { - type:Array, - default(){ - return [['全部', '餐饮美食', '百货超市', '美容美发'],['区域1', '区域2', '区域3', '区域4'],['100m2','200m2','300m2'],['附近的', '最新发布的', '其他']] + type: Array, + default () { + return [ + ['全部', '餐饮美食', '百货超市', '美容美发'], + ['区域1', '区域2', '区域3', '区域4'], + ['100m2', '200m2', '300m2'], + ['附近的', '最新发布的', '其他'] + ] } } }, data() { return { - title: ['行业','区域','面积','筛选'], + title: ['行业', '区域', '面积', '筛选'], activeIndex: -1, - // postlist: [['全部', '餐饮美食', '百货超市', '美容美发'],['区域1', '区域2', '区域3', '区域4'],['100m2','200m2','300m2'],['附近的', '最新发布的', '其他']] }; }, computed: { @@ -55,29 +54,33 @@ return this.postlist[this.activeIndex] } }, + created() { + this.postlist[1]=JSON.parse(uni.getStorageSync('regionList')) + }, methods: { - changeActiveIndex(index){ - if(this.activeIndex === index){ + changeActiveIndex(index) { + if (this.activeIndex === index) { this.activeIndex = -1; - }else + } else this.activeIndex = index }, cancelDrop() { console.log("取消遮罩"); this.activeIndex = -1; } - }, - + } } \ No newline at end of file diff --git a/pages/my/my.vue b/pages/my/my.vue index 0a100fb..34a86c9 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -1,58 +1,86 @@ \ No newline at end of file diff --git a/pages/publish/publishAddress/publishAddress.vue b/pages/publish/publishAddress/publishAddress.vue index 442a5ac..edb7c1f 100644 --- a/pages/publish/publishAddress/publishAddress.vue +++ b/pages/publish/publishAddress/publishAddress.vue @@ -9,7 +9,7 @@ - + 请选择行业业态 @@ -48,6 +48,7 @@ export default { data() { return { + regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[], ShopInfomation:{ city:'', area:'', diff --git a/pages/publish/publishInvestment/publishInvestment.vue b/pages/publish/publishInvestment/publishInvestment.vue index 5acceb5..81cfadd 100644 --- a/pages/publish/publishInvestment/publishInvestment.vue +++ b/pages/publish/publishInvestment/publishInvestment.vue @@ -14,7 +14,7 @@ - + @@ -54,6 +54,7 @@ export default { data() { return { + regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[], ShopInfomation:{ city:'', area:'', diff --git a/pages/publish/publishRent/publishRent.vue b/pages/publish/publishRent/publishRent.vue index 71ac51f..425d647 100644 --- a/pages/publish/publishRent/publishRent.vue +++ b/pages/publish/publishRent/publishRent.vue @@ -14,7 +14,7 @@ - + @@ -52,6 +52,7 @@ export default { data() { return { + regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[], ShopInfomation:{ city:'', area:'', diff --git a/pages/publish/publishTransfer/publishTransfer.vue b/pages/publish/publishTransfer/publishTransfer.vue index 16bd2b8..9d8ee4d 100644 --- a/pages/publish/publishTransfer/publishTransfer.vue +++ b/pages/publish/publishTransfer/publishTransfer.vue @@ -5,6 +5,7 @@ 发布房源图片({{ShopInfomation.count}}/5) +<<<<<<< HEAD @@ -58,6 +59,64 @@ 发布 +======= + + + + + + 请选择所属区域 + + + + + + + + + + 请选择行业类型 + + + + + + + 请选择行业业态 + + + + + + + + + + + + + + + + + + + + + + + + + + 发布 + +>>>>>>> remotes/origin/master @@ -65,6 +124,7 @@ export default { data() { return { +<<<<<<< HEAD action:'http://spsp.feashow.cn/api/upload/image/', form:{ title:'', @@ -78,38 +138,65 @@ name:'', call:'', introduce:'' +======= + regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [], + ShopInfomation: { + city: '', + area: '', + count: 0, + }, - columns:[ - + + form: { + title: '', + region: '', + place: '', + trade: '', + karma: '', + size: '', + rent: '', + sell: '', + name: '', + call: '', + introduce: '' +>>>>>>> remotes/origin/master + }, + 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() { +<<<<<<< HEAD this.$refs.uForm.validate().then(res => { console.log("提交表单信息:" + JSON.stringify(this.form)) uni.$u.toast('发布成功') @@ -132,25 +219,59 @@ }, onLoad() { this.getTradeInfo() +======= + 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('校验失败') + }) + }, + changeAddress(e) { + console.log('changeAddress', e); + // this.getAddressList(e) + }, + getAddressList(value) { + var that = this + uni.request({ + url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + value + '&key=' + + that.$api.key, + success(res) { + console.log('diz', res.data.result.location); + console.log('lat', res.data.result.location.lat); + console.log('lng', res.data.result.location.lng); + }, + fail(err) { + console.log('请求区域失败:', err); + } + }) + }, + }, + onReady() { + this.$refs.uForm.setRules(this.rules) +>>>>>>> remotes/origin/master } } + \ No newline at end of file diff --git a/service/request.js b/service/request.js index 5853c6c..cfd617f 100644 --- a/service/request.js +++ b/service/request.js @@ -1,4 +1,8 @@ +<<<<<<< HEAD const serverHost = 'http://spsp.feashow.cn/api'//http://xx.xxx.xx +======= +const serverHost = 'https://spsp.feashow.com/api/' //http://xx.xxx.xx +>>>>>>> remotes/origin/master const service = { get(url, data) { @@ -128,17 +132,26 @@ const toast = { } const apiService = { serverHost, + imgUrl:'https://spsp.feashow.com/', + key:'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB', uploadImgUrl: serverHost + `/upload/image/`, //登录接口 login(data) { - const url = `/login` + const url = '/login/mnpLogin' return new Promise((resolve, reject) => { resolve(service.post(url, data)) }) }, - // 展示用户信息 - getUserInfo() { - const url = '/user' + //code换手机号 + getMobile(data) { + const url = '/user/getMobileByMnp' + return new Promise((resolve, reject) => { + resolve(service.post(url, data)) + }) + }, + // 获取客服电话 + getCsTel() { + const url = '/center/cfg?key=kf_phone' return new Promise((resolve, reject) => { resolve(service.get(url)) }) @@ -174,10 +187,31 @@ const apiService = { resolve(service.putWithFormData(url, data)) }) }, +<<<<<<< HEAD getTradeInfo(data){ const url = `/home/classlist?pid=0/` return new Promise((resolve,reject) =>{ resolve(service.post(url, data)) +======= + // 获取轮播图 + getBanner() { + const url = `/home/banner` + return new Promise((resolve, reject) => { + resolve(service.get(url)) + }) + }, + // 获取热门信息 + getHotInfo() { + const url = `/news/nlists/` + return new Promise((resolve, reject) => { + resolve(service.get(url)) + }) + }, + getStat() { + const url = `/home/stat` + return new Promise((resolve, reject) => { + resolve(service.get(url)) +>>>>>>> remotes/origin/master }) } }