Explorar o código

Merge branch 'master' of http://121.40.40.223:3000/zizhong.wang/konggang-city-miniprogram

Jing-Jiu %!s(int64=4) %!d(string=hai) anos
pai
achega
932d86d980
Modificáronse 3 ficheiros con 78 adicións e 64 borrados
  1. 33 30
      pages/index/index.vue
  2. 11 5
      pages/service/index.vue
  3. 34 29
      pages/supply/index.vue

+ 33 - 30
pages/index/index.vue

@@ -112,7 +112,7 @@
       >
         <view
           class="park-box"
-          v-for="(item) in parkList"
+          v-for="item in parkList"
           :key="item.id"
           @click="goParkDetailFn(item.id)"
         >
@@ -206,12 +206,12 @@
         class="notice-content-box"
         v-for="(item, index) in attractList"
         :key="index"
-        style="justify-content: start;position: relative;"
-        @click="goAttractDeatil(item.id,item.time_type)"
+        style="justify-content: start; position: relative"
+        @click="goAttractDeatil(item.id, item.time_type)"
       >
-	  <view class="maskModal" v-if="item.time_type == 0">
-	  	<text>敬请期待</text>
-	  </view>
+        <view class="maskModal" v-if="item.time_type == 0">
+          <text>敬请期待</text>
+        </view>
         <image
           :src="item.pic_url"
           mode="aspectFill"
@@ -446,13 +446,13 @@ export default {
   },
   onShow() {
     uni.hideTabBar({});
-	this.getActive();
+    this.getActive();
   },
   onLoad() {
-	uni.showLoading({
-	  title: "加载中",
-	  mask: true,
-	}); 
+    uni.showLoading({
+      title: "加载中",
+      mask: true,
+    });
     this.getSwiperList();
     this.getPark();
     this.getNotice();
@@ -639,7 +639,10 @@ export default {
             res.data.data.list.forEach((item) => {
               item.pic_url = getApp().globalData.shareUrl + item.pic_url;
             });
-            this.attractList = res.data.data.list;
+            console.log(res.data.data.list);
+            this.attractList = res.data.data.list.filter(
+              (item) => item.show != 0
+            );
           }
         },
         fail: () => {
@@ -728,8 +731,8 @@ export default {
         url: "/pages/notice/notice_deatil?id=" + id,
       });
     },
-    goAttractDeatil(id,type) {
-	  if(type == '0')return
+    goAttractDeatil(id, type) {
+      if (type == "0") return;
       uni.navigateTo({
         url: "/pages/attract/attract_deatil?id=" + id,
       });
@@ -826,9 +829,9 @@ export default {
 .dot.active {
   background: #ff4e54;
 }
- .swiper-content {
+/* .swiper-content { */
   /* border-radius: 0 0 10% 10%; */
-} 
+/* } */
 .page-nav-box {
   width: 80%;
   /* height: 320rpx; */
@@ -893,20 +896,20 @@ export default {
   justify-content: space-between;
 }
 .maskModal {
-	width: 100%;
-	position: absolute;
-	background-color: rgba(0, 0, 0, 0.4);
-	border-radius: 32rpx;
-	height: 100%;
-	top: 0;
-	right: 0;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	color: #fff;
-	font-size: 28rpx;
-	font-weight: bold;
-	}
+  width: 100%;
+  position: absolute;
+  background-color: rgba(0, 0, 0, 0.4);
+  border-radius: 32rpx;
+  height: 100%;
+  top: 0;
+  right: 0;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  color: #fff;
+  font-size: 28rpx;
+  font-weight: bold;
+}
 .notice-content-font {
   font-size: 26rpx;
   color: #0d1937;

+ 11 - 5
pages/service/index.vue

@@ -3,11 +3,12 @@
     <view class="banner">
       <image :src="bannerSrc" alt="banner" mode="aspectFill"/>
     </view>
-    <div class="menus">
-      <div class="menu" v-for="(item,index) in miniProgramList" :key="index" @click="toDetail(item)">
+	<view class="cross-line"></view>
+    <view class="menus">
+      <view class="menu" v-for="(item,index) in miniProgramList" :key="index" @click="toDetail(item)">
         <image :src="item.pic_url" mode="aspectFill"/>
-      </div>
-    </div>
+      </view>
+    </view>
   </view>
 </template>
 
@@ -132,12 +133,17 @@ export default {
     height:100%;
   .banner {
     height: 25%;
-	margin-bottom:30rpx;
+	margin-bottom:20rpx;
     image {
       width: 100%;
       height: 100%;
     }
   }
+  .cross-line {
+	  width: 100%;
+	  height: 10rpx;
+	  background-color: #F2F2F2;
+  }
   .menus {
     height: 15%;
     .menu {

+ 34 - 29
pages/supply/index.vue

@@ -6,15 +6,10 @@
         :value="index"
         :range="array"
         range-key="name"
+        class="picker_self"
       >
-        <view class="picker_title">
-          <view class="pickername">
-            <view v-if="index != -1">
-              {{ array[index].name }}
-            </view>
-            <view v-else>类型</view>
-          </view>
-          <view class="triangle-down"></view>
+        <view class="picker_title active">
+          {{ picker_title }}
         </view>
       </picker>
     </view>
@@ -26,7 +21,7 @@
         @tap="toDetail(supply.id)"
       >
         <view class="image_content">
-          <image :src="supply.image" mode="aspectFill"/>
+          <image :src="supply.image" mode="aspectFill" />
         </view>
         <view class="info">
           <view class="title">
@@ -65,6 +60,7 @@ export default {
       supplyList: [],
       array: [{ name: "全部" }, { name: "供需" }, { name: "需求" }],
       index: -1,
+      picker_title: "类型",
     };
   },
   onLoad() {
@@ -73,6 +69,7 @@ export default {
   methods: {
     bindPickerChange(e) {
       this.index = e.detail.value;
+      this.picker_title = this.array[this.index].name;
       this.getMyList();
     },
     toDetail(index) {
@@ -135,7 +132,7 @@ export default {
               );
               ob.time = time + " " + timeSecond;
               ob.state = item.type;
-               ob.image = "/static/nodata.svg"
+              ob.image = "/static/nodata.svg";
               // ob.image = item.attach_list[0]
               //   ? getApp().globalData.shareUrl + item.attach_list[0].url
               //   : "/static/nodata.svg";
@@ -154,34 +151,42 @@ export default {
 </script>
 
 <style lang="scss" scope>
+.active {
+  color: $uni-color-primary;
+}
 .content {
   font-size: 30rpx;
   margin: 0 5%;
+
   .picker {
-    position: fixed;
-    top: 3%;
-    left: 16%;
-    color: #007aff;
+    display: flex;
+    justify-content: flex-start;
+    position: relative;
+    width: 100%;
+    margin: 20rpx 0;
+    .picker_self {
+      width: 100%;
+    }
     .picker_title {
-      width: 120rpx;
+      z-index: 99;
+      // width: 100%;
+      height: 100%;
       display: flex;
-      align-items: center;
-      justify-content: space-around;
-      .triangle-down {
-        width: 0;
-        height: 0;
-        border-top: 15rpx solid rgb(173, 173, 173);
-        border-left: 15rpx solid transparent;
-        border-right: 15rpx solid transparent;
-      }
-      .pickername {
-        font-size: 32rpx;
-        font-weight: 100;
-      }
+      justify-content: flex-start;
     }
   }
+  .picker::after {
+    content: "";
+    position: absolute;
+    left: 11%;
+    top: 20%;
+    width: 0;
+    height: 0;
+    border-top: 15rpx solid rgb(173, 173, 173);
+    border-left: 15rpx solid transparent;
+    border-right: 15rpx solid transparent;
+  }
   .supplyList {
-    margin-top: 15%;
     .supplyCard {
       display: flex;
       width: 92%;