页面修改

This commit is contained in:
THK3121 2023-09-11 16:01:39 +08:00
parent a1fd0875d7
commit 18d3622cff
2 changed files with 42 additions and 16 deletions

View File

@ -9,8 +9,8 @@ let httpApiThree
// 网络接口修改此字符 小程序域名要求https // 网络接口修改此字符 小程序域名要求https
// let httpApi = 'http://192.168.31.110:8324' // 测试 // let httpApi = 'http://192.168.31.110:8324' // 测试
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
httpApi = 'https://shop.lihaink.cn' // 生产 // httpApi = 'https://shop.lihaink.cn' // 生产
// httpApi = "https://crmeb-test.shop.lihaink.cn" httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.222" // httpApi = "http://192.168.0.222"
// httpApi = "http://192.168.0.108:8325" // httpApi = "http://192.168.0.108:8325"
// httpApi = 'http://192.168.0.108:8325' // httpApi = 'http://192.168.0.108:8325'

View File

@ -17,8 +17,9 @@
</view> --> </view> -->
<view class="" v-if="cloudList.length>0"> <view class="" v-if="cloudList.length>0">
<view class=""> <view class="">
<!-- <view style="height: var(--status-bar-height);"></view> --> <!-- <view :style="`height: ${appInfo.top}px;background-color: red;z-index: 99999;`"></view> -->
<transition name="fade"> <transition name="fade">
<view class="head" style="padding-top: var(--status-bar-height);" v-if="showtit"> <view class="head" style="padding-top: var(--status-bar-height);" v-if="showtit">
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
@ -59,7 +60,7 @@
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx" <u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx"
height="50.82rpx"></u--image> height="50.82rpx"></u--image>
<text class="">全部</text> <text class="">全部</text>
<view class="flag"> <view class="flags">
</view> </view>
</view> </view>
@ -75,7 +76,7 @@
:circular="true" previous-margin='0rpx' next-margin='0rpx' :current="current" :circular="true" previous-margin='0rpx' next-margin='0rpx' :current="current"
:disable-touch="true"> :disable-touch="true">
<swiper-item v-for="(item,index) in cloudList"> <swiper-item v-for="(item,index) in cloudList">
<u--image :showLoading="true" :src="item.cover" width="750rpx" <u--image :showLoading="true" :src="item.cover" :class="act_img" width="750rpx"
height="998.83rpx"></u--image> height="998.83rpx"></u--image>
</swiper-item> </swiper-item>
</swiper> </swiper>
@ -97,15 +98,15 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<view class="content_sift" :style="{position:pocls,top:headtop+'px'}" v-if="!showtit">
<view :class="{act:item.act}" v-for="item,index in actList" :key="index"
@click="screenGoods(item.screen,index)">
{{item.tit}}
</view>
</view>
<transition name="fade"> <transition name="fade">
<view class="content"> <view class="content">
<view class="content_sift" :style="{position:pocls,top:(headtop+16)+'px'}" v-if="!showtit">
<view :class="{act:item.act}" v-for="item,index in actList" :key="index"
@click="screenGoods(item.screen,index)">
{{item.tit}}
</view>
</view>
<view class="goods_list" v-if="goodsList.length>0"> <view class="goods_list" v-if="goodsList.length>0">
<view class="empty" v-if='showLoading'> <view class="empty" v-if='showLoading'>
<u-loading-icon v-if='showLoading' text="加载中" textSize="18"></u-loading-icon> <u-loading-icon v-if='showLoading' text="加载中" textSize="18"></u-loading-icon>
@ -280,8 +281,9 @@
showtit: true, showtit: true,
cartList: [], cartList: [],
activeClass: 'activeClass', activeClass: 'activeClass',
headtop: "", headtop: 0,
page_num: 1, page_num: 1,
act_img: "",
actList: [{ actList: [{
tit: '综合', tit: '综合',
act: "", act: "",
@ -338,13 +340,15 @@
.select('.content') .select('.content')
.boundingClientRect(rect => { .boundingClientRect(rect => {
// console.log(rect) // console.log(rect)
if (rect.top <= this.headtop) { if (rect.top <= (this.headtop + 16)) {
this.pocls = 'fixed' this.pocls = 'fixed'
this.act_swiper = 'act_swiper' this.act_swiper = 'act_swiper'
this.act_img = 'act_img'
} else { } else {
this.pocls = '' this.pocls = ''
this.act_swiper = '' this.act_swiper = ''
this.act_img = ''
} }
}) })
@ -352,11 +356,20 @@
if (this.headtop) return if (this.headtop) return
uni.createSelectorQuery() uni.createSelectorQuery()
.in(this) .in(this)
.select('.flag') .select('.flags')
.boundingClientRect(rect => { .boundingClientRect(rect => {
this.headtop = rect.top this.headtop = rect.top
console.log(rect.top)
}) })
.exec(); .exec();
// uni.createSelectorQuery()
// .in(this)
// .select('.content_sift')
// .boundingClientRect(rect => {
// // this.headtop += rect.height
// console.log(this.headtop)
// })
// .exec();
}, },
onPullDownRefresh() { onPullDownRefresh() {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
@ -478,6 +491,11 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.flags {
background-color: red;
z-index: 99999999;
}
.box { .box {
position: relative; position: relative;
@ -488,7 +506,7 @@
// border-top: 5px solid red; // border-top: 5px solid red;
z-index: 99; z-index: 99;
background-color: #F4F4F4; background-color: #F4F4F4;
padding: 0 10rpx; // padding: 0 10rpx;
} }
@ -647,6 +665,7 @@
.goods_list { .goods_list {
min-height: 100vh; min-height: 100vh;
padding: 0 10rpx;
// background-color: red; // background-color: red;
.goods { .goods {
@ -717,6 +736,12 @@
overflow: hidden; overflow: hidden;
} }
.act_img {
// transition:t;
transform: translateY(-848rpx);
}
// .act_swiper2 { // .act_swiper2 {
// height: 998rpx; // height: 998rpx;
// } // }
@ -727,6 +752,7 @@
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
background-color: white; background-color: white;
// background-color: green;
z-index: 99; z-index: 99;
box-sizing: border-box; box-sizing: border-box;