From 0f11c59662627e97011878585e00a1bef314f08c Mon Sep 17 00:00:00 2001 From: jia <1451658316@qq.com> Date: Thu, 31 Aug 2023 21:15:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=A6=96=E9=A1=B5=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/zbpSwiper.vue | 65 ++-- config/cache.js | 2 + manifest.json | 4 +- pages/activity/lifeService/index.vue | 1 + pages/gather/gather.vue | 181 +++++++++- pages/goods_details/index.vue | 2 +- pages/index/index.vue | 459 +++++++++++++++++++----- pages/short_video/appSwiper/index.nvue | 6 +- pages/short_video/nvueSwiper/index.nvue | 2 +- pages/supply_chains/supply_chains.vue | 220 +++++++++++- pages/users/order_list/indexCopy.vue | 2 +- static/images/sp.png | Bin 0 -> 1611 bytes 12 files changed, 793 insertions(+), 151 deletions(-) create mode 100644 static/images/sp.png diff --git a/components/zbpSwiper.vue b/components/zbpSwiper.vue index 9063424..e9d0feb 100644 --- a/components/zbpSwiper.vue +++ b/components/zbpSwiper.vue @@ -4,7 +4,10 @@ - + + + + - - + + @@ -30,7 +33,7 @@ indicator-active-color="#fff"> - @@ -94,18 +97,26 @@ }, } }, - + watch: { + street: { + handler(newVal, oldVal) { + this.street = newVal + }, + } + }, created() { - this.appLocation() + this.getBanner() this.Area() }, - onShow() { - this.street = uni.getStorageSync('adress_location') + + mounted() { + this.appLocation() }, + methods: { swiperClick(item) { const url = item.info[1].value @@ -117,7 +128,7 @@ this.isSelectPlace ? this.showPicker = true : '' }, - async appLocation() { + appLocation() { uni.getLocation({ type: 'wgs84', timeout: '10', @@ -131,11 +142,8 @@ lat: latitude, long: longitude }).then(res => { - this.street = res.data.address_component.street - uni.setStorageSync('adress_location', res.data.address_component - .street) - + Cache.set('ADRESS_LOCATION', this.street) }).catch(err => { uni.showToast({ title: err, @@ -154,12 +162,10 @@ }); }, confirm(e) { - this.street = uni.setStorageSync('adress_location', e.value[1].name) ? uni.setStorageSync( - 'adress_location', e.value[1].name) : e.value[1].name + this.street = e.value[1].name this.showPicker = false this.$emit('selectPlce', e) - uni.setStorageSync('adress_location', e.value[1].name) - + Cache.set('ADRESS_LOCATION', e.value[1].name) }, changeHandler(e) { const { @@ -200,6 +206,7 @@ } = e.detail; if (source === 'autoplay' || source === 'touch') { this.bgColor = this.swiper.url[e.detail.current]['img'] + this.$emit('kkchange',this.bgColor) } }, // 对象转数组 @@ -244,7 +251,7 @@ transform: translate(-50%, 0); width: 102%; height: 133px; - border-radius: 30px 30px 0 0; + border-radius: 30px 30px 0 0; background-color: #fff; } @@ -282,10 +289,10 @@ .place_wrapper { color: #fff; margin-right: 24.56rpx; - font-size: 31.58rpx; + font-size: 30rpx; .town_name { - margin-left: 10.53rpx; + margin-left: 21rpx; } } @@ -300,12 +307,12 @@ .search_content { margin: 0 auto; - width: 694.74rpx; - height: 61.4rpx; + width: 724rpx; + height: 74rpx; padding: 2px 2px 2px 21.05rpx; - border-radius: 100px; + border-radius: 175rpx; background: #fff; - margin-bottom: 17.54rpx; + margin-bottom: 21rpx; position: relative; box-sizing: border-box; @@ -333,15 +340,15 @@ z-index: 2; .swiper { - width: 694.74rpx; - height: 242.11rpx; + width: 724rpx; + height: 259rpx; margin: 0 auto; - border-radius: 15px; + border-radius: 20rpx 20rpx 20rpx 20rpx; overflow: hidden; .swi_item { width: 100%; - height: 242.11rpx; + height: 259rpx; } } } diff --git a/config/cache.js b/config/cache.js index b824d12..b414d1e 100644 --- a/config/cache.js +++ b/config/cache.js @@ -38,4 +38,6 @@ module.exports = { CACHE_LONGITUDE: 'LONGITUDE', //缓存纬度 CACHE_LATITUDE: 'LATITUDE', + //缓存地址信息 + ADRESS_LOCATION:'ADRESS_LOCATION' } diff --git a/manifest.json b/manifest.json index 4dc2773..be06e5e 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "惠农生活", "appid" : "__UNI__3A527D1", "description" : "", - "versionName" : "1.0.0", - "versionCode" : 100, + "versionName" : "1.1.0", + "versionCode" : 110, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages/activity/lifeService/index.vue b/pages/activity/lifeService/index.vue index 44d38b9..ec938a5 100644 --- a/pages/activity/lifeService/index.vue +++ b/pages/activity/lifeService/index.vue @@ -280,6 +280,7 @@ // console.log(res) this.detaile_address = res.data.address; this.recommend_address = res.data.address.length > 4 ? res.data.address.slice(0,4) + '...' : res.data.address + uni.setStorageSync('adress_location',res.data.address) }) }, fail: (res) => { diff --git a/pages/gather/gather.vue b/pages/gather/gather.vue index 2e7503a..b48ea07 100644 --- a/pages/gather/gather.vue +++ b/pages/gather/gather.vue @@ -1,6 +1,20 @@