代码跟新

This commit is contained in:
jia 2023-09-04 09:55:56 +08:00
parent f9c1183c6c
commit 84bff6824d
6 changed files with 154 additions and 126 deletions

View File

@ -4,7 +4,7 @@
<image :src="item.image" mode="widthFix" class="item-img" /> <image :src="item.image" mode="widthFix" class="item-img" />
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="tag"> <!-- <view class="tag">
<view class="tag-one"> <view class="tag-one">
自营商品 自营商品
</view> </view>
@ -13,7 +13,7 @@
<text class="tag-twoa"></text> <text class="tag-twoa"></text>
<text class="tag-twob">满20包邮</text> <text class="tag-twob">满20包邮</text>
</view> </view>
</view> </view> -->
<view class="relase"> <view class="relase">
<view class="relase-one"> <view class="relase-one">
{{item.rate}} {{item.rate}}
@ -46,11 +46,10 @@
}, },
methods: { methods: {
gogogo(item) { gogogo(item) {
uni.navigateTo({ uni.navigateTo({
url:'/pages/goods_details/index?id='+item.product_id url: '/pages/goods_details/index?id=' + item.product_id
}) })
}, },
@ -140,14 +139,14 @@
.relase-one { .relase-one {
font-size: 26rpx; font-size: 26rpx;
font-family: SF Pro Display-Regular Italic, SF Pro Display; font-family: SF Pro Display-Regular Italic, SF Pro Display;
font-weight: normal; font-weight: 600;
color: #FF6D20; color: #FF6D20;
} }
.relase-two { .relase-two {
font-size: 23rpx; font-size: 23rpx;
font-family: PingFang SC-Regular, PingFang SC; font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 500;
color: #B3B3B3; color: #B3B3B3;
margin-left: 13rpx; margin-left: 13rpx;
} }
@ -158,15 +157,17 @@
margin-bottom: 10rpx; margin-bottom: 10rpx;
color: #F84221; color: #F84221;
font-size: 44rpx; font-size: 44rpx;
font-weight: 600;
span { span {
color: #F84221; color: #F84221;
font-size: 30rpx; font-size: 30rpx;
font-weight: 500;
} }
text { text {
color: #F84221; color: #F84221;
font-size: 37rpx; font-size: 37rpx;
font-weight: 400;
} }
} }

View File

@ -72,7 +72,7 @@
default: () => ({}) default: () => ({})
}, },
town: { town: {
type:String, type: String,
default: false default: false
}, },
@ -101,11 +101,11 @@
} }
}, },
watch:{ watch: {
street(nval,val) { street(nval, val) {
this.street=nval this.street = nval
} }
}, },
created() { created() {
@ -115,11 +115,11 @@
}, },
mounted() { mounted() {
uni.$on('add', (res)=> { uni.$on('add', (res) => {
this.street=res.split(',')[0] this.street = res.split(',')[0]
}) })
this.$bus.$on('value-updated', (newValue) => { this.$bus.$on('value-updated', (newValue) => {
// //
this.street = newValue.split(',')[0] this.street = newValue.split(',')[0]
}); });
}, },
@ -142,11 +142,17 @@
this.$emit('selectPlce', e) this.$emit('selectPlce', e)
this.$emit('change', e) this.$emit('change', e)
this.street = e.value[1].name this.street = e.value[1].name
// this.$nextTick(() => {
// uni.$emit('add', e.value[1].name + ',' + e.value[1].code)
// this.$bus.$emit('value-updated',
// e.value[1].name + ',' +
// e.value[1].code);
// })
uni.$emit('add',e.value[1].name+','+e.value[1].code) uni.$emit('add', e.value[1].name + ',' + e.value[1].code)
this.$bus.$emit('value-updated', this.$bus.$emit('value-updated',
e.value[1].name + ',' + e.value[1].name + ',' +
e.value[1].code); e.value[1].code);
}, },
changeHandler(e) { changeHandler(e) {

View File

@ -24,8 +24,8 @@ if (process.env.NODE_ENV === "development") {
// httpApiThree = 'baseUrlTest' // h5跨域配置 // httpApiThree = 'baseUrlTest' // h5跨域配置
// #endif // #endif
} else if (process.env.NODE_ENV === 'production') { } else if (process.env.NODE_ENV === 'production') {
// httpApi = 'https://shop.lihaink.cn' // 生产 httpApi = 'https://shop.lihaink.cn' // 生产
httpApi = "https://crmeb-test.shop.lihaink.cn" // httpApi = "https://crmeb-test.shop.lihaink.cn"
httpApiTwo = 'https://nk.lihaink.cn' // 生产 httpApiTwo = 'https://nk.lihaink.cn' // 生产
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产 httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产
} }

View File

@ -1,18 +1,19 @@
<template> <template>
<view class="gather"> <view class="gather">
<!-- <view class="site-box flex_a_c_j_sb"> <view @click="selectLocation">
<view class="place_wrapper flex_a_c" @click="selectLocation"> <view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view class="iconfont icon-weizhi" style="margin-left: 20rpx;"></view>
<view class="town_name">{{street}}</view> <view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']">
<view :class="['iconfont','icon-weizhi',isFshow?'sitebox':'']" style="margin-left: 20rpx;">
</view>
<view class="town_name">{{street}}</view>
</view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#fff;"></view>
</navigator>
</view> </view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none"> </view>
<view class="iconfont icon-xiaoxi" style="color:#fff;"></view>
</navigator>
<view class="bg-img" v-if="isFshow">
<img :src="bgColor" alt="">
</view>
</view> -->
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" :town='street' @kkchange='kkchange'></zbpSwiper> <zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" :town='street' @kkchange='kkchange'></zbpSwiper>
<u-empty :show="jurisdiction" marginTop="260" mode="permission" :text="emptyText" <u-empty :show="jurisdiction" marginTop="260" mode="permission" :text="emptyText"
@ -136,7 +137,10 @@
nowMenuList: [], nowMenuList: [],
street: '', street: '',
showPicker: false, showPicker: false,
columnData: [] columnData: [],
bgColor: '',
isFshow: false,
backColor: 'rgba(248, 66, 33, 0)'
}; };
}, },
computed: { computed: {
@ -165,16 +169,16 @@
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
mounted() { mounted() {
if(this.street.length<=0){ if (this.street.length <= 0) {
this.selfLocation() this.appLocation()
} }
// #ifdef H5 // #ifdef H5
// //
window.addEventListener("scroll", this.scrolling); window.addEventListener("scroll", this.scrolling);
// #endif // #endif
this.$bus.$on('value-updated', (newValue) => { this.$bus.$on('value-updated', (newValue) => {
// //
this.street = newValue.split(',')[0] this.street = newValue.split(',')[0]
}); });
@ -182,18 +186,65 @@
}, },
// #ifdef APP-PLUS // #ifdef APP-PLUS
onPageScroll(e) { onPageScroll(e) {
// this.scrollTop = e.scrollTop; const scrollTop = e.scrollTop;
console.log(e.scrollTop) if (scrollTop <= 20) {
if (e.scrollTop > 0) { this.backColor = 'rgba(248, 66, 33, 0)'
this.isFshow = true
} else {
this.isFshow = false this.isFshow = false
} else if (20 < scrollTop && scrollTop <= 100) {
this.backColor = 'rgba(248, 66, 33, .5)'
this.isFshow = true
} else if (scrollTop > 100) {
this.backColor = 'rgba(248, 66, 33, 1)'
this.isFshow = true
} }
}, },
// #endif // #endif
methods: { 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 (scrollTop <= 20) {
this.backColor = 'rgba(248, 66, 33, 0)'
this.isFshow = false
} else if (20 < scrollTop && scrollTop <= 100) {
this.backColor = 'rgba(248, 66, 33, .5)'
this.isFshow = true
} else if (scrollTop > 100) {
this.backColor = 'rgba(248, 66, 33, 1)'
this.isFshow = true
}
},
// //
initMenu() { initMenu() {
let all = uni.getStorageSync('gatherAllMenuList'); let all = uni.getStorageSync('gatherAllMenuList');
@ -307,7 +358,7 @@
let town = res.data.address_reference.town.title let town = res.data.address_reference.town.title
let street_id = res.data.address_reference.town.id let street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street this.street = res.data.address_component.street
uni.$emit('add',town+','+street_id) uni.$emit('add', town + ',' + street_id)
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
@ -327,43 +378,7 @@
}); });
}, },
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) { kkchange(e) {
this.bgColor = e this.bgColor = e
@ -401,36 +416,30 @@
.gather { .gather {
padding-bottom: 164.91rpx; padding-bottom: 164.91rpx;
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%); background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
position: relative;
} }
.bg-img { .sitebox {
position: absolute; animation-name: fadeIn;
width: 100%; animation-duration: 3s;
height: 100%; animation-fill-mode: forwards;
top: 0; }
/* #ifdef MP || APP-PLUS */
z-index: -100;
/* #endif */
/* #ifdef H5 */
z-index: -100;
/* #endif */
z-index: -100;
filter: blur(0);
overflow: hidden;
@keyframes fadeIn {
from {
opacity: 0;
}
img { to {
width: 100%; opacity: 1;
height: 100%;
filter: blur(30rpx);
transform: scale(1.5);
} }
} }
.site-box { .site-box {
width: 100%; width: 100%;
/* #ifdef MP || APP-PLUS */ /* #ifdef MP || APP-PLUS */
height: 170rpx; height: 160rpx;
/* #endif */ /* #endif */
/* #ifdef H5 */ /* #ifdef H5 */
height: 120rpx; height: 120rpx;
@ -440,7 +449,15 @@
top: 0rpx; top: 0rpx;
position: fixed; position: fixed;
z-index: 999; z-index: 999;
padding-top: 30rpx; /* #ifdef MP || APP-PLUS */
padding-top: 75rpx;
/* #endif */
/* #ifdef H5 */
padding-top: 25rpx;
/* #endif */
padding-right: 20rpx; padding-right: 20rpx;
// //
@ -449,17 +466,20 @@
margin-right: 24.56rpx; margin-right: 24.56rpx;
font-size: 30rpx; font-size: 30rpx;
opacity: 0;
.town_name { .town_name {
margin-left: 21rpx; margin-left: 21rpx;
} }
} }
.iconfont { .iconfont {
opacity: 0;
font-size: 30rpx;
font-size: 35.09rpx; font-size: 35.09rpx;
} }
} }
.top_box { .top_box {
// padding-top: 180rpx; // padding-top: 180rpx;
background: linear-gradient(#36A2FF, #fff); background: linear-gradient(#36A2FF, #fff);

View File

@ -655,7 +655,7 @@
} }
}); });
}, },
// 授权回调 // // 授权回调
onLoadFun() { onLoadFun() {
this.isShowAuth = false this.isShowAuth = false
this.getUserInfo() this.getUserInfo()
@ -751,7 +751,8 @@
if (list.length == 0) return if (list.length == 0) return
let that = this; let that = this;
that.loadVideo = list.length == that.limit that.loadVideo = list.length == that.limit
that.page = that.page + 1; // that.page = that.page + 1;
that.page =1
var msg = list var msg = list
for (let i = 0; i < msg.length; i++) { for (let i = 0; i < msg.length; i++) {
msg[i]['isMore'] = false msg[i]['isMore'] = false

View File

@ -291,12 +291,19 @@
window.addEventListener("scroll", this.scrolling); window.addEventListener("scroll", this.scrolling);
// #endif // #endif
this.$bus.$on('value-updated', (newValue) => { //
// this.$nextTick(()=>{
this.street = newValue.split(',')[0] this.$bus.$on('value-updated', (newValue) => {
}); //
this.street = newValue.split(',')[0]
this.town=newValue.split(',')[0]
this.street_id=newValue.split(',')[1]
});
})
if(this.street.length<=0){ if(this.street.length<=0){
this.selfLocation() this.selfLocation()
} }
}, },
@ -315,13 +322,6 @@
this.isFshow = true this.isFshow = true
} else if (e.scrollTop == 0) {
this.ishshow = false
this.isFshow = false
} else {
this.ishshow = false
this.isFshow = false
} }
}, },
// #endif // #endif