Browse Source

修改顶部样式

306132416@qq.com 4 years ago
parent
commit
9171d17d0a

+ 13 - 3
components/top-title/top-title.vue

@@ -1,5 +1,5 @@
 <template>
-    <view class="title-box">
+    <view class="title-box" :class="pageScroll > 140 ? 'scroll-style' : ''">
 	      {{titleValue}}
     </view>
   </view>
@@ -13,6 +13,10 @@ export default {
       type: String,
       default: '空i企',
     },
+	pageScroll:{
+		type:Number,
+		default:0
+	}
   },
   data() {
     return {};
@@ -27,13 +31,19 @@ export default {
     width: 100%;
     height: 80rpx;
     background: transparent;
-    position: absolute;
+    position: fixed;
     top: 40rpx;
     color: #fff;
     letter-spacing: 6rpx;
     z-index: 9999;
     text-align: center;
 	font-weight: 550;
-	line-height: 85rpx;
+	line-height: 90rpx;
+}
+.scroll-style {
+	background: #02A7F0;
+	top: 0;
+	height: 135rpx;
+	line-height: 160rpx;
 }
 </style>

+ 6 - 1
pages/index/index.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="content">
-	<top-title :titleValue="title" style="width: 100%;"></top-title>  
+	<top-title :titleValue="title" :pageScroll="scrollVal" style="width: 100%;"></top-title> 
     <view class="page-section-spacing" style="width: 100%; position: relative">
       <swiper
         class="swiper"
@@ -289,6 +289,7 @@ export default {
   data() {
     return {
 	  title:"Air企通",
+	  scrollVal:Number,
       swiperList: [
         {
           img: "/static/swiper/swiper1.jpg",
@@ -421,6 +422,7 @@ export default {
     this.getSwiperList();
     this.getPark();
     this.getNotice();
+	console.log(getApp().global)
     //this.getAttract(); //招商接口
   },
   onShareAppMessage() {
@@ -654,6 +656,9 @@ export default {
       });
     },
   },
+  onPageScroll(e) {
+	this.scrollVal = e.scrollTop;
+  },
 };
 </script>
 

+ 4 - 2
pages/policy/policy_deatil.vue

@@ -180,6 +180,7 @@ export default {
         4: "新城政策",
       },
       id: "",
+	  pageId:'',
       textModel1: {
         title: "申报条件",
         text: "",
@@ -201,11 +202,12 @@ export default {
     };
   },
   onLoad(option) {
-    let id = option.id;
-    this.getDetailInfo(id);
+    this.pageId = option.id;
+   // this.getDetailInfo(id);
 	this.getUserAuth();
   },
   onShow() {
+	this.getDetailInfo(this.pageId);
   },
   methods: {
 	goAuthPage(){

+ 12 - 4
pages/selfCenter/index.vue

@@ -81,9 +81,6 @@ export default {
       });
     },
     goDetailFn(index, url) {
-      uni.navigateTo({
-        url,
-      });
       let that = this;
       switch (index) {
         case 0: //我的建议
@@ -91,6 +88,17 @@ export default {
         case 1: //我的报名
           break;
         case 2: //我的收藏
+		 if(that.isAuth){
+			uni.navigateTo({
+			  url,
+			}); 
+		 }else {
+			 uni.showToast({
+			   title: "您还没有登录授权",
+			   duration: 2500,
+			   icon: "none",
+			 });
+		 }
           break;
         case 3: //退出登录
           if (that.isAuth) {
@@ -106,7 +114,7 @@ export default {
             });
           } else {
             uni.showToast({
-              title: "您还没有登录",
+              title: "您还没有登录授权",
               duration: 2500,
               icon: "none",
             });