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 @@
-
+
+
+
+ {{street}}
+
+
+
+
+
+
+
+
+
+
+
@@ -127,7 +141,7 @@
商户设置
-
-
+
@@ -263,6 +277,7 @@
getUserInfo
} from '@/api/user.js'
import {
+ getGeocoder,
microSeachBarCode,
microEadtProduct
} from '@/api/store.js'
@@ -272,6 +287,7 @@
import {
getDiy
} from '@/api/api.js'
+
export default {
components: {
mTabbar,
@@ -280,7 +296,7 @@
},
data() {
return {
- locationArr: ({}),
+ locationArr: ({}),
emptyText: '暂无可用应用',
jurisdiction: false, // 是否有权限
mer_id: '',
@@ -290,7 +306,10 @@
}
},
prefix: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/11/',
- isShow: false
+ isShow: false,
+ bgColor: '',
+ isFshow: false,
+ street:''
};
},
computed: {
@@ -307,13 +326,111 @@
this.jurisdiction = true
}
this.getUserInfo()
+ this.appLocation()
},
onPullDownRefresh() {
this.getUserInfo()
uni.stopPullDownRefresh()
},
+ mounted() {
+ this.appLocation()
+ // #ifdef H5
+// 监听页面滚动事件
+ window.addEventListener("scroll", this.scrolling);
+ // #endif
+
+
+ },
+ // #ifdef APP-PLUS
+ onPageScroll(e) {
+ // this.scrollTop = e.scrollTop;
+ console.log(e.scrollTop)
+ if (e.scrollTop > 0) {
+ this.isFshow = true
+ } else {
+ this.isFshow = false
+ }
+
+ },
+ // #endif
+
methods: {
-
+ appLocation() {
+ uni.getLocation({
+ type: 'wgs84',
+ timeout: '10',
+ success: (res) => {
+ // console.log(res)
+
+ let latitude, longitude;
+ latitude = res.latitude.toString();
+ longitude = res.longitude.toString();
+ getGeocoder({
+ lat: latitude,
+ long: longitude
+ }).then(res => {
+ this.street = res.data.address_component.street
+ Cache.set('ADRESS_LOCATION', this.street)
+ }).catch(err => {
+ uni.showToast({
+ title: err,
+ icon: 'none'
+ })
+ })
+ },
+ fail: (err) => {
+
+ uni.showToast({
+ title: "获取定位超时",
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ });
+ },
+
+ scrolling() {
+ // 滚动条距文档顶部的距离
+ let scrollTop =
+ window.pageYOffset ||
+ document.documentElement.scrollTop ||
+ document.body.scrollTop;
+ // 滚动条滚动的距离
+ let scrollStep = scrollTop - this.oldScrollTop;
+ console.log("header 滚动距离 ", scrollTop);
+ // 更新——滚动前,滚动条距文档顶部的距离
+ this.oldScrollTop = scrollTop;
+
+ //变量windowHeight是可视区的高度
+ let windowHeight =
+ document.documentElement.clientHeight || document.body.clientHeight;
+ //变量scrollHeight是滚动条的总高度
+ let scrollHeight =
+ document.documentElement.scrollHeight || document.body.scrollHeight;
+
+ //滚动条到底部的条件
+ if (scrollTop + windowHeight == scrollHeight) {
+ //你想做的事情
+ console.log("header 你已经到底部了");
+ }
+ if (scrollStep < 0) {
+ this.isFshow = false
+ console.log("header 滚动条向上滚动了!");
+ } else {
+ this.isFshow = true
+ console.log("header 滚动条向下滚动了!");
+ }
+ // 判断是否到了最顶部
+ if (scrollTop <= 0) {
+ this.isFshow = false
+ console.log("header 到了最顶部")
+ }
+ },
+
+ kkchange(e) {
+ this.bgColor = e
+ },
+
navigator(url, t) {
// if (this.userInfoData.is_wsxx === 0 && t != '商户设置') return Toast("请完善商户信息");
uni.navigateTo({
@@ -348,6 +465,58 @@
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
}
+ .bg-img {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ /* #ifdef MP || APP-PLUS */
+ z-index: -100;
+ /* #endif */
+ /* #ifdef H5 */
+ z-index: -100;
+ /* #endif */
+ z-index: -100;
+ filter: blur(0);
+ overflow: hidden;
+
+
+ img {
+ width: 100%;
+ height: 100%;
+ filter: blur(30rpx);
+ transform: scale(1.5);
+ }
+ }
+
+ .site-box {
+ width: 100%;
+ height: 120rpx;
+ margin-bottom: 26.32rpx;
+ position: absolute;
+ top: 0rpx;
+ position: fixed;
+ z-index: 999;
+ padding-top: 30rpx;
+ padding-right: 20rpx;
+
+ // 位置
+ .place_wrapper {
+ color: #fff;
+ margin-right: 24.56rpx;
+ font-size: 30rpx;
+
+ .town_name {
+ margin-left: 21rpx;
+ }
+ }
+
+ .iconfont {
+ font-size: 35.09rpx;
+ }
+ }
+
+
.top_box {
// padding-top: 180rpx;
background: linear-gradient(#36A2FF, #fff);
diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue
index c93aac7..cb89aa5 100644
--- a/pages/goods_details/index.vue
+++ b/pages/goods_details/index.vue
@@ -1350,7 +1350,7 @@
postCartAdd(q)
.then(function(res) {
that.isOpen = that.attr.cartAttr = false;
- console.log(that.storeInfo);
+ // console.log(that.storeInfo);
if (news) {
uni.navigateTo({
url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id}&type_id=${that.storeInfo.merchant.type_id}`
diff --git a/pages/index/index.vue b/pages/index/index.vue
index e51ed06..7007b87 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -2,94 +2,103 @@
-
-
- 热点资讯
-
- 更多
-
+
+
+
+ {{street}}
+
+
+
+
-
-
-
-
-
- {{item.title}}
- {{item.create_time}}
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
- {{item.title}}
-
-
-
- {{item.author}}
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
- {{item.title}}
-
-
-
- {{item.author && item.author.nickname}}
-
-
-
- {{item.count_start}}
+
+
+
+
+ {{item.title}}
+
+
+
+ {{item.author && item.author.nickname}}
+
+
+
+ {{item.count_start}}
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+
+
+ {{item.author && item.author.nickname}}
+
+
+
+ {{item.count_start}}
+
+
+
+
+
+
+
+
+
@@ -157,7 +166,12 @@
},
data() {
return {
+ activeStyle: {
+ color: '#333333',
+ fontWeight: 'bold',
+ transform: 'scale(1.04)'
+ },
isshow: false,
locationArr: ({}),
status: 'loadmore',
@@ -186,7 +200,10 @@
cateGoods: [],
recoList: [],
articleList: [],
- streeta_id: ''
+ streeta_id: '',
+ street: '',
+ bgColor: '',
+ isFshow: false,
}
},
onPullDownRefresh() {
@@ -226,7 +243,72 @@
this.where.page = ++this.where.page;
this.getGoods()
},
+ mounted() {
+ // #ifdef H5
+
+ // #endif
+ // 监听页面滚动事件
+ window.addEventListener("scroll", this.scrolling);
+
+ },
+ // #ifdef APP-PLUS
+ onPageScroll(e) {
+ // this.scrollTop = e.scrollTop;
+ console.log(e.scrollTop)
+ if(e.scrollTop>0){
+ this.isFshow=true
+ }else{
+ this.isFshow=false
+ }
+
+ },
+ // #endif
+
methods: {
+
+ scrolling() {
+ // 滚动条距文档顶部的距离
+ let scrollTop =
+ window.pageYOffset ||
+ document.documentElement.scrollTop ||
+ document.body.scrollTop;
+ // 滚动条滚动的距离
+ let scrollStep = scrollTop - this.oldScrollTop;
+ console.log("header 滚动距离 ", scrollTop);
+ // 更新——滚动前,滚动条距文档顶部的距离
+ this.oldScrollTop = scrollTop;
+
+ //变量windowHeight是可视区的高度
+ let windowHeight =
+ document.documentElement.clientHeight || document.body.clientHeight;
+ //变量scrollHeight是滚动条的总高度
+ let scrollHeight =
+ document.documentElement.scrollHeight || document.body.scrollHeight;
+
+ //滚动条到底部的条件
+ if (scrollTop + windowHeight == scrollHeight) {
+ //你想做的事情
+ console.log("header 你已经到底部了");
+ }
+ if (scrollStep < 0) {
+ this.isFshow = false
+ console.log("header 滚动条向上滚动了!");
+ } else {
+ this.isFshow = true
+ console.log("header 滚动条向下滚动了!");
+ }
+ // 判断是否到了最顶部
+ if (scrollTop <= 0) {
+ this.isFshow = false
+ console.log("header 到了最顶部")
+ }
+ },
+
+ kkchange(e) {
+ this.bgColor = e
+ },
+
+
tabsChange1(item) {
this.getArticleList(item.article_category_id)
this.streeta_id = item.id
@@ -311,7 +393,7 @@
});
},
gogogo(item) {
- if (this.tabsData.tabsActive == 1) {
+ if (item.video_link.length > 0) {
uni.navigateTo({
// #ifdef MP || H5
@@ -412,10 +494,11 @@
lat: latitude,
long: longitude
}).then(res => {
- uni.setStorageSync('adress_location',res.data.address)
+ uni.setStorageSync('adress_location', res.data.address)
// that.$store.dispatch('setLocation', res.data)
-
- // that.street = res.data.address_component.street
+
+ this.street = res.data.address_component.street
+ Cache.set('ADRESS_LOCATION', this.street)
}).catch(err => {
uni.showToast({
title: err,
@@ -521,6 +604,8 @@
\ No newline at end of file
diff --git a/pages/short_video/appSwiper/index.nvue b/pages/short_video/appSwiper/index.nvue
index 36092dc..e18d577 100644
--- a/pages/short_video/appSwiper/index.nvue
+++ b/pages/short_video/appSwiper/index.nvue
@@ -20,8 +20,8 @@
】
-->
-