adminthw 4 gadi atpakaļ
vecāks
revīzija
f78db615a9

+ 3 - 1
components/artical-deatil/index.vue

@@ -26,6 +26,7 @@
 </template>
 
 <script>
+import md5 from "@/common/md5.js";
 import FooterShare from "../footer-share/footer-share.vue";
 export default {
   props: {
@@ -54,6 +55,7 @@ export default {
   },
   methods: {
     sharePage() {
+		let that = this;
       uni.showShareMenu({
         title: this.model.title,
         path:
@@ -64,7 +66,7 @@ export default {
           "_detail?id=" +
           this.model.id,
         success(res) {
-          this.shareRequest();
+          that.shareRequest();
         },
       });
     },

+ 11 - 2
components/foot-tabs/footTabs.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="hover_content">
+  <div class="hover_content" v-show="isShow">
     <div class="hover_menu flex">
       <div
         class="menu_icon"
@@ -47,7 +47,16 @@
 </style>
 <script>
 export default {
-	props: ['selectedIndex'],
+	props:{
+		selectedIndex: {
+		  type: Number,
+		  default: 0,
+		},
+		isShow:{
+			type:Boolean,
+			default:true
+		}
+	},
 	data() {
     return {
       // selectedIndex: 0,

+ 45 - 22
pages/activity/index.vue

@@ -40,14 +40,14 @@
           <div class="right">
             <div class="right-title">{{ active.title }}</div>
             <div class="right-inf">
-              <div class="inf-type">
+              <div class="inf-type" style="width: 17%;">
                 <div
                   :class="{ color: active.type == 1 }"
                   class="originColor"
                 ></div>
                 <div>{{ active.type == 1 ? "线上" : "线下" }}</div>
               </div>
-              <div class="inf-way">
+              <div class="inf-way" style="width: 24%;">
                 {{ active.way }}
               </div>
               <div class="inf-date">
@@ -57,6 +57,9 @@
           </div>
         </div>
         <div class="readShare">
+		  <div v-show="active.status == '0'" class="active-tips-box wait-color">活动待开始</div>
+		  <div v-show="active.status == '1'" class="active-tips-box ing-color">活动进行中</div>
+		  <div v-show="active.status == '2'" class="active-tips-box end-color">活动已结束</div>
           <div class="read">浏览 {{ active.read }}</div>
           <div class="share">分享 {{ active.share }}</div>
         </div>
@@ -81,33 +84,33 @@ export default {
       pickerTypeArray: [
         {
           label: "全部",
-          value: 1,
+          value: 0,
         },
         {
           label: "线上",
-          value: 2,
+          value: 1,
         },
         {
           label: "线下",
-          value: 3,
+          value: 2,
         },
       ],
       pickerStateArray: [
         {
           label: "全部",
-          value: 1,
+          value: 3,
         },
         {
           label: "待开始",
-          value: 2,
+          value: 0,
         },
         {
           label: "已开始",
-          value: 3,
+          value: 1,
         },
         {
           label: "已结束",
-          value: 4,
+          value: 2,
         },
       ],
       activeList: [
@@ -138,7 +141,7 @@ export default {
   },
   methods: {
     bindPickerChange(e, op) {
-      console.log(e);
+      console.log(e.detail.value);
       switch (op) {
         case "type":
           this.indexType = e.detail.value;
@@ -219,19 +222,20 @@ export default {
                 read: 0,
                 share: 0,
                 type: "",
+				status:'',
                 id: "",
                 status: 0,
               };
               ob.url = getApp().globalData.shareUrl + item.pic_url;
               ob.title = item.name;
               ob.way = item.sponsor;
-              ob.date = this.$options.filters["globalTime"](item.start_time);
-              ob.read =
-                parseInt(item.base_read_count) + parseInt(item.real_read_count);
-              ob.share =
-                parseInt(item.real_repost_count) +
-                parseInt(item.base_repost_count);
+              let time = this.$options.filters["globalTime"](item.start_time);
+			  let timeSecond = this.$options.filters["globalTime"](item.end_time);
+			  ob.date = time + "至" + timeSecond;
+              ob.read = parseInt(item.base_read_count) + parseInt(item.real_read_count);
+              ob.share =parseInt(item.real_repost_count) +parseInt(item.base_repost_count);
               ob.type = item.type;
+			  ob.status = item.status; 
               ob.id = item.id;
               ob.status = item.status;
               return ob;
@@ -300,11 +304,11 @@ export default {
     display: flex;
     flex-direction: column;
     .actives-item {
-      height: 150rpx;
+      // height: 150rpx;
       box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
       border-radius: 32rpx;
       margin-top: 20px;
-      padding: 50rpx;
+      padding: 20rpx;
       display: flex;
       flex-direction: column;
       .active-content {
@@ -320,6 +324,7 @@ export default {
           }
         }
         .right {
+		  width: 80%;
           height: 120rpx;
           box-sizing: border-box;
           display: flex;
@@ -333,16 +338,17 @@ export default {
           }
           .right-inf {
             display: flex;
-            font-size: 22rpx;
+            font-size: 21rpx;
+			align-items: center;
             color: $uni-text-color-grey;
             .inf-type {
-              margin-right: 20rpx;
+              margin-right: 10rpx;
               display: flex;
               align-items: center;
               .originColor {
                 margin-right: 8rpx;
-                height: 25rpx;
-                width: 25rpx;
+                height: 20rpx;
+                width: 20rpx;
                 border-radius: 50%;
                 background-color: #ffcf86;
               }
@@ -359,6 +365,23 @@ export default {
         font-size: 20rpx;
         color: rgba(0, 0, 0, 0.3);
         margin-top: 20rpx;
+		align-items: center;
+		.active-tips-box {
+			font-size: 22rpx;
+			padding: 10rpx;
+			border-radius: 10rpx;
+			color: #fff;
+			margin-right: 50rpx;
+		}
+		.wait-color {
+			background-color: #AEE359;
+		}
+		.ing-color {
+			background-color: #00A8EA;
+		}
+		.end-color {
+			background-color: #d7d7d7;
+		}
         .read {
           margin-right: 60rpx;
         }

+ 15 - 32
pages/attract/index.vue

@@ -13,16 +13,14 @@
         @click="goAttractDeatil(item.id)"
       >
         <image
-          :src="item.url"
-          mode="aspectFit"
-          style="width: 112rpx; height: 112rpx; margin-right: 20rpx"
+          :src="item.pic_url"
+          mode="aspectFill"
+          style="width: 112rpx; height: 112rpx; margin-right: 20rpx;border-radius: 10rpx;"
         ></image>
-        <view class="notice-content">
+        <view class="notice-content" style="width: 75%">
           <view class="notice-content-font">{{ item.title }}</view>
-          <view class="attract-content">{{ item.subtitle }}</view>
-          <view class="notice-content-time" style="margin-top: 20rpx">{{
-            item.time
-          }}</view>
+          <view class="attract-content">{{ item.desc }}</view>
+          <view class="notice-content-time" style="margin-top: 20rpx">{{item.addtime | globalTime}}</view>
         </view>
       </view>
     </view>
@@ -76,8 +74,8 @@ export default {
         "&sign=" +
         md5Sign;
       let postData = {
-        page: 1,
-        page_size: 5,
+        // page: 1,
+        // page_size: 5,
       };
       uni.request({
         url: url,
@@ -87,28 +85,12 @@ export default {
         },
         data: postData,
         success: (res) => {
-          console.log(res);
-          if (res.data.code === 200) {
-            let list = res.data.data.list;
-            this.attractList = list.map((item) => {
-              /*
-                  title: "生产性服务业",
-                  subtitle: "生产性服务业是指为保持工业生产过程的连续性...",
-                  time: "2021-09-05",
-             */
-              let ob = {
-                url: "",
-                subtitle: "",
-                id: "",
-                title: "",
-              };
-              ob.url = item.pic_url;
-              ob.subtitle = item.desc;
-              ob.id = item.id;
-              ob.title = item.title;
-              return ob;
-            });
-          }
+		  if (res.data.code === 200) {
+			  res.data.data.list.forEach((item) => {
+				item.pic_url = getApp().globalData.shareUrl + item.pic_url;
+			  });
+			 this.attractList = res.data.data.list;
+		  }
         },
         fail: () => {
           console.log("连接失败");
@@ -145,6 +127,7 @@ export default {
       padding-left: 20rpx;
       width: 100%;
       justify-items: start;
+	  margin-bottom: 10rpx;
     }
     .notice-content-box {
       width: 100%;

+ 33 - 44
pages/index/index.vue

@@ -210,16 +210,14 @@
         @click="goAttractDeatil(item.id)"
       >
         <image
-          :src="item.url"
-          mode="aspectFit"
-          style="width: 112rpx; height: 112rpx; margin-right: 20rpx"
+          :src="item.pic_url"
+          mode="aspectFill"
+          style="width: 112rpx; height: 112rpx; margin-right: 20rpx;border-radius: 10rpx;"
         ></image>
-        <view class="notice-content">
+        <view class="notice-content" style="width: 75%">
           <view class="notice-content-font">{{ item.title }}</view>
-          <view class="attract-content">{{ item.subtitle }}</view>
-          <view class="notice-content-time" style="margin-top: 20rpx">{{
-            item.time
-          }}</view>
+          <view class="attract-content">{{ item.desc }}</view>
+          <view class="notice-content-time" style="margin-top: 20rpx">{{item.addtime | globalTime}}</view>
         </view>
       </view>
     </view>
@@ -284,7 +282,7 @@
         </view>
       </view>
     </view>
-    <foot-tabs :selectedIndex="0"></foot-tabs>
+    <foot-tabs :selectedIndex="0" :isShow="footFlag"></foot-tabs>
   </view>
 </template>
 
@@ -301,6 +299,7 @@ export default {
     return {
       title: "Air企通",
       scrollVal: Number,
+	  footFlag:true,
       swiperList: [
         {
           img: "/static/swiper/swiper1.jpg",
@@ -391,18 +390,18 @@ export default {
         // },
       ],
       attractList: [
-        {
-          url: "/static/attract/1.png",
-          title: "工业互联网",
-          subtitle: "工业互联网是全球工业系统与高级计算、分析、...",
-          time: "2021-09-05",
-        },
-        {
-          url: "/static/attract/2.png",
-          title: "生产性服务业",
-          subtitle: "生产性服务业是指为保持工业生产过程的连续性...",
-          time: "2021-09-05",
-        },
+        // {
+        //   url: "/static/attract/1.png",
+        //   title: "工业互联网",
+        //   subtitle: "工业互联网是全球工业系统与高级计算、分析、...",
+        //   time: "2021-09-05",
+        // },
+        // {
+        //   url: "/static/attract/2.png",
+        //   title: "生产性服务业",
+        //   subtitle: "生产性服务业是指为保持工业生产过程的连续性...",
+        //   time: "2021-09-05",
+        // },
       ],
       activityList: [
         // {
@@ -434,7 +433,7 @@ export default {
     this.getPark();
     this.getNotice();
     this.getActive();
-    //this.getAttract(); //招商接口
+    this.getAttract(); //招商接口
   },
   onShareAppMessage() {
     url: "/pages/index/index";
@@ -603,7 +602,7 @@ export default {
         md5Sign;
       let postData = {
         page: 1,
-        page_size: 5,
+        page_size: 2,
       };
       uni.request({
         url: url,
@@ -613,27 +612,11 @@ export default {
         },
         data: postData,
         success: (res) => {
-          console.log(res);
           if (res.data.code === 200) {
-            let list = res.data.data.list;
-            this.attractList = list.map((item) => {
-              /*
-                  title: "生产性服务业",
-                  subtitle: "生产性服务业是指为保持工业生产过程的连续性...",
-                  time: "2021-09-05",
-             */
-              let ob = {
-                url: "",
-                subtitle: "",
-                id: "",
-                title: "",
-              };
-              ob.url = item.pic_url;
-              ob.subtitle = item.desc;
-              ob.id = item.id;
-              ob.title = item.title;
-              return ob;
-            });
+			  res.data.data.list.forEach((item) => {
+			    item.pic_url = getApp().globalData.shareUrl + item.pic_url;
+			  });
+             this.attractList = res.data.data.list;
           }
         },
         fail: () => {
@@ -659,7 +642,7 @@ export default {
         md5Sign;
       let postData = {
         page: 1,
-        page_size: 15,
+        page_size:2,
       };
       uni.request({
         url: url,
@@ -750,6 +733,12 @@ export default {
   },
   onPageScroll(e) {
     this.scrollVal = e.scrollTop;
+	if(e.scrollTop < uni.getSystemInfoSync().windowHeight){
+		this.footFlag = true;
+	}
+  },
+  onReachBottom() {
+	  this.footFlag = false;
   },
 };
 </script>