From f7537b0b82c633e90f52bc870f4de582a3ef5ad0 Mon Sep 17 00:00:00 2001 From: dengj <209192278@qq.com> Date: Wed, 15 Nov 2023 17:15:10 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 4 +- .../publishTransfer/publishTransfer.vue | 262 ++++++++++-------- 2 files changed, 140 insertions(+), 126 deletions(-) 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 From 830b5482f06cbb19fdb80879c85388af9af85f5d Mon Sep 17 00:00:00 2001 From: dengj <209192278@qq.com> Date: Wed, 15 Nov 2023 17:43:52 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E8=BD=AC=E4=B8=BA=E7=BB=8F=E7=BA=AC=E5=BA=A6=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 4 +-- .../publishTransfer/publishTransfer.vue | 27 +++++++++++++++---- service/request.js | 1 + 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 0e48559..7dddafe 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -51,8 +51,8 @@ methods: { getBanner(){ this.$api.getBanner().then(res=>{ - console.log('lunbo',res.data.data); - this.swiperList = res.data.data.map(item=>item.img) + console.log('轮播图',res.data.data); + this.swiperList = res.data.data.map(item=>this.$api.imgUrl+item.img) }) }, getNotice(){ diff --git a/pages/publish/publishTransfer/publishTransfer.vue b/pages/publish/publishTransfer/publishTransfer.vue index a281b2b..de83147 100644 --- a/pages/publish/publishTransfer/publishTransfer.vue +++ b/pages/publish/publishTransfer/publishTransfer.vue @@ -20,7 +20,7 @@ + @change="changeAddress"> 请选择行业类型 @@ -132,13 +132,30 @@ 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) - }, - + } } diff --git a/service/request.js b/service/request.js index dd9939f..f2a842a 100644 --- a/service/request.js +++ b/service/request.js @@ -128,6 +128,7 @@ const toast = { } const apiService = { serverHost, + imgUrl:'https://spsp.feashow.com/', key:'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB', uploadImgUrl: serverHost + `/upload/image/`, //登录接口 From aef4ba9e7ae5912fc04752efedc121dbd240a61b Mon Sep 17 00:00:00 2001 From: dengj <209192278@qq.com> Date: Wed, 15 Nov 2023 17:53:45 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/my/login/login.vue | 4 ---- pages/my/my.vue | 3 --- 2 files changed, 7 deletions(-) diff --git a/pages/my/login/login.vue b/pages/my/login/login.vue index 6fc4400..3edeb0b 100644 --- a/pages/my/login/login.vue +++ b/pages/my/login/login.vue @@ -58,10 +58,6 @@ console.log('res.da',res); // console.log('登录code换取的信息', data); uni.setStorageSync('loginToken', data.token); - uni.setStorageSync('avatar', data.avatar); - uni.setStorageSync('nickname', data.nickname); - uni.setStorageSync('account', data.sn); - uni.setStorageSync('mobile', data.mobile); that.$toast.success('登录成功') that.$emit('success') //登录完成后使用手机code换取手机号,调用/user/getMobileByMnp接口 diff --git a/pages/my/my.vue b/pages/my/my.vue index 343daf8..c62e6b4 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -53,9 +53,6 @@ return } this.isLoad = true - this.src = uni.getStorageSync('avatar') - this.username = uni.getStorageSync('nickname') - this.account = uni.getStorageSync('account') }, methods: { reOnLoad() { From 3eb1f80045d4ccd45ab1af344e13020c06d4b8ef Mon Sep 17 00:00:00 2001 From: LuoShijie Date: Wed, 15 Nov 2023 20:39:47 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E7=BD=97=E4=B8=96=E6=9D=B0=EF=BC=9A?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=95=B0=E6=8D=AE=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/HomeMainContent/Statistics.vue | 39 +++++++++------------- pages/index/index.vue | 7 ++-- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/pages/index/HomeMainContent/Statistics.vue b/pages/index/HomeMainContent/Statistics.vue index 4b046ec..6d0beef 100644 --- a/pages/index/HomeMainContent/Statistics.vue +++ b/pages/index/HomeMainContent/Statistics.vue @@ -8,9 +8,9 @@ /> 累计用户 - {{ totalUser }} + {{ statNum.all_user_num }} - 昨日新增{{ yesterdayUser }}位 + 昨日新增{{ statNum.yesterday_user_num }}位 @@ -22,9 +22,9 @@ /> 累计转店 - {{ totalTrans }} + {{ statNum.all_trans_num }} - 昨日新增{{ yesterdayTrans }}位 + 昨日新增{{ statNum.yesterday_trans_num }}位 @@ -35,9 +35,9 @@ /> 累计找店 - {{ totalSearch }} + {{ statNum.all_find_num }} - 昨日新增{{ yesterdaySearch }}位 + 昨日新增{{ statNum.yesterday_find_num }}位 @@ -47,27 +47,18 @@ diff --git a/pages/index/index.vue b/pages/index/index.vue index 08f8a1f..dc4d0be 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -7,7 +7,7 @@ - + 店铺列表 @@ -37,7 +37,7 @@ return { notice: [], chooseIndex: 0, - statisticsNum: [231753, 1345], + statNum: {}, swiperList:[] } }, @@ -59,7 +59,8 @@ }, getStat(){ this.$api.getStat().then(res=>{ - this.statisticsNum = res.data.data + this.statNum = res.data.data + console.log(res.data.data); }) } }, From dfb74d02af1f817c4c86a41182233e67eab74be3 Mon Sep 17 00:00:00 2001 From: LuoShijie Date: Wed, 15 Nov 2023 23:10:11 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E7=BD=97=E4=B8=96=E6=9D=B0:fixed=EF=BC=9A?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=8B=9B=E5=95=86=EF=BC=8C=E5=87=BA=E7=A7=9F?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=AE=A2=E6=9C=8D?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/DropDown/DropDown.vue | 1 - pages/index/NavBarPages/czxx/czxx.vue | 2 +- pages/index/NavBarPages/xmzs/xmzs.vue | 2 +- pages/index/index.vue | 20 +++++++++++++++++++- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/components/DropDown/DropDown.vue b/components/DropDown/DropDown.vue index fbb3786..d53355f 100644 --- a/components/DropDown/DropDown.vue +++ b/components/DropDown/DropDown.vue @@ -47,7 +47,6 @@ return { title: ['行业', '区域', '面积', '筛选'], activeIndex: -1, - // postlist: [['全部', '餐饮美食', '百货超市', '美容美发'],['区域1', '区域2', '区域3', '区域4'],['100m2','200m2','300m2'],['附近的', '最新发布的', '其他']] }; }, computed: { diff --git a/pages/index/NavBarPages/czxx/czxx.vue b/pages/index/NavBarPages/czxx/czxx.vue index ef1e820..fafc32c 100644 --- a/pages/index/NavBarPages/czxx/czxx.vue +++ b/pages/index/NavBarPages/czxx/czxx.vue @@ -15,7 +15,7 @@ - + diff --git a/pages/index/NavBarPages/xmzs/xmzs.vue b/pages/index/NavBarPages/xmzs/xmzs.vue index ef1e820..fafc32c 100644 --- a/pages/index/NavBarPages/xmzs/xmzs.vue +++ b/pages/index/NavBarPages/xmzs/xmzs.vue @@ -15,7 +15,7 @@ - + diff --git a/pages/index/index.vue b/pages/index/index.vue index 629d325..f680ff4 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -4,6 +4,13 @@ + @@ -51,7 +58,6 @@ methods: { getBanner(){ this.$api.getBanner().then(res=>{ - console.log('轮播图',res.data.data); this.swiperList = res.data.data.map(item=>this.$api.imgUrl+item.img) }) }, @@ -175,6 +181,18 @@ right: 17rpx; top: 1109rpx; z-index: 1; + .service-btn { + position: absolute; + top: 0; + background-color: inherit; + border-radius: 50%; + width: 108rpx; + height: 108rpx; + } + .service-btn::after { + border: none; + + } } }