|
@@ -1,7 +1,6 @@
|
|
|
<template>
|
|
|
- <view class="yybox">
|
|
|
+ <view>
|
|
|
<view class="navbox">
|
|
|
- <image :src="navbg" class="navbg"></image>
|
|
|
<uni-nav-bar color="#ffffff" leftWidth='340rpx' :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
|
|
|
<block slot="left">
|
|
|
<view class="navleft">
|
|
@@ -18,7 +17,8 @@
|
|
|
</uni-nav-bar>
|
|
|
</view>
|
|
|
<!-- 主体 -->
|
|
|
- <view class="yymain">
|
|
|
+ <image :src="navbg" class="navbg"></image>
|
|
|
+ <view class="yymain" :style="'margin-top:-'+marTop+'rpx;'">
|
|
|
<view class="yycard">
|
|
|
<view class="top flexccc">
|
|
|
<image :src="headimg"></image>
|
|
@@ -51,12 +51,12 @@
|
|
|
</view>
|
|
|
<!-- 列表 -->
|
|
|
<view>
|
|
|
- <y-list type='1' :datalist="list" :wtdt="wtdt" @getDetail='getDetail' :adrlist="adrlist" @getDelFn="getDelFn" @gettypeFn="gettypeFn"></y-list>
|
|
|
+ <y-list type='order' :datalist="list" :wtdt="wtdt" @getDetail='getDetail' :adrlist="adrlist" @getDelFn="getDelFn" @gettypeFn="gettypeFn"></y-list>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <footers v-if="isfootflag" :footlist="footlist" :footerindex="footerindex" :color_checked="color_checked" :color_nochecked="color_nochecked" :isHomeIndex="true"></footers>
|
|
|
+ <footers v-if="isfootflag" :footerindex="footerindex"></footers>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -72,14 +72,8 @@
|
|
|
components:{yList,footers},
|
|
|
data(){
|
|
|
return{
|
|
|
- footlist:[
|
|
|
- {module:'home',title:'首页',icon_checked:require('@/static/images/tabbar/home_.png'),icon_nochecked:require('@/static/images/tabbar/home.png')},
|
|
|
- {module:'mine',title:'我的',icon_checked:require('@/static/images/tabbar/mine_.png'),icon_nochecked:require('@/static/images/tabbar/mine.png')},
|
|
|
- ],
|
|
|
footerindex:'home',
|
|
|
isfootflag:true,
|
|
|
- color_checked :'161616',
|
|
|
- color_nochecked :'666666',
|
|
|
navbg:require("@/static/images/navbg.png"),
|
|
|
headimg:require("@/static/images/order/staff/head.png"),
|
|
|
listline:require("@/static/images/order/staff/listline.png"),
|
|
@@ -92,6 +86,9 @@
|
|
|
pageSize: 10,
|
|
|
pageNum: 1,
|
|
|
reachflag: false,
|
|
|
+ nvaHeight:44,
|
|
|
+ marTop:0,//距离顶部的距离
|
|
|
+ stubarHeight:0,//
|
|
|
wtdt:'',
|
|
|
daytime:'',
|
|
|
lunar:'',
|
|
@@ -107,6 +104,9 @@
|
|
|
this.backgroundColor = 'transparent'
|
|
|
}
|
|
|
},
|
|
|
+ onUnload() {
|
|
|
+ uni.$off('refreshdatalist')
|
|
|
+ },
|
|
|
onLoad: function() {
|
|
|
uni.$on('refreshdatalist',(e) => {
|
|
|
this.reachflag=false;
|
|
@@ -119,12 +119,18 @@
|
|
|
this.init()
|
|
|
// this.getcount()
|
|
|
this.getDataFn()
|
|
|
+ uni.getSystemInfo({
|
|
|
+ success: (e) => {
|
|
|
+ this.stubarHeight=Number(e.statusBarHeight);
|
|
|
+ this.nvaHeight = Number(e.statusBarHeight)+44;
|
|
|
+ this.marTop=692-Number(this.nvaHeight*2)-16;
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
},
|
|
|
- onUnload() {
|
|
|
- uni.$off('refreshdatalist')
|
|
|
+ mounted() {
|
|
|
+ this.getHeightFn()
|
|
|
},
|
|
|
-
|
|
|
onShow() {
|
|
|
var that=this;
|
|
|
this.time();
|
|
@@ -154,6 +160,26 @@
|
|
|
},
|
|
|
methods:{
|
|
|
checkPermi, checkRole,
|
|
|
+ getHeightFn(){
|
|
|
+ let query = uni.createSelectorQuery().in(this);
|
|
|
+ //需要给黄色区域设置一个id标识,在这里是demo
|
|
|
+ query.select('.navbox').boundingClientRect(data => {
|
|
|
+ var top=data.top<0 ? -data.top : data.top;
|
|
|
+ var stubarHeight=Number(this.stubarHeight);
|
|
|
+ if (top <=this.nvaHeight) {
|
|
|
+ const opacity = top / 100 // 计算透明度值
|
|
|
+ const color = `rgba(4, 145, 253, ${opacity})`
|
|
|
+ this.backgroundColor = color // 更新盒子背景颜色
|
|
|
+ } else {
|
|
|
+ this.backgroundColor = '#00A9F0'
|
|
|
+ }
|
|
|
+ if(top>2){
|
|
|
+ this.scroflag=true
|
|
|
+ }else{
|
|
|
+ this.scroflag=false
|
|
|
+ }
|
|
|
+ }).exec();
|
|
|
+ },
|
|
|
init(){
|
|
|
// 记录来源
|
|
|
getDictionaryFn('jluly').then(res=>{
|
|
@@ -279,16 +305,16 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.navbox{
|
|
|
- .navbg{width: 100%;height: 692rpx;position: fixed;left: 0;right: 0;top: 0;z-index: 1;}
|
|
|
-}
|
|
|
+// .navbox{
|
|
|
+// .navbg{width: 100%;height: 692rpx;position: fixed;left: 0;right: 0;top: 0;z-index: 1;}
|
|
|
+// }
|
|
|
+.navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4; }
|
|
|
+.navbg{width: 100%;height: 692rpx;}
|
|
|
.navleft{padding-left: 12rpx;
|
|
|
view{font-weight: bold;font-size: 26rpx;color: #FFFFFF;line-height: 36rpx;}
|
|
|
}
|
|
|
.navright{width: 40rpx;height: 40rpx;}
|
|
|
-.yymain{
|
|
|
- flex: 1;z-index: 2;padding-top: 20rpx;
|
|
|
-}
|
|
|
+.yymain{flex: 1;z-index: 2;position: relative;}
|
|
|
.yycard{width: 684rpx;height: 306rpx;background: #FFFFFF;border-radius: 14rpx;margin: 0 auto;
|
|
|
.top{
|
|
|
image{width: 132rpx;height: 132rpx;margin-bottom: 12rpx;margin-top: -56rpx;}
|