From db21651d44a1056cab646b86025acf1c3ff66ebc Mon Sep 17 00:00:00 2001 From: LuoShijie Date: Tue, 14 Nov 2023 23:11:39 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E7=BD=97=E4=B8=96=E6=9D=B0=EF=BC=9Afeat?= =?UTF-8?q?=EF=BC=9A=E8=BD=AE=E6=92=AD=E5=9B=BE=EF=BC=8C=E5=88=86=E6=9E=90?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E3=80=81=E8=BD=AE=E6=92=AD=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/InputAndSwiper/InputAndSwiper.vue | 4 +- pages/index/HomeMainContent/HomeNavCard.vue | 7 +++ pages/index/HomeMainContent/HomeNoticeBar.vue | 7 +-- pages/index/HomeMainContent/Statistics.vue | 45 +++++++++---------- pages/index/index.vue | 24 ++++++++-- service/request.js | 22 ++++++++- 6 files changed, 75 insertions(+), 34 deletions(-) diff --git a/components/InputAndSwiper/InputAndSwiper.vue b/components/InputAndSwiper/InputAndSwiper.vue index 3777e2d..bc7e6fd 100644 --- a/components/InputAndSwiper/InputAndSwiper.vue +++ b/components/InputAndSwiper/InputAndSwiper.vue @@ -13,7 +13,7 @@ - + @@ -22,7 +22,7 @@ export default { name: "inputAndSwiper", props: { - headerBgList: { + bannerURL: { type: Array, default () { return [ diff --git a/pages/index/HomeMainContent/HomeNavCard.vue b/pages/index/HomeMainContent/HomeNavCard.vue index 5ba9577..b3182a6 100644 --- a/pages/index/HomeMainContent/HomeNavCard.vue +++ b/pages/index/HomeMainContent/HomeNavCard.vue @@ -63,7 +63,14 @@ uni.navigateTo({ url: this.navItems[index].url }) + }else if (index == 7) { + uni.makePhoneCall({ + phoneNumber: '123456789', + success: (result) => {}, + fail: (error) => {} + }) } + } } }; diff --git a/pages/index/HomeMainContent/HomeNoticeBar.vue b/pages/index/HomeMainContent/HomeNoticeBar.vue index eb41923..dae115d 100644 --- a/pages/index/HomeMainContent/HomeNoticeBar.vue +++ b/pages/index/HomeMainContent/HomeNoticeBar.vue @@ -10,6 +10,7 @@ customStyle="width:70vw" color="#232323" icon=" " + direction="column" /> @@ -18,14 +19,14 @@ + + \ No newline at end of file diff --git a/pages/my/my.vue b/pages/my/my.vue index fa59bd8..343daf8 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -1,56 +1,89 @@ \ No newline at end of file diff --git a/service/request.js b/service/request.js index d535a2f..c31a40f 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) { @@ -131,11 +131,25 @@ const apiService = { uploadImgUrl: serverHost + `/upload/image/`, //登录接口 login(data) { - const url = `/login` + const url = '/login/mnpLogin' return new Promise((resolve, reject) => { resolve(service.post(url, data)) }) }, + //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)) + }) + }, // 展示用户信息 getUserInfo() { const url = '/user' From d9d7cb36dec70acb8b900e0161472acb2eabee54 Mon Sep 17 00:00:00 2001 From: dengj <209192278@qq.com> Date: Wed, 15 Nov 2023 15:49:30 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=E6=95=B0=E6=8D=AE=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=8F=8A=E5=AE=8C=E5=96=84=E5=AE=9A=E4=BD=8D=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/DropDown/DropDown.vue | 61 +++++----- components/DropDown/DropDownItem.vue | 106 ++++++++++-------- components/InputAndSwiper/InputAndSwiper.vue | 88 +-------------- pages/index/index.vue | 102 ++++++++++++++++- .../publish/publishAddress/publishAddress.vue | 3 +- .../publishInvestment/publishInvestment.vue | 3 +- pages/publish/publishRent/publishRent.vue | 3 +- .../publishTransfer/publishTransfer.vue | 3 +- service/request.js | 8 +- 9 files changed, 203 insertions(+), 174 deletions(-) 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 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 6/9] =?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 7/9] =?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 8/9] =?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 9/9] =?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; + + } } }