From f3cec1461eb91ee2861eb77be8642fceb30832bb Mon Sep 17 00:00:00 2001 From: LuoShijie Date: Sat, 18 Nov 2023 00:17:41 +0800 Subject: [PATCH 01/30] =?UTF-8?q?=E7=BD=97=E4=B8=96=E6=9D=B0=EF=BC=9A?= =?UTF-8?q?=E5=BA=97=E9=93=BA=E5=88=97=E8=A1=A8=E5=AD=97=E6=AE=B5=E7=BB=91?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ShowShopList/ShowShopList.vue | 72 +++---------------- .../ShowShopListItem/ShowShopListItem.vue | 7 +- 2 files changed, 15 insertions(+), 64 deletions(-) diff --git a/components/ShowShopList/ShowShopList.vue b/components/ShowShopList/ShowShopList.vue index 8c28097..b60061f 100644 --- a/components/ShowShopList/ShowShopList.vue +++ b/components/ShowShopList/ShowShopList.vue @@ -71,66 +71,11 @@ return 1 } }, - shopInfoList: { - type: Array, - default() { - return [ - { - id: 1, - type: 1, - shopid: 1, - imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg', - title: '琴行铺面转让', - promotionNum: 23, - price: 5000, - date: '2023-11-02', - pos: '锦江区', - exactPos: '锦江区-汇源南路366号', - sqr: 100, - zrfText: "转让费:20000万", - category: '餐饮美食', - uname: "张先生", - phoneNum: 13348946108, - }, - { - "id": "1", - "pic": "3", - "tt": "333", - "type": "0", - "adress": "", - "trade1": "啊", - "trade2": "餐馆", - "btype1": "", - "btype2": "", - "area1": "青羊区", - "area2": "", - "mianji": "33", - "zhuanrangfei": "44", - "zujin": "44", - "hits": "0", - "58url": "", - "personurl": "", - "kw": "", - "remark": "", - "content": "44vv", - "pics": "", - "user_level_id": "1", - "lianxiren": "3333", - "mobile": "44444", - "status": "1", - "shangpulx": "1", - "zhuangtai": "1", - "lng": "2222.00000000", - "lat": "3333.00000000", - "pub_time": "0", - "create_time": "1699973131", - "update_time": "1699973131", - "delete_time": "0", - "userid": "1", - "success": "2" - } - ] - } + + }, + data() { + return { + shopInfoList: [] } }, methods: { @@ -149,7 +94,12 @@ }) this.$api.getShopList(query).then(res => { console.log("shoplist",res.data.data); - + this.shopInfoList = res.data.data + this.shopInfoList.forEach(item=>{ + item.pics =this.$api.imgUrl + item.pics + }); + console.log("shoplist",res.data.data); + }) } }, diff --git a/components/ShowShopListItem/ShowShopListItem.vue b/components/ShowShopListItem/ShowShopListItem.vue index 4392766..15f9e70 100644 --- a/components/ShowShopListItem/ShowShopListItem.vue +++ b/components/ShowShopListItem/ShowShopListItem.vue @@ -5,7 +5,7 @@ - {{shopInfo.title}} + {{shopInfo.tt}} @@ -30,8 +30,9 @@ 租金:{{shopInfo.zujin}}元/月 - 发布日期:{{shopInfo.create_time}} + 发布日期:{{$u.timeFormat(shopInfo.create_time,'yyyy-mm-dd')}} 转让费:{{shopInfo.zhuanrangfei}} + @@ -163,7 +164,7 @@ id: this.shopInfo.id, type: this.shopInfo.type }) - // console.log("query",query); + console.log("query",query); uni.navigateTo({ url: '/pages/detail/detail' + `${query}` }) From fbb6b00cba7163ca28d3a892d3d5b536ce959c54 Mon Sep 17 00:00:00 2001 From: LuoShijie Date: Sat, 18 Nov 2023 18:07:01 +0800 Subject: [PATCH 02/30] =?UTF-8?q?=E7=BD=97=E4=B8=96=E6=9D=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9ShopList=E5=92=8CSearchList=E7=9A=84api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/DropDown/DropDown.vue | 21 ++---- components/SearchShopList/SearchShopList.vue | 64 ++++++++++--------- .../SearchShopListItem/SearchShopListItem.vue | 42 ++++++------ components/ShowShopList/ShowShopList.vue | 36 +++++------ .../ShowShopListItem/ShowShopListItem.vue | 4 +- pages/index/NavBarPages/czxx/czxx.vue | 2 +- pages/index/NavBarPages/xmzs/xmzs.vue | 2 +- 7 files changed, 78 insertions(+), 93 deletions(-) diff --git a/components/DropDown/DropDown.vue b/components/DropDown/DropDown.vue index 12c017a..b37b506 100644 --- a/components/DropDown/DropDown.vue +++ b/components/DropDown/DropDown.vue @@ -30,23 +30,16 @@ components: { DropDownItem }, - props: { - postlist: { - type: Array, - default () { - return [ - ['全部', '餐饮美食', '百货超市', '美容美发'], - ['区域1', '区域2', '区域3', '区域4'], - ['100m2', '200m2', '300m2'], - ['附近的', '最新发布的', '其他'] - ] - } - } - }, data() { return { title: ['行业', '区域', '面积', '筛选'], activeIndex: -1, + postlist: [ + ['全部', '餐饮美食', '百货超市', '美容美发'], + ['区域1', '区域2', '区域3', '区域4'], + ['小于50m²', '50-200m²', '200-600m²', '600-800m²', '800-1000m²', '1000m²以上'], + ['附近的', '最新发布的', '其他'] + ] }; }, computed: { @@ -56,7 +49,7 @@ }, created() { this.postlist[0]=JSON.parse(uni.getStorageSync('classList')) - // this.postlist[1]=JSON.parse(uni.getStorageSync('regionList')) + this.postlist[1]=JSON.parse(uni.getStorageSync('regionList')) }, methods: { changeActiveIndex(index) { diff --git a/components/SearchShopList/SearchShopList.vue b/components/SearchShopList/SearchShopList.vue index 3cdf75f..e4c6e35 100644 --- a/components/SearchShopList/SearchShopList.vue +++ b/components/SearchShopList/SearchShopList.vue @@ -13,13 +13,18 @@ diff --git a/service/request.js b/service/request.js index 727a26b..58d18ad 100644 --- a/service/request.js +++ b/service/request.js @@ -253,6 +253,16 @@ const apiService = { return new Promise((resolve,reject) => { resolve(service.get(url)) }) + }, + // 获得成交案例 + getSuccList(type){ + if (!type) { + type = 1 + } + const url = `/shop/succ/?type=${type}` + return new Promise((resolve,reject) => { + resolve(service.get(url)) + }) } } export { From 8feccdd6eb56e5813bb829c8fc1cbd6ea6af187e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com> Date: Sat, 18 Nov 2023 23:44:06 +0800 Subject: [PATCH 06/30] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=BA=97=E9=93=BA=E5=87=BA=E7=A7=9F,=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=8B=9B=E5=95=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../publishInvestment/publishInvestment.vue | 122 +++++++++++++----- pages/publish/publishRent/publishRent.vue | 84 ++++++++---- 2 files changed, 149 insertions(+), 57 deletions(-) diff --git a/pages/publish/publishInvestment/publishInvestment.vue b/pages/publish/publishInvestment/publishInvestment.vue index 7b24bf5..ee9e852 100644 --- a/pages/publish/publishInvestment/publishInvestment.vue +++ b/pages/publish/publishInvestment/publishInvestment.vue @@ -25,8 +25,8 @@ v-model="form.region" @confirm="regionConfirm"> - + @@ -38,14 +38,21 @@ - - + + - - + + - - + + + + + + + + @@ -59,18 +66,19 @@ export default { data() { return { - imageLength: '0', + imageLength: 0, fileList1: [], - regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [], - + regionColumns: [], form: { title: '', region: '', address: '', business: '', - mobile: '', - contact:'', - content: '', + area: '', + rent: '', + phone: '', + contactPerson: '', + details: '', images: [], longitude: '', latitude: '', @@ -100,12 +108,22 @@ message: '请选择地区', trigger: ['change'] }], - 'contact': [{ + 'area': [{ + required: true, + message: '请输入面积', + trigger: ['change', 'blur'] + }], + 'rent': [{ + required: true, + message: '请输入租金', + trigger: ['change', 'blur'] + }], + 'contactPerson': [{ required: true, message: '请输入姓名', trigger: ['change', 'blur'] }], - 'content': [{ + 'details': [{ required: true, message: '请输入介绍', trigger: ['change', 'blur'] @@ -115,7 +133,7 @@ message: '请输入地址', trigger: ['change', 'blur'] }], - 'mobile': [{ + 'phone': [{ required: true, message: '请输入电话号码', }, @@ -192,40 +210,76 @@ }) }, submit() { - const temp = [] - if (this.fileList1.length > 0) { - this.fileList1.map(item => { - const url = item.url - temp.push(url.replace(this.imgUrl + '/', '')) - }) - } - console.log('images---', temp.join(',')); this.$refs.uForm.validate().then(res => { - console.log("提交表单信息:" + JSON.stringify(this.form)) - uni.$u.toast('发布成功') - this.$api.publishInvestment(this.form).then(res => { + const temp = [] + if (this.fileList1.length > 0) { + this.fileList1.map(item => { + const url = item.url + temp.push(url.replace(this.imgUrl + '/', '')) + }) + } + if (this.form.latitude && this.form.longitude) { + console.log('经纬度都存在'); + } else { + uni.$u.toast('请输入准确地址') + return false + } + let data = { + ...this.form, + images: temp.join(',') + } + console.log("项目招商:", data) + this.$api.publishInvestment(data).then(res => { console.log(res); + if (res.data.code == 1) { + uni.$u.toast('发布成功') + } else { + uni.$u.toast(res.data.msg) + } }) }).catch(errors => { console.log("失败信息:" + JSON.stringify(errors)) // uni.$u.toast('校验失败') }) }, + changeAddressFocus() { + if (!this.form.region) { + uni.$u.toast('请先选择区域') + return false + } + }, changeAddress(e) { // console.log('changeAddress', e); this.getAddressList(e) }, + getRegionList() { + var that = this + uni.request({ + url: 'https://apis.map.qq.com/ws/district/v1/getchildren?id=' + uni.getStorageSync('city_code') + '&key=' + + that.$api.key, + success(res) { + that.regionColumns = [res.data.result[0].map(item => item.fullname)] + }, + fail(err) { + console.log('请求区域失败:', err); + } + }) + }, getAddressList(value) { var that = this uni.request({ - url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + value + '&key=' + + url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + that.form.region + value + '&key=' + that.$api.key, success(res) { console.log('diz', res.data.result.location); - // console.log('lat', res.data.result.location.lat); - that.form.latitude = res.data.result.location.lat - // console.log('lng', res.data.result.location.lng); - that.form.longitude = res.data.result.location.lng + if (res.data.message == "query ok") { + // console.log('lat', res.data.result.location.lat); + that.form.latitude = res.data.result.location.lat + // console.log('lng', res.data.result.location.lng); + that.form.longitude = res.data.result.location.lng + } else { + uni.$u.toast('请输入准确地址') + } }, fail(err) { console.log('请求区域失败:', err); @@ -257,6 +311,7 @@ }, onLoad() { + this.getRegionList() this.$api.getClassList().then(res => { // console.log(res.data.data.length); this.Classcolumns = res.data.data.map((item) => { @@ -305,6 +360,7 @@ .count { margin-bottom: 30px; } + // margin-right: 20px; } diff --git a/pages/publish/publishRent/publishRent.vue b/pages/publish/publishRent/publishRent.vue index fd4ed8d..16cc9d1 100644 --- a/pages/publish/publishRent/publishRent.vue +++ b/pages/publish/publishRent/publishRent.vue @@ -26,7 +26,7 @@ + @focus="changeAddressFocus" @blur="changeAddress"> @@ -38,15 +38,15 @@ - - {{form.commercial}} - 请选择店铺业态 + @@ -86,7 +86,7 @@ commercial: '', area: '', rent: '', - contact:'', + contact: '', mobile: '', content: '', images: [], @@ -225,40 +225,75 @@ }) }, submit() { - const temp = [] - if (this.fileList1.length > 0) { - this.fileList1.map(item => { - const url = item.url - temp.push(url.replace(this.imgUrl + '/', '')) - }) - } - console.log('images---', temp.join(',')); this.$refs.uForm.validate().then(res => { - console.log("提交表单信息:" + JSON.stringify(this.form)) - uni.$u.toast('发布成功') - this.$api.publishRent(this.form).then(res => { - console.log(res); + const temp = [] + if (this.fileList1.length > 0) { + this.fileList1.map(item => { + const url = item.url + temp.push(url.replace(this.imgUrl + '/', '')) + }) + } + if (this.form.latitude && this.form.longitude) { + console.log('经纬度都存在'); + } else { + uni.$u.toast('请输入准确地址') + return false + } + let data = { + ...this.form, + images: temp.join(',') + } + console.log("提交表单信息:", data) + this.$api.publishRent(data).then(res => { + console.log('发布店铺出租', res); + if (res.data.code == 1) { + uni.$u.toast('发布成功') + } else { + uni.$u.toast(res.data.msg) + } }) }).catch(errors => { console.log("失败信息:" + JSON.stringify(errors)) // uni.$u.toast('校验失败') }) }, + chooseCommercial() { + if (!this.form.business) { + uni.$u.toast('请先选择行业') + return false + } else { + this.show3 = true + } + }, + changeAddressFocus() { + if (!this.form.region) { + uni.$u.toast('请先选择区域') + return false + } + }, changeAddress(e) { // console.log('changeAddress', e); this.getAddressList(e) }, getAddressList(value) { + if (!this.form.region) { + uni.$u.toast('请先选择区域') + return false + } var that = this uni.request({ - url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + value + '&key=' + + url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + that.form.region + value + '&key=' + that.$api.key, success(res) { console.log('diz', res.data.result.location); - // console.log('lat', res.data.result.location.lat); - that.form.latitude = res.data.result.location.lat - // console.log('lng', res.data.result.location.lng); - that.form.longitude = res.data.result.location.lng + if (res.data.message == "query ok") { + // console.log('lat', res.data.result.location.lat); + that.form.latitude = res.data.result.location.lat + // console.log('lng', res.data.result.location.lng); + that.form.longitude = res.data.result.location.lng + } else { + uni.$u.toast('请输入准确地址') + } }, fail(err) { console.log('请求区域失败:', err); @@ -338,6 +373,7 @@ .count { margin-bottom: 30px; } + // margin-right: 20px; } From e45d8775d6eccdbc9fdeb3443635c226b358f6b7 Mon Sep 17 00:00:00 2001 From: hot777zz <912275990@qq.com> Date: Sun, 19 Nov 2023 00:51:58 +0800 Subject: [PATCH 07/30] =?UTF-8?q?=E6=A2=81=E8=88=AA=EF=BC=9A=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E4=B8=AA=E4=BA=BA=E5=8F=91=E5=B8=83=E7=9A=84=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/published/published.vue | 11 ++++++++++- service/request.js | 7 +++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/pages/published/published.vue b/pages/published/published.vue index 099a485..25ff32b 100644 --- a/pages/published/published.vue +++ b/pages/published/published.vue @@ -32,8 +32,13 @@ this.macthList = res.data.data console.log(res); }) + }, + getMyPublished(type){ + this.$api.getMyPublished(type).then(res => { + console.log(res); + console.log(type); + }) } - }, onLoad: function (option) { wx.setNavigationBarTitle({ @@ -42,16 +47,20 @@ this.titletext = option.titletext if(this.titletext == '发布的店铺转让'){ this.listId = 0 + this.getMyPublished(1) } if(this.titletext == '发布的找店选址'){ this.listId = 1 + this.getMyPublished(2) } if(this.titletext == '发布的项目招商'){ this.listId = 2 + this.getMyPublished(4) } if(this.titletext == '发布的店铺出租'){ this.listId = 3 + this.getMyPublished(3) } if(this.titletext == '我的匹配'){ this.listId = 4 diff --git a/service/request.js b/service/request.js index 94cbe1a..eb65803 100644 --- a/service/request.js +++ b/service/request.js @@ -290,6 +290,13 @@ const apiService = { return new Promise((resolve,reject) => { resolve(service.get(url)) }) + }, + //获取个人发布过的信息 + getMyPublished(type){ + const url = `/center/mypub/?type=${type}` + return new Promise((resolve,reject) => { + resolve(service.post(url)) + }) } } export { From ae5b700362f98b7ad4cba1910a75aa620689d107 Mon Sep 17 00:00:00 2001 From: LuoShijie Date: Sun, 19 Nov 2023 14:24:58 +0800 Subject: [PATCH 08/30] =?UTF-8?q?=E7=BD=97=E4=B8=96=E6=9D=B0=EF=BC=9Afixed?= =?UTF-8?q?=EF=BC=9A=E4=BF=AE=E6=94=B9=E5=88=97=E8=A1=A8=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=8F=91=E9=80=81=E7=BD=91=E7=BB=9C=E8=AF=B7=E6=B1=82=E7=9A=84?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/DropDown/DropDown.vue | 4 ++- components/SearchShopList/SearchShopList.vue | 25 ++++--------- components/ShowShopList/ShowShopList.vue | 12 ++++--- pages/index/index.vue | 38 ++++++++++++++++++-- pages/shopTransfer/shopTransfer.vue | 34 +++++++++++++++--- 5 files changed, 83 insertions(+), 30 deletions(-) diff --git a/components/DropDown/DropDown.vue b/components/DropDown/DropDown.vue index a23fa7b..79e1424 100644 --- a/components/DropDown/DropDown.vue +++ b/components/DropDown/DropDown.vue @@ -69,6 +69,8 @@ this.activeIndex = -1; } else this.activeIndex = index + + this.$emit('changeDrop') }, cancelDrop() { this.activeIndex = -1; @@ -79,7 +81,7 @@ ...querys } const query = this.$u.queryParams(this.queryInfo) - console.log(query, 'query'); + console.log(query, 'dropquery'); this.$emit('getQueryInfo', query) return query } diff --git a/components/SearchShopList/SearchShopList.vue b/components/SearchShopList/SearchShopList.vue index e4c6e35..4fe4956 100644 --- a/components/SearchShopList/SearchShopList.vue +++ b/components/SearchShopList/SearchShopList.vue @@ -1,7 +1,7 @@ @@ -21,93 +22,128 @@ export default { data() { return { - titletext:'', - listId:'', - matchList:[] + titletext: '', + listId: '', + matchList: [], + shopInfoList: [], + searchInfoList: [], + matchListLength: '', + searchListLength: '', + pageSize: 5, + pageNum: 1, + matchPageSize: 5, + matchPageNum: 1, + } + }, + onReachBottom() { + if (this.listId !== 4 && this.searchListLength !== 0) { + this.pageNum++ + this.getMyPublished(this.listId + 1) + } else if (this.listId == 4 && this.matchListLength !== 0) { + this.matchPageNum++ + this.getMatch() } }, methods: { - getMatch(){ - this.$api.getMyMatch().then(res => { - this.macthList = res.data.data - console.log(res); + getMatch() { + this.$api.getMyMatch({ + pageSize: this.matchPageSize, + pageNum: this.matchPageNum + }).then(res => { + if (res.data.code == 1) { + this.matchListLength = res.data.data.length + this.matchList = [...this.matchList, ...res.data.data[0]] + } else { + uni.$u.toast(res.data.msg) + } }) }, - getMyPublished(type){ - this.$api.getMyPublished(type).then(res => { - console.log(res); + getMyPublished(type) { + this.$api.getMyPublished({ + type: type, + pageSize: this.pageSize, + pageNum: this.pageNum + }).then(res => { + console.log('发布信息', res); console.log(type); + if (res.data.code == 1) { + this.searchListLength = res.data.data.length + this.searchInfoList = [...this.searchInfoList, ...res.data.data] + } else { + uni.$u.toast(res.data.msg) + } }) } }, - onLoad: function (option) { - wx.setNavigationBarTitle({ - title: option.titletext - }) + onLoad: function(option) { + wx.setNavigationBarTitle({ + title: option.titletext + }) this.titletext = option.titletext - if(this.titletext == '发布的店铺转让'){ + if (this.titletext == '发布的店铺转让') { this.listId = 0 this.getMyPublished(1) } - if(this.titletext == '发布的找店选址'){ + if (this.titletext == '发布的找店选址') { this.listId = 1 this.getMyPublished(2) } - - if(this.titletext == '发布的项目招商'){ + if (this.titletext == '发布的店铺出租') { this.listId = 2 - this.getMyPublished(4) - } - if(this.titletext == '发布的店铺出租'){ - this.listId = 3 this.getMyPublished(3) } - if(this.titletext == '我的匹配'){ + if (this.titletext == '发布的项目招商') { + this.listId = 3 + this.getMyPublished(4) + } + + if (this.titletext == '我的匹配') { this.listId = 4 - this.getMatch() - } - - }, - computed:{ - + this.getMatch() + } + + }, + computed: { + } } + } + + page { + background-color: #F8F8F8; + } + + .content { + margin: 0 10px; + } + \ No newline at end of file diff --git a/service/request.js b/service/request.js index eb65803..4545818 100644 --- a/service/request.js +++ b/service/request.js @@ -159,7 +159,7 @@ const apiService = { }) }, // 获取详情 - getShopDetail(type,id) { + getShopDetail(type, id) { const url = `/home/adetail/?type=${type}&id=${id}` return new Promise((resolve, reject) => { resolve(service.get(url)) @@ -225,10 +225,10 @@ const apiService = { }) }, //获取我的匹配 - getMyMatch() { + getMyMatch(data) { const url = `/center/match/` return new Promise((resolve, reject) => { - resolve(service.get(url)) + resolve(service.get(url, data)) }) }, //获取行业和业态 @@ -239,63 +239,63 @@ const apiService = { }) }, //招募合伙 - toBePartner(data){ + toBePartner(data) { const url = `/center/partner` - return new Promise((resolve,reject) => { + return new Promise((resolve, reject) => { console.log(data); - resolve(service.post(url,data)) + resolve(service.post(url, data)) }) }, //获取商铺列表 - getShopList(query){ + getShopList(query) { const url = `/shop/alllist${query}` - return new Promise((resolve,reject) => { + return new Promise((resolve, reject) => { resolve(service.get(url)) }) }, //发布店铺转让 - publishTransfer(data){ + publishTransfer(data) { const url = `/shop/transfer/` return new Promise((resolve, reject) => { resolve(service.post(url, data)) }) }, //发布店铺出租 - publishRent(data){ + publishRent(data) { const url = `/shop/rent/` return new Promise((resolve, reject) => { resolve(service.post(url, data)) }) }, //发布找店地址 - publishAddress(data){ + publishAddress(data) { const url = `/shop/selection/` return new Promise((resolve, reject) => { resolve(service.post(url, data)) }) }, //发布项目招商 - publishInvestment(data){ + publishInvestment(data) { const url = `/shop/investment/` return new Promise((resolve, reject) => { resolve(service.post(url, data)) }) }, // 获得成交案例 - getSuccList(type){ + getSuccList(type) { if (!type) { type = 1 } const url = `/shop/succ/?type=${type}` - return new Promise((resolve,reject) => { + return new Promise((resolve, reject) => { resolve(service.get(url)) }) }, //获取个人发布过的信息 - getMyPublished(type){ - const url = `/center/mypub/?type=${type}` - return new Promise((resolve,reject) => { - resolve(service.post(url)) + getMyPublished(data) { + const url = `/center/mypub/` + return new Promise((resolve, reject) => { + resolve(service.post(url, data)) }) } } From 676638c370090b0827779e2c15e92d9b8280ded1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com> Date: Sun, 19 Nov 2023 17:27:24 +0800 Subject: [PATCH 12/30] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9shopListItem=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShowShopListItem/ShowShopListItem.vue | 108 ++++++++++-------- pages/index/index.vue | 2 +- 2 files changed, 62 insertions(+), 48 deletions(-) diff --git a/components/ShowShopListItem/ShowShopListItem.vue b/components/ShowShopListItem/ShowShopListItem.vue index 99331be..00a1c94 100644 --- a/components/ShowShopListItem/ShowShopListItem.vue +++ b/components/ShowShopListItem/ShowShopListItem.vue @@ -1,12 +1,12 @@ + \ No newline at end of file diff --git a/pages/index/NavBarPages/xmzs/xmzs.vue b/pages/index/NavBarPages/xmzs/xmzs.vue index 68395fc..be4718d 100644 --- a/pages/index/NavBarPages/xmzs/xmzs.vue +++ b/pages/index/NavBarPages/xmzs/xmzs.vue @@ -10,65 +10,108 @@ - + - + - + + \ No newline at end of file diff --git a/pages/index/NavBarPages/zdxx/zdxx.vue b/pages/index/NavBarPages/zdxx/zdxx.vue index ef1e820..8f23f6c 100644 --- a/pages/index/NavBarPages/zdxx/zdxx.vue +++ b/pages/index/NavBarPages/zdxx/zdxx.vue @@ -10,65 +10,107 @@ - + - + - + + \ No newline at end of file diff --git a/pages/index/NavBarPages/zrxx/zrxx.vue b/pages/index/NavBarPages/zrxx/zrxx.vue index fafc32c..c5c6a39 100644 --- a/pages/index/NavBarPages/zrxx/zrxx.vue +++ b/pages/index/NavBarPages/zrxx/zrxx.vue @@ -10,65 +10,108 @@ - + - + - + + \ No newline at end of file From d32d2fa4a7dc475ca28cf253891368e5b93cb4e3 Mon Sep 17 00:00:00 2001 From: LuoShijie Date: Sun, 19 Nov 2023 23:10:45 +0800 Subject: [PATCH 17/30] =?UTF-8?q?=E7=BD=97=E4=B8=96=E6=9D=B0=EF=BC=9Afixed?= =?UTF-8?q?=EF=BC=9A=E5=88=97=E8=A1=A8=E5=B1=95=E7=A4=BA=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E8=B6=85=E5=87=BA=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/SearchShopListItem/SearchShopListItem.vue | 2 +- components/ShowShopListItem/ShowShopListItem.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/SearchShopListItem/SearchShopListItem.vue b/components/SearchShopListItem/SearchShopListItem.vue index e8aee94..a2bc33d 100644 --- a/components/SearchShopListItem/SearchShopListItem.vue +++ b/components/SearchShopListItem/SearchShopListItem.vue @@ -5,7 +5,7 @@ - {{shopInfo.tt}} + diff --git a/components/ShowShopListItem/ShowShopListItem.vue b/components/ShowShopListItem/ShowShopListItem.vue index bd58683..d1a24a9 100644 --- a/components/ShowShopListItem/ShowShopListItem.vue +++ b/components/ShowShopListItem/ShowShopListItem.vue @@ -5,7 +5,7 @@ - {{shopInfo.tt}} + @@ -204,7 +204,7 @@ flex-direction: column; justify-content: space-between; - >text { + >text, >u-text { font-size: 14px; } From a552316da43253a3f7719eafdc9c609a7c0fab4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com> Date: Sun, 19 Nov 2023 23:58:36 +0800 Subject: [PATCH 18/30] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/detail/detail.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue index a1a7258..12a4660 100644 --- a/pages/detail/detail.vue +++ b/pages/detail/detail.vue @@ -37,7 +37,7 @@ - + @@ -117,6 +117,7 @@ }) data.pics = arr1 console.log('arr', arr1); + data.avatar = this.$api.imgUrl + data.avatar this.shopInfo = data } }) From 495cd0dc074caf86e468787a6e666cfc9a568bbf Mon Sep 17 00:00:00 2001 From: dengj <209192278@qq.com> Date: Mon, 20 Nov 2023 13:34:16 +0800 Subject: [PATCH 19/30] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E8=BD=AC=E8=AE=A9=E4=B8=8B=E6=8B=89=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/DropDown/DropDownItem.vue | 2 +- pages.json | 4 +- pages/shopTransfer/shopTransfer.vue | 95 ++++++++++++++++++++++------ 3 files changed, 80 insertions(+), 21 deletions(-) diff --git a/components/DropDown/DropDownItem.vue b/components/DropDown/DropDownItem.vue index 5b95120..3ecd3c0 100644 --- a/components/DropDown/DropDownItem.vue +++ b/components/DropDown/DropDownItem.vue @@ -49,7 +49,7 @@ } } else if (this.type === '面积') { this.queryInfo = { - areaType: this.activeIndex + 1 + areatype: this.activeIndex + 1 } } else if (this.type === '筛选') { this.queryInfo = { diff --git a/pages.json b/pages.json index 894046c..363d95c 100644 --- a/pages.json +++ b/pages.json @@ -36,7 +36,7 @@ "navigationBarTitleText": "店铺转让", "navigationBarTextStyle": "white", "navigationBarBackgroundColor": "#339967", - "enablePullDownRefresh": false + "enablePullDownRefresh": true } }, { @@ -45,7 +45,7 @@ "navigationBarTitleText": "找店地址", "navigationBarTextStyle": "white", "navigationBarBackgroundColor": "#339967", - "enablePullDownRefresh": false + "enablePullDownRefresh": true } }, { diff --git a/pages/shopTransfer/shopTransfer.vue b/pages/shopTransfer/shopTransfer.vue index 2ba1528..e27960c 100644 --- a/pages/shopTransfer/shopTransfer.vue +++ b/pages/shopTransfer/shopTransfer.vue @@ -1,19 +1,22 @@ @@ -26,42 +29,88 @@ }, data() { return { - pageSize: 5, + pageSize: 3, pageNum: 1, shopInfoList: [], customQuery: {}, shopListLength: '', - + showNull: false, + refresh: false } }, + onPullDownRefresh() { + this.refresh=true + // if (this.showNull = true) { + const q = this.$u.queryParams({ + type: 1, + pageSize: this.pageSize, + pageNum: 1, + }) + // if(this.showNull=true){ + // this.pageNum=1 + // } + this.getShopList(q, "refresh") + + // } + }, onReachBottom() { - if (this.shopInfoList.length !== 0) { + if (!this.refresh&&this.shopListLength !== 0) { this.pageNum++ this.getShopList() console.log("触底加载"); + }else if(this.shopListLength == 0){ + this.pageNum=1 } }, methods: { - getShopList(q){ - let query = this.getQueryInfo(q) - console.log("listquery",query); + getShopList(q, type) { + let query = {} + if (type == "refresh") { + query = q + } else { + query = this.getQueryInfo(q) + } + console.log("listquery", query); this.$api.getShopList(query).then(res => { this.shopListLength = res.data.data.length - this.shopInfoList = [...this.shopInfoList, ...res.data.data] + if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query + .includes('region')||this.refresh) { + console.log('筛选'); + // this.resetQuery(q) + this.shopInfoList = res.data.data + this.refresh=false + if (res.data.data.length == 0) { + this.showNull = true + } else { + this.showNull = false + } + } else { + console.log('查询'); + this.shopInfoList = [...this.shopInfoList, ...res.data.data] + } + console.log(this.shopInfoList); }) }, - getQueryInfo(query){ - console.log("getQueryInfo",query); + getQueryInfo(query) { + console.log('this.',this.refresh); const q = this.$u.queryParams({ type: 1, pageSize: this.pageSize, pageNum: this.pageNum, ...query }) - this.customQuery = q return q }, + // resetQuery(query){ + // console.log('ddd',query); + // const q = this.$u.queryParams({ + // type: 1, + // pageSize: 5, + // pageNum: 1, + // ...query + // }) + // } }, created() { this.getShopList() @@ -73,9 +122,19 @@ page { background-color: $uni-bg-color-grey; } - .root{ + + .showNull { + display: flex; + align-items: center; + justify-content: center; + height: 100rpx; + color: darkgray; + } + + .root { position: relative; } + .dropdown-bug { position: absolute; background-color: $uni-bg-color-grey; @@ -84,8 +143,8 @@ transform: translateY(-20rpx); z-index: 2; } - .marginLR10{ + + .marginLR10 { margin: 0 10px; } - - + \ No newline at end of file From 354369fba09283d58fa3f893e9a8956ec44f7eac Mon Sep 17 00:00:00 2001 From: dengj <209192278@qq.com> Date: Mon, 20 Nov 2023 13:54:08 +0800 Subject: [PATCH 20/30] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E6=89=BE?= =?UTF-8?q?=E5=BA=97=E5=9C=B0=E5=9D=80=E4=B8=8B=E6=8B=89=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/shopAddress/shopAddress.vue | 63 +++++++++++++++++++++++++---- pages/shopTransfer/shopTransfer.vue | 12 +----- 2 files changed, 56 insertions(+), 19 deletions(-) diff --git a/pages/shopAddress/shopAddress.vue b/pages/shopAddress/shopAddress.vue index 7142d05..5476e2f 100644 --- a/pages/shopAddress/shopAddress.vue +++ b/pages/shopAddress/shopAddress.vue @@ -13,7 +13,10 @@ - + + 没有符合条件的数据, 请下拉刷新重置数据~ + + @@ -26,27 +29,65 @@ }, data() { return { - pageSize: 5, + pageSize: 3, pageNum: 1, searchInfoList: [], customQuery: {}, searchListLength: '', + showNull: false, + refresh: false } }, + onPullDownRefresh() { + this.refresh=true + // if (this.showNull = true) { + const q = this.$u.queryParams({ + type: 2, + pageSize: this.pageSize, + pageNum: 1, + }) + // if(this.showNull=true){ + // this.pageNum=1 + // } + this.getShopList(q, "refresh") + + // } + }, onReachBottom() { - if (this.searchListLength !== 0) { + if (!this.refresh&&this.searchListLength !== 0) { this.pageNum++ this.getShopList() console.log("触底加载"); + }else if(this.searchListLength == 0){ + this.pageNum=1 } }, methods: { - getShopList(q){ - let query = this.getQueryInfo(q) + getShopList(q, type){ + let query = {} + if (type == "refresh") { + query = q + } else { + query = this.getQueryInfo(q) + } console.log("listquery",query); this.$api.getShopList(query).then(res => { this.searchListLength = res.data.data.length - this.searchInfoList = [...this.searchInfoList, ...res.data.data] + if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query + .includes('region')||this.refresh) { + console.log('筛选'); + // this.resetQuery(q) + this.searchInfoList = res.data.data + this.refresh=false + if (res.data.data.length == 0) { + this.showNull = true + } else { + this.showNull = false + } + } else { + console.log('查询'); + this.searchInfoList = [...this.searchInfoList, ...res.data.data] + } console.log(this.searchInfoList); }) }, @@ -58,9 +99,8 @@ pageNum: this.pageNum, ...query }) - this.customQuery = q return q - }, + } }, created() { this.getShopList() @@ -69,6 +109,13 @@ + \ No newline at end of file diff --git a/pages/shopTransfer/shopTransfer.vue b/pages/shopTransfer/shopTransfer.vue index 1aa7696..d7e92f3 100644 --- a/pages/shopTransfer/shopTransfer.vue +++ b/pages/shopTransfer/shopTransfer.vue @@ -39,27 +39,27 @@ } }, onPullDownRefresh() { - this.refresh=true + this.refresh = true // if (this.showNull = true) { - const q = this.$u.queryParams({ - type: 1, - pageSize: this.pageSize, - pageNum: 1, - }) - // if(this.showNull=true){ - // this.pageNum=1 - // } - this.getShopList(q, "refresh") - + const q = this.$u.queryParams({ + type: 1, + pageSize: this.pageSize, + pageNum: 1, + }) + // if(this.showNull=true){ + // this.pageNum=1 + // } + this.getShopList(q, "refresh") + // } }, onReachBottom() { - if (!this.refresh&&this.shopListLength !== 0) { + if (!this.refresh && this.shopListLength !== 0) { this.pageNum++ this.getShopList() console.log("触底加载"); - }else if(this.shopListLength == 0){ - this.pageNum=1 + } else if (this.shopListLength == 0) { + this.pageNum = 1 } }, methods: { @@ -74,11 +74,11 @@ this.$api.getShopList(query).then(res => { this.shopListLength = res.data.data.length if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query - .includes('region')||this.refresh) { + .includes('region') || this.refresh) { console.log('筛选'); // this.resetQuery(q) this.shopInfoList = res.data.data - this.refresh=false + this.refresh = false if (res.data.data.length == 0) { this.showNull = true } else { @@ -88,7 +88,7 @@ console.log('查询'); this.shopInfoList = [...this.shopInfoList, ...res.data.data] } - + uni.stopPullDownRefresh() console.log(this.shopInfoList); }) }, From 75ce1ab5915837eae080fc9473b705e270fbf1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com> Date: Mon, 20 Nov 2023 21:14:35 +0800 Subject: [PATCH 23/30] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E6=A1=86=E5=8F=AA=E6=98=BE=E7=A4=BA=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/DropDown/DropDown.vue | 19 ++--- components/InputAndSwiper/InputAndSwiper.vue | 7 +- pages/index/index.vue | 89 +++++++++++++++++++- 3 files changed, 96 insertions(+), 19 deletions(-) diff --git a/components/DropDown/DropDown.vue b/components/DropDown/DropDown.vue index 29e8fe5..5d363b2 100644 --- a/components/DropDown/DropDown.vue +++ b/components/DropDown/DropDown.vue @@ -1,27 +1,22 @@ @@ -60,9 +55,9 @@ } }, created() { - this.postlist[0]=JSON.parse(uni.getStorageSync('classList')) + this.postlist[0] = JSON.parse(uni.getStorageSync('classList')) // this.postlist[0].unshift('全部') - this.postlist[1]=JSON.parse(uni.getStorageSync('regionList')) + this.postlist[1] = JSON.parse(uni.getStorageSync('regionList')) }, methods: { changeActiveIndex(index) { diff --git a/components/InputAndSwiper/InputAndSwiper.vue b/components/InputAndSwiper/InputAndSwiper.vue index 478d6b2..92f06ff 100644 --- a/components/InputAndSwiper/InputAndSwiper.vue +++ b/components/InputAndSwiper/InputAndSwiper.vue @@ -46,14 +46,13 @@ options: { styleIsolation: 'shared', // 解除样式隔离 }, - created() { - }, + created() {}, methods: { //点击轮播图 handleSwiperList(currentNum, bannerURL) { - const item=bannerURL[currentNum] + const item = bannerURL[currentNum] uni.navigateTo({ - url: item.link+`?id=${item.param}&type=${item.type}` + url: item.link + `?id=${item.param}&type=${item.type}` }) }, } diff --git a/pages/index/index.vue b/pages/index/index.vue index 04a0159..7536d51 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -179,6 +179,32 @@ }, fail(err) { console.log("获取经纬度失败", err); + uni.getSystemInfo({ + success: (res) => { + if (!res.locationEnabled || !res.locationAuthorized) { + uni.showModal({ + content: '检测到您没打开手机系统定位权限,请确保手机系统定位已开启', + confirmText: "确认", + showCancel: false, + success: (res) => { + if (res.confirm) { + // uni.openSetting({ + // success: (res) => { + // console.log(res); + that.getUserLocation(); + // } + // }) + } else { + console.log('取消'); + return false; + } + } + }) + } else { + that.getUserLocation() + } + } + }) }, }); }, @@ -189,20 +215,77 @@ success: function(res) { if (res.authSetting['scope.userFuzzyLocation']) { console.log('用户已经授权定位权限'); + uni.getSystemInfo({ + success: (res) => { + if (!res.locationEnabled || !res.locationAuthorized) { + uni.showModal({ + content: '检测到您没打开手机系统定位权限,请确保手机系统定位已开启', + confirmText: "确认", + showCancel: false, + success: (res) => { + if (res.confirm) { + // uni.openSetting({ + // success: (res) => { + // console.log(res); + that.getUserLocation(); + // } + // }) + } else { + console.log('取消'); + return false; + } + } + }) + } else { + that.getUserLocation() + } + } + }) + // that.getUserLocation() } else { console.log('用户未授权定位权限'); uni.authorize({ scope: 'scope.userFuzzyLocation', success: function() { console.log('授权成功'); - that.getUserLocation() + uni.getSystemInfo({ + success: (res) => { + if (!res.locationEnabled || !res.locationAuthorized) { + // uni.showToast({ + // title: '请确保手机系统定位已开启', + // icon: 'none', + // duration: 2000, + // }) + uni.showModal({ + content: '检测到您没打开手机系统定位权限,请确保手机系统定位已开启', + confirmText: "确认", + showCancel: false, + success: (res) => { + if (res.confirm) { + // uni.openSetting({ + // success: (res) => { + // console.log(res); + that.getUserLocation(); + // } + // }) + } else { + console.log('取消'); + return false; + } + } + }) + } else { + that.getUserLocation() + } + } + }) }, fail: function() { console.log('授权失败'); uni.showModal({ - content: '检测到您没打开获取信息功能权限,是否去设置打开?', + content: '检测到您没打开手机系统定位权限,请确保手机系统定位已开启', confirmText: "确认", - cancelText: '取消', + showCancel: false, success: (res) => { if (res.confirm) { uni.openSetting({ From 60c235f503a7dc1b5fcfdf0645ca1ed722564caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com> Date: Mon, 20 Nov 2023 21:33:14 +0800 Subject: [PATCH 24/30] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E5=AE=9A=E4=BD=8D=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/InputAndSwiper/InputAndSwiper.vue | 98 +++++++++++++++++++- pages/index/index.vue | 29 ++++++ 2 files changed, 126 insertions(+), 1 deletion(-) diff --git a/components/InputAndSwiper/InputAndSwiper.vue b/components/InputAndSwiper/InputAndSwiper.vue index 92f06ff..80bd214 100644 --- a/components/InputAndSwiper/InputAndSwiper.vue +++ b/components/InputAndSwiper/InputAndSwiper.vue @@ -19,6 +19,7 @@ -