Browse Source

修改问题

306132416@qq.com 4 years ago
parent
commit
251b574b4b

+ 1 - 0
App.vue

@@ -23,6 +23,7 @@ export default {
   },
   onShow: function () {
     console.log("App Show");
+    uni.hideTabBar({})
   },
   onHide: function () {
     console.log("App Hide");

+ 53 - 74
components/foot-tabs/footTabs.vue

@@ -1,22 +1,23 @@
 <template>
-  <view class="hover_content">
-    <view class="hover_menu flex">
-      <div class="sider" :class="isSider ? 'hoverd' : 'hover'"></div>
-      <view
+  <div class="hover_content">
+    <div class="hover_menu flex">
+      <div
         class="menu_icon"
         v-for="(menu, i) in menus"
         :key="i"
         @tap="click(i, menu.pagePath)"
       >
-        <view class="iconBox">
-          <span class="iconfont" :class="[menu.icon, (selectedIndex == i)? 'hoverd' : 'hover']"></span>
-        </view>
-      </view>
-    </view>
-  </view>
+        <!-- <uni-transition mode-class="fade" show="true" v-if="selectedIndex == i"> -->
+          <!-- <img :src="menu.selectedIconPath" /> -->
+		  <image class="tabbar-list-li-icon-image" :src="selectedIndex == i ? menu.selectedIconPath : menu.iconPath" mode=""></image>
+       <!-- </uni-transition> -->
+<!--        <uni-transition mode-class="fade" show="true" v-else>
+          <img :src="menu.iconPath" />
+        </uni-transition> -->
+      </div>
+    </div>
+  </div>
 </template>
-<style scoped src="../../static/iconfont.css">
-</style>
 <style lang="scss" scoped>
 .hover_content {
   z-index: 999;
@@ -32,89 +33,67 @@
   .hover_menu {
     display: flex;
     justify-content: space-around;
-    align-items: center;
-    margin-top: 10rpx;
-    .sider {
-      position: absolute;
-      width: 60rpx;
-      height: 60rpx;
-      border-radius: 50%;
-      left: 14%;
-      transition: all 0.1s;
-      background: rgb(14, 92, 246);
-      &.hover {
-        left: 14%;
-        background: rgb(14, 92, 246);
-      }
-      &.hoverd {
-        left: 61%;
-        background: rgb(14, 92, 246);
-      }
-    }
+	margin-top: 10rpx;
     .menu_icon {
-      position: relative;
-      .iconBox {
+      transition: all 0.5s;
+      image {
         width: 60rpx;
         height: 60rpx;
-        border-radius: 50%;
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        .iconfont {
-          z-index: 999;
-          color: #fff;
-          font-size: 30rpx;
-          font-family: "iconfont" !important;
-          -webkit-font-smoothing: antialiased;
-          -moz-osx-font-smoothing: grayscale;
-          &.hover{
-            color: rgb(187, 187, 187);
-          }
-          &.hoverd{
-            color: #fff;
-          }
-        }
+        border-radius: 100rpx;
       }
     }
   }
 }
 </style>
 <script>
-import app from '../../App'
 export default {
-  data() {
+	props: ['selectedIndex'],
+	data() {
     return {
-      selectedIndex: app.globalData.selectedIndex,
-      showselected: false,
-      isSider: app.globalData.isSider,
+      // selectedIndex: 0,
+      // showselected: false,
       menus: [
         {
-          pagePath: "pages/index/index",
-          icon: "icon-zhuye",
-          text: "首页",
+          pagePath: "/pages/index/index",
+          iconPath: "/static/tabbar/home-select.png",
+          selectedIconPath: "/static/tabbar/home-selected.png",
+          text: "Ê×Ò³",
         },
         {
-          pagePath: "pages/selfCenter/index",
-          icon: "icon-geren",
-          text: "我的",
+          pagePath: "/pages/selfCenter/index",
+          iconPath: "/static/tabbar/user-select.png",
+          selectedIconPath: "/static/tabbar/user-selected.png",
+          text: "ÎÒµÄ",
         },
       ],
     };
   },
   methods: {
     click(index, src) {
-     this.selectedIndex = index
-     app.globalData.selectedIndex = index
-      if (index == 0) {
-        this.isSider = false;
-        app.globalData.isSider = false
-      } else {
-        this.isSider = true;
-        app.globalData.isSider = true
-      }
-      uni.redirectTo({
-        url: "/" + src,
-      });
+  //    let that = this;		
+  //    that.selectedIndex = index
+  //    getApp().globalData.selectedIndex = index 
+  //     if (index == 0) {
+		// that.isSider = false;
+		// getApp().globalData.isSider = false;
+  //     } else {
+		// that.isSider = true;
+		// getApp().globalData.isSider = true;
+  //     }
+	  uni.switchTab({
+	  	url:src,
+	  })
+	 // var pages = getCurrentPages();
+	 // uni.navigateTo({
+		// url: "/" + src,
+		// // animationType: 'pop-in',
+		// // animationDuration: 200
+	 // });
+	 // if(pages.length > 9){
+		//  uni.reLaunch({
+		// 	url: "/" + src,
+		//  });
+	 // }
     },
   },
 };

+ 19 - 1
pages.json

@@ -18,7 +18,10 @@
 			"path": "pages/selfCenter/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"navigationStyle": "custom"
+				"navigationStyle": "custom",
+			    "app-plus": {  
+			      "popGesture": "none"  
+			    }  
 			}
 		},
 		{
@@ -208,5 +211,20 @@
 		"navigationBarTitleText": "空i企",
 		"navigationBarBackgroundColor": "#F8F8F8",
 		"backgroundColor": "#F8F8F8"
+	},
+	"tabBar": {
+		"list": [{
+				"pagePath": "pages/index/index",
+				"iconPath": "/static/tabbar/home-select.png",
+				"selectedIconPath": "/static/tabbar/home-selected.png",
+				"text": "首页"
+			},
+			{
+				"pagePath": "pages/selfCenter/index",
+				"iconPath": "/static/tabbar/user-select.png",
+				"selectedIconPath": "/static/tabbar/user-selected.png",
+				"text": "我的"
+			}
+		]
 	}
 }

+ 17 - 6
pages/index/index.vue

@@ -6,7 +6,7 @@
         indicator-dots="false"
         autoplay="true"
         duration="500"
-        style="height: 400rpx"
+        style="height: 440rpx"
         @change="swiperChange"
       >
         <swiper-item
@@ -74,7 +74,7 @@
           mode="aspectFit"
           style="width: 34px; height: 34px"
         ></image>
-        <view class="notice-content display-around-column">
+        <view class="notice-content display-around-column" style="width: 88%;">
           <view class="notice-content-font" style="margin-left: 40rpx">{{
             item.title
           }}</view>
@@ -272,13 +272,17 @@
         </view>
       </view>
     </view>
-    <foot-tabs></foot-tabs>
+    <foot-tabs :selectedIndex='0'></foot-tabs>
   </view>
 </template>
 
 <script>
 import md5 from "@/common/md5.js";
+import footTabs from '@/components/foot-tabs/footTabs.vue';
 export default {
+	components: {
+		'foot-tabs': footTabs
+	},
   data() {
     return {
       swiperList: [
@@ -406,12 +410,18 @@ export default {
       ],
     };
   },
+  onShow() {
+	  uni.hideTabBar({})
+  },
   onLoad() {
     this.getSwiperList();
     this.getPark();
     this.getNotice();
     //   this.loginLoad();
   },
+  onShareAppMessage() {
+  	url:'/pages/index/index'
+  },
   methods: {
     swiperChange(e) {
       this.swiperCurrent = e.detail.current;
@@ -593,6 +603,7 @@ export default {
   flex-direction: column;
   align-items: center;
   justify-content: center;
+  position: relative;
 }
 
 .logo {
@@ -622,7 +633,7 @@ export default {
 .rowDot {
   display: flex;
   position: absolute;
-  top: 270rpx;
+  top: 310rpx;
   left: 80rpx;
 }
 .dots {
@@ -654,7 +665,7 @@ export default {
   box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
   border-radius: 32rpx;
   position: absolute;
-  top: 300rpx;
+  top: 360rpx;
   background-color: #fff;
 }
 .nav-content {
@@ -674,7 +685,7 @@ export default {
 }
 .notice-box {
   width: 83%;
-  margin-top: 300rpx;
+  margin-top: 320rpx;
   margin-bottom: 20rpx;
 }
 .notice-title-box {

+ 12 - 8
pages/park/park_deatil.vue

@@ -138,12 +138,12 @@
 		data() {
 			return {
 			    swiperList:[
-					{
-						img:'/static/swiper/swiper1.jpg'
-					},
-					{
-						img:'/static/swiper/swiper2.jpg'
-					},
+					// {
+					// 	img:'/static/swiper/swiper1.jpg'
+					// },
+					// {
+					// 	img:'/static/swiper/swiper2.jpg'
+					// },
 				],
 				nowId:'',
 				levelList:{
@@ -268,8 +268,12 @@
 					data:postData,
 					success: (res) => {
 						if(res.data.code === 200){
-							res.data.data.park_pics.forEach((item)=>{item.pic_path = getApp().globalData.shareUrl + item.pic_path})
-							this.swiperList = res.data.data.park_pics;
+							if(res.data.data.park_pics.length){
+								res.data.data.park_pics.forEach((item)=>{item.pic_path = getApp().globalData.shareUrl + item.pic_path})
+								this.swiperList = res.data.data.park_pics;
+							}else{
+								this.swiperList = [{pic_path:'/static/park/1.png'}]
+							}
 							this.detailObj = res.data.data;
 							this.detailObj.location = this.detailObj.location.split(',');
 							this.latitude = this.detailObj.location[0];

+ 9 - 11
pages/policy/policy_deatil.vue

@@ -12,9 +12,8 @@
         </p>
       </div>
     </div>
-    <div class="video-box">
+    <div class="video-box" v-if="infoObj.video_url">
       <video
-        v-if="infoObj.video_url"
         :src="infoObj.video_url"
         id="myVideo"
         controls="true"
@@ -44,7 +43,7 @@
       </div>
     </div>
     <!-- 项目概况 -->
-    <div class="card-situation">
+    <div class="card-situation" v-if="infoObj.project_desc">
       <div class="card-title">项目概况</div>
       <p>
         {{ infoObj.project_desc }}
@@ -137,11 +136,11 @@
       </div>
     </div>
     <div class="content-rich" :class="{ 'margin-bottom-80': true }">
-      <div class="card-title">{{ textModel4.title }}</div>
+      <div class="card-title">联系方式</div>
       <div class="item-list">
         <div class="term">
           <div class="term-value-group">
-            <p class="term-value-item" v-html="textModel4.text"></p>
+            <p class="term-value-item">{{infoObj.contact}}</p>
           </div>
         </div>
       </div>
@@ -188,10 +187,10 @@ export default {
         title: "申报途径",
         text: "",
       },
-      textModel4: {
-        title: "联系方式",
-        text: "",
-      },
+      // textModel4: {
+      //   title: "联系方式",
+      //   text: "",
+      // },
       scrollTop: 0,
       infoObj: {},
     };
@@ -228,8 +227,7 @@ export default {
         },
         success: (res) => {
           if (res.data.code === 200) {
-            res.data.data.video_url =
-              getApp().globalData.shareUrl + res.data.data.video_url;
+			if(res.data.data.video_url){ res.data.data.video_url = getApp().globalData.shareUrl + res.data.data.video_url;}
             res.data.data.level = this.levelList[res.data.data.level];
             this.infoObj = res.data.data;
             this.getRich1(ids);

+ 10 - 10
pages/selfCenter/index.vue

@@ -1,18 +1,13 @@
 <template>
   <view class="content">
-    <foot-tabs></foot-tabs>
     <div class="self-inf">
       <div class="img-name-box" v-if="isAuth">
-        <image
-          :src="userHeadImg"
-          alt=""
-          class="heade-img"
-          mode="aspectFill"
-        ></image>
+        <image :src="userHeadImg" class="heade-img" mode="aspectFill"></image>
         <p class="nickname">{{ userNickName }}</p>
       </div>
       <view class="img-name-box" v-if="!isAuth">
-        <button @click="goAuthPage()" class="auth-btn">点击去授权</button>
+		<image src="/static/auth-icon.png" class="heade-img" mode="aspectFill"></image>
+        <button @click="goAuthPage()" class="auth-btn">授权登录</button>
       </view>
       <image class="bg-img" :src="swiperBackground" mode="aspectFill"></image>
       <image src="../../static/Intersect.svg" class="groove-img"></image>
@@ -35,12 +30,17 @@
         </div>
       </div>
     </div>
+	<foot-tabs :selectedIndex='1'></foot-tabs>
   </view>
 </template>
 
 <script>
 import md5 from "@/common/md5.js";
+import footTabs from '@/components/foot-tabs/footTabs.vue';
 export default {
+	components: {
+		'foot-tabs': footTabs
+	},
   data() {
     return {
       message: "我的",
@@ -256,8 +256,8 @@ export default {
       display: flex;
       align-items: center;
       .auth-btn {
-        margin-left: 80rpx;
-        margin-top: 50rpx;
+		margin-left: 30rpx;
+		margin-top: 20rpx;
         font-size: 28rpx;
         background-color: #02a7f0;
         color: #fff;

BIN
static/auth-icon.png