diff --git a/components/DropDown/DropDown.vue b/components/DropDown/DropDown.vue index 759b222..fbb3786 100644 --- a/components/DropDown/DropDown.vue +++ b/components/DropDown/DropDown.vue @@ -1,26 +1,21 @@ @@ -31,21 +26,26 @@ */ 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'],['附近的', '最新发布的', '其他']] }; @@ -55,29 +55,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 ec54cf3..c62e6b4 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -1,56 +1,86 @@ \ No newline at end of file diff --git a/pages/publish/publishAddress/publishAddress.vue b/pages/publish/publishAddress/publishAddress.vue index 01dfc6c..edb7c1f 100644 --- a/pages/publish/publishAddress/publishAddress.vue +++ b/pages/publish/publishAddress/publishAddress.vue @@ -6,10 +6,16 @@ 请选择所属区域 - + + + + 请选择行业业态 + + + @@ -42,6 +48,7 @@ export default { data() { return { + regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[], ShopInfomation:{ city:'', area:'', @@ -118,6 +125,8 @@ justify-content: space-between; } .arrow-icon{ - float: right; + position: absolute; + right: 10rpx; + transform: translateY(-20rpx); } diff --git a/pages/publish/publishInvestment/publishInvestment.vue b/pages/publish/publishInvestment/publishInvestment.vue index 11ecb52..81cfadd 100644 --- a/pages/publish/publishInvestment/publishInvestment.vue +++ b/pages/publish/publishInvestment/publishInvestment.vue @@ -11,18 +11,26 @@ 请选择所属区域 - + + + + 请选择行业类型 - + + + - 请输入行业业态 + 请选择行业业态 + + + @@ -46,6 +54,7 @@ export default { data() { return { + regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[], ShopInfomation:{ city:'', area:'', @@ -122,6 +131,8 @@ justify-content: space-between; } .arrow-icon{ - float: right; + position: absolute; + right: 10rpx; + transform: translateY(-20rpx); } diff --git a/pages/publish/publishRent/publishRent.vue b/pages/publish/publishRent/publishRent.vue index e5f167b..425d647 100644 --- a/pages/publish/publishRent/publishRent.vue +++ b/pages/publish/publishRent/publishRent.vue @@ -11,14 +11,19 @@ 请选择所属区域 - + + + + 请选择行业类型 - + + + @@ -47,6 +52,7 @@ export default { data() { return { + regionColumns:[JSON.parse(uni.getStorageSync('regionList'))]||[], ShopInfomation:{ city:'', area:'', @@ -123,6 +129,8 @@ justify-content: space-between; } .arrow-icon{ - float: right; + position: absolute; + right: 10rpx; + transform: translateY(-20rpx); } diff --git a/pages/publish/publishTransfer/publishTransfer.vue b/pages/publish/publishTransfer/publishTransfer.vue index 2225f68..de83147 100644 --- a/pages/publish/publishTransfer/publishTransfer.vue +++ b/pages/publish/publishTransfer/publishTransfer.vue @@ -5,48 +5,62 @@ 发布房源图片({{ShopInfomation.count}}/5) - - - - - - 请选择所属区域 - - - - - - - 请选择行业类型 - - - - - 请输入行业业态 - - - - - - - - - - - - - - - - - - - - - - - 发布 - + + + + + + 请选择所属区域 + + + + + + + + + + 请选择行业类型 + + + + + + + 请选择行业业态 + + + + + + + + + + + + + + + + + + + + + + + + + + 发布 + @@ -54,52 +68,113 @@ export default { data() { return { - ShopInfomation:{ - city:'', - area:'', - count:0, - + regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [], + ShopInfomation: { + city: '', + area: '', + count: 0, + }, - - form:{ - title:'' + + form: { + title: '', + region: '', + place: '', + trade: '', + karma: '', + size: '', + rent: '', + sell: '', + name: '', + call: '', + introduce: '' }, - columns:[ + columns: [ + ], - show1:false, - show2:false, - show3:false, + 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 - }, - submit(){ - console.log('提交'); - } + 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('校验失败') + }) + }, + 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) } } + \ No newline at end of file diff --git a/service/request.js b/service/request.js index d535a2f..f2a842a 100644 --- a/service/request.js +++ b/service/request.js @@ -1,4 +1,4 @@ -const serverHost = 'https://spsp.feashow.com/api/'//http://xx.xxx.xx +const serverHost = 'https://spsp.feashow.com/api/' //http://xx.xxx.xx const service = { get(url, data) { @@ -128,17 +128,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)) }) diff --git a/static/my/wo_icon_cc.png b/static/my/wo_icon_cc.png new file mode 100644 index 0000000..f00430c Binary files /dev/null and b/static/my/wo_icon_cc.png differ diff --git a/static/my/wo_icon_hh.png b/static/my/wo_icon_hh.png new file mode 100644 index 0000000..bfab27b Binary files /dev/null and b/static/my/wo_icon_hh.png differ diff --git a/static/my/wo_icon_pppp.png b/static/my/wo_icon_pppp.png new file mode 100644 index 0000000..4885f17 Binary files /dev/null and b/static/my/wo_icon_pppp.png differ diff --git a/static/my/wo_icon_xz.png b/static/my/wo_icon_xz.png new file mode 100644 index 0000000..756556a Binary files /dev/null and b/static/my/wo_icon_xz.png differ diff --git a/static/my/wo_icon_zr.png b/static/my/wo_icon_zr.png new file mode 100644 index 0000000..317291c Binary files /dev/null and b/static/my/wo_icon_zr.png differ diff --git a/static/my/wo_icon_zs.png b/static/my/wo_icon_zs.png new file mode 100644 index 0000000..a4bc6e1 Binary files /dev/null and b/static/my/wo_icon_zs.png differ