From c21de8ae71b001be8585677657ac088d70dec610 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 18 May 2023 23:06:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91=E4=BB=93=E5=BA=93=20=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api.js | 5 +- components/zbpSwiper.vue | 36 +- pages/supply_chains/supply_chains.vue | 811 ++++++++++++++------------ 3 files changed, 456 insertions(+), 396 deletions(-) diff --git a/api/api.js b/api/api.js index d1e19e5..1fcf31d 100644 --- a/api/api.js +++ b/api/api.js @@ -15,7 +15,10 @@ import request from "@/utils/request.js"; export function getProductSpuAPI(id) { return request.get(`product/spu/cloud_merchant/${id}`, {}, { noAuth: true }); } - +//获取云仓库店铺id +export function get_cloud_shop(street_code) { + return request.get(`city/get_cloud_shop?street_code=${street_code}`, {}, { noAuth: true }); +} /** * 公共接口 ,优惠券接口 , 行业此讯 , 手机号码注册 * diff --git a/components/zbpSwiper.vue b/components/zbpSwiper.vue index caef2b8..a0e4c9f 100644 --- a/components/zbpSwiper.vue +++ b/components/zbpSwiper.vue @@ -7,7 +7,7 @@ - {{recommend_address}} + {{location_Arr.location_name}} @@ -50,7 +50,11 @@ isSelectPlace: { type: Boolean, default: false - } + }, + location_Arr:{ + type:Object, + default:()=>({}) + } }, data() { return { @@ -59,7 +63,6 @@ columnData: [], homeCombData: [], keyword: '', - recommend_address: '', bgColor: '', swiper: { url: [{ @@ -78,7 +81,7 @@ created() { this.getBanner() this.Area() - this.selfLocation() + // this.selfLocation() // const loca = JSON.parse(this.location) // this.street = loca.address_component.street }, @@ -121,30 +124,7 @@ this.$refs.uPicker.setColumnValues(1, res.data); }); }, - selfLocation() { - let self = this - uni.getLocation({ - type: 'gcj02', - success: (res) => { - let latitude, longitude; - latitude = res.latitude.toString(); - longitude = res.longitude.toString(); - this.latitude = res.latitude - this.longitude = res.longitude - getGeocoder({ - lat: latitude, - long: longitude - }).then(res => { - console.log(res) - this.detaile_address = res.data.address; - this.location_address = res.data.address; - this.recommend_address = res.data.formatted_addresses.recommend.length > 4 ? res.data - .formatted_addresses.recommend.slice(0, 7) + '...' : res.data.formatted_addresses.recommend - }).catch(err => Toast(err)) - }, - fail: (err) => { Toast(err) }, - }); - }, + swiperChange(e) { let { current, source } = e.detail; if (source === 'autoplay' || source === 'touch') { diff --git a/pages/supply_chains/supply_chains.vue b/pages/supply_chains/supply_chains.vue index 9dc42a2..a28d733 100644 --- a/pages/supply_chains/supply_chains.vue +++ b/pages/supply_chains/supply_chains.vue @@ -1,421 +1,498 @@ \ No newline at end of file