Jing-Jiu 4 anni fa
parent
commit
3d53ea30d7

File diff suppressed because it is too large
+ 51 - 10
components/artical-deatil/index.vue


+ 39 - 0
components/top-title/top-title.vue

@@ -0,0 +1,39 @@
+<template>
+    <view class="title-box">
+	      {{titleValue}}
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: "title-top",
+  props: {
+    titleValue: {
+      type: String,
+      default: '空i企',
+    },
+  },
+  data() {
+    return {};
+  },
+  methods: {
+  },
+};
+</script>
+
+<style>
+.title-box {
+    width: 100%;
+    height: 80rpx;
+    background: transparent;
+    position: absolute;
+    top: 40rpx;
+    color: #fff;
+    letter-spacing: 6rpx;
+    z-index: 9999;
+    text-align: center;
+    line-height: 80rpx;
+	font-size: 28rpx;
+}
+</style>

+ 87 - 1
pages/attract/attract_deatil.vue

@@ -1,15 +1,101 @@
 <template>
   <view>
-    <artical-deatil></artical-deatil>
+    <artical-deatil :model="model" :field="'business'"></artical-deatil>
   </view>
 </template>
 
 <script>
+import md5 from "@/common/md5.js";
 import ArticalDeatil from "../../components/artical-deatil/index";
 export default {
   components: {
     ArticalDeatil,
   },
+  data() {
+    return {
+      model: {
+        title: "",
+        time: "",
+        artical: "",
+        id: "",
+      },
+    };
+  },
+  onLoad(op) {
+    this.model.id = op.id;
+    // this.model.id = 1;
+    this.getAttractDeatil();
+  },
+  methods: {
+    getAttractDeatil() {
+      let md5Sign = md5(
+        "method=" +
+          "common" +
+          "&timestamp=" +
+          getApp().globalData.globalTimestamp +
+          "&secret=" +
+          getApp().globalData.secret
+      );
+      let url =
+        getApp().globalData.shareUrl +
+        "api/api.php" +
+        "?method=common&source=business&action=info_by_id&timestamp=" +
+        getApp().globalData.globalTimestamp +
+        "&sign=" +
+        md5Sign;
+      let postData = {
+        id: this.model.id,
+      };
+      //获取文章
+      uni.request({
+        url: url,
+        method: "POST",
+        header: {
+          "content-type": "application/x-www-form-urlencoded",
+        },
+        data: postData,
+        success: (res) => {
+          // console.log(res);
+          if (res.data.code === 200) {
+            let data = res.data.data;
+            this.model.title = data.title;
+            let time = this.$options.filters["globalTime"](data.time);
+            let timeSecond = this.$options.filters["globalTimeSecond"](
+              data.time
+            );
+            this.model.time = time + " " + timeSecond;
+            this.getRich();
+          }
+        },
+        fail: () => {
+          console.log("连接失败");
+        },
+      });
+    },
+    getRich() {
+      uni.request({
+        url:
+          getApp().globalData.shareUrl +
+          `content/business/${Math.floor(this.model.id / 1000)}/${
+            this.model.id
+          }.html`,
+        method: "GET",
+        header: {
+          "content-type": "application/x-www-form-urlencoded",
+        },
+
+        success: (res) => {
+          console.log(res);
+          if (res.statusCode === 200) {
+            this.model.artical = res.data;
+          }
+        },
+        fail: () => {
+          console.log("连接失败");
+        },
+      });
+    },
+  },
 };
 </script>
 

+ 72 - 12
pages/attract/index.vue

@@ -30,31 +30,91 @@
 </template>
 
 <script>
+import md5 from "@/common/md5.js";
 export default {
   data() {
     return {
       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",
+        // },
       ],
     };
   },
+  onLoad() {
+    this.getAttract();
+  },
   methods: {
     goAttractDeatil(id) {
       uni.navigateTo({
         url: "/pages/attract/attract_deatil?id=" + id,
       });
     },
+    getAttract() {
+      let md5Sign = md5(
+        "method=" +
+          "common" +
+          "&timestamp=" +
+          getApp().globalData.globalTimestamp +
+          "&secret=" +
+          getApp().globalData.secret
+      );
+      let url =
+        getApp().globalData.shareUrl +
+        "api/api.php" +
+        "?method=common&source=business&action=list&timestamp=" +
+        getApp().globalData.globalTimestamp +
+        "&sign=" +
+        md5Sign;
+      let postData = {
+        page: 1,
+        page_size: 5,
+      };
+      uni.request({
+        url: url,
+        method: "POST",
+        header: {
+          "content-type": "application/x-www-form-urlencoded",
+        },
+        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;
+            });
+          }
+        },
+        fail: () => {
+          console.log("连接失败");
+        },
+      });
+    },
   },
 };
 </script>

+ 12 - 6
pages/auth/index.vue

@@ -24,15 +24,15 @@
 			return {
 				iv:'',
 				encryptedData:'',
-				isNeedPhone:Boolean,
-			    isAuth:Boolean
+				isNeedPhone:getApp().globalData.user_phone,
+			    isAuth:getApp().globalData.isAuth
 			}
 		},
 		onLoad() {
-			this.getUserInfo() 
+			this.getUserInfoData() 
 		},
 		methods:{
-			getUserInfo(){
+			getUserInfoData(){
 				let md5Sign = md5("method="+'user'+"&timestamp="+getApp().globalData.globalTimestamp+"&secret="+getApp().globalData.secret)
 				let url = getApp().globalData.shareUrl+'api/api.php'+'?method=user&action=info_by_openid&timestamp='+getApp().globalData.globalTimestamp +'&sign='+md5Sign
 				uni.request({
@@ -47,9 +47,13 @@
 					success: (res) => {
 						if(res.data.code === 200){
 								if(res.data.data.nickname){
+									getApp().globalData.isAuth = true;
+									getApp().globalData.user_phone = false;
 									this.isAuth = true;
 									this.isNeedPhone = false;
 								}else{
+									getApp().globalData.user_name = '';
+									getApp().globalData.isAuth = false;
 									this.isAuth = false;
 								}
 						}
@@ -116,8 +120,10 @@
 					success: (res) => {
 						console.log(res)
 						if(res.data.code === 200){
-							getApp().globalData.user_phone = res.data.phoneNumber;
-							that.refuseBtn();
+							getApp().globalData.user_phone = res.data.data;
+							setTimeout(()=>{
+								that.refuseBtn();
+							},300)
 						}
 					},
 					fail: () => {

+ 66 - 6
pages/index/index.vue

@@ -1,5 +1,6 @@
 <template>
   <view class="content">
+	<top-title :titleValue="title" style="width: 100%;"></top-title>  
     <view class="page-section-spacing" style="width: 100%; position: relative">
       <swiper
         class="swiper"
@@ -74,7 +75,7 @@
           mode="aspectFit"
           style="width: 34px; height: 34px"
         ></image>
-        <view class="notice-content display-around-column" style="width: 88%;">
+        <view class="notice-content display-around-column" style="width: 88%">
           <view class="notice-content-font" style="margin-left: 40rpx">{{
             item.title
           }}</view>
@@ -272,19 +273,22 @@
         </view>
       </view>
     </view>
-    <foot-tabs :selectedIndex='0'></foot-tabs>
+    <foot-tabs :selectedIndex="0"></foot-tabs>
   </view>
 </template>
 
 <script>
 import md5 from "@/common/md5.js";
+import topTitle from '@/components/top-title/top-title.vue';
 import footTabs from '@/components/foot-tabs/footTabs.vue';
 export default {
 	components: {
-		'foot-tabs': footTabs
+		'foot-tabs': footTabs,
+		'top-title': topTitle
 	},
   data() {
     return {
+	  title:"Air企通",
       swiperList: [
         {
           img: "/static/swiper/swiper1.jpg",
@@ -411,16 +415,16 @@ export default {
     };
   },
   onShow() {
-	  uni.hideTabBar({})
+    uni.hideTabBar({});
   },
   onLoad() {
     this.getSwiperList();
     this.getPark();
     this.getNotice();
-    //   this.loginLoad();
+    //this.getAttract(); //招商接口
   },
   onShareAppMessage() {
-  	url:'/pages/index/index'
+    url: "/pages/index/index";
   },
   methods: {
     swiperChange(e) {
@@ -568,6 +572,62 @@ export default {
         },
       });
     },
+    getAttract() {
+      let md5Sign = md5(
+        "method=" +
+          "common" +
+          "&timestamp=" +
+          getApp().globalData.globalTimestamp +
+          "&secret=" +
+          getApp().globalData.secret
+      );
+      let url =
+        getApp().globalData.shareUrl +
+        "api/api.php" +
+        "?method=common&source=business&action=list&timestamp=" +
+        getApp().globalData.globalTimestamp +
+        "&sign=" +
+        md5Sign;
+      let postData = {
+        page: 1,
+        page_size: 5,
+      };
+      uni.request({
+        url: url,
+        method: "POST",
+        header: {
+          "content-type": "application/x-www-form-urlencoded",
+        },
+        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;
+            });
+          }
+        },
+        fail: () => {
+          console.log("连接失败");
+        },
+      });
+    },
     goParkDetailFn(id) {
       uni.navigateTo({
         url: "/pages/park/park_deatil?id=" + id,

+ 12 - 3
pages/notice/index.vue

@@ -84,8 +84,11 @@ export default {
         "&sign=" +
         md5Sign;
       let postData = {
-        // s_title: this.input,
+        s_title: this.input,
       };
+      if (!this.input) {
+        postData = {};
+      }
       uni.request({
         url: url,
         method: "POST",
@@ -95,7 +98,7 @@ export default {
         data: postData,
         success: (res) => {
           if (res.data.code === 200) {
-            // console.log(res.data.data.list);
+            console.log(res.data.data.list);
             this.noticeList = res.data.data.list.map((item) => {
               switch (item.type) {
                 case "1":
@@ -137,6 +140,7 @@ export default {
     // justify-content: center;
     align-items: center;
     flex-direction: column;
+    width: 83%;
     .notice-content-box {
       width: 100%;
       display: flex;
@@ -146,6 +150,10 @@ export default {
       border-radius: 32rpx;
       margin-top: 20rpx;
       // justify-content: space-between;
+      image {
+        width: 34px;
+        height: 34px;
+      }
       .notice-content-font {
         margin-left: 40rpx;
         font-size: 26rpx;
@@ -155,7 +163,8 @@ export default {
         text-overflow: ellipsis;
         white-space: nowrap;
       }
-      .attract-content {
+      .notice-content {
+        // flex: 1;
         color: #697594;
         font-weight: 600;
         font-size: 20rpx;

+ 7 - 10
pages/notice/notice_deatil.vue

@@ -15,15 +15,15 @@ export default {
         way: "",
         time: "",
         artical: "",
+        id: "",
       },
-      id: "",
     };
   },
   components: {
     ArticalDeatil,
   },
   onLoad(op) {
-    this.id = op.id;
+    this.model.id = op.id;
     this.getNotice();
   },
   methods: {
@@ -44,7 +44,7 @@ export default {
         "&sign=" +
         md5Sign;
       let postData = {
-        id: this.id,
+        id: this.model.id,
       };
       //获取文章
       uni.request({
@@ -59,14 +59,12 @@ export default {
             let data = res.data.data;
             this.model.title = data.title;
             this.model.way = data.sponsor;
-            this.model.sponsor = data.sponsor
             let time = this.$options.filters["globalTime"](data.publish_time);
             let timeSecond = this.$options.filters["globalTimeSecond"](
               data.publish_time
             );
             this.model.time = time + " " + timeSecond;
             this.getRich();
- 
           }
         },
         fail: () => {
@@ -76,18 +74,17 @@ export default {
     },
     getRich() {
       uni.request({
-        url: `https://kiq.xazhima.com/content/notice/${Math.floor(
-          this.id / 1000
-        )}/${this.id}.html`,
+        url:
+          getApp().globalData.shareUrl +
+          `content/notice/${Math.floor(this.model.id / 1000)}/${this.model.id}.html`,
         method: "GET",
         header: {
           "content-type": "application/x-www-form-urlencoded",
         },
 
         success: (res) => {
-     
           if (res.statusCode === 200) {
-            this.model.artical = res.data
+            this.model.artical = res.data;
           }
         },
         fail: () => {

+ 3 - 3
pages/park/map_search.vue

@@ -1,6 +1,6 @@
 <template>
     <view style="height: 100%;">
-		<map style="width: 100%;height: 100%;" :scale="scale" :latitude="latitude" :longitude="longitude" :markers="covers" @markertap="markertap">
+		<map style="width: 100%;height: 100%;" :scale="scale" :latitude="latitude" :longitude="longitude" :markers="covers" @markertap="markertap" @callouttap="markertap">
 		</map>
 		<cover-view class="map-pop-box" v-show="isShowPop" @click="goParkDetail()">
 			<cover-view class="display-between">
@@ -149,8 +149,8 @@
 		height: 100%;
 	}
 	.map-pop-box {
-		width: 92%;
-		padding: 30rpx;
+		width: 90%;
+		padding: 40rpx;
 		background-color: #fff;
 		position: fixed;
 		bottom: 0;

+ 98 - 67
pages/policy/policy_deatil.vue

@@ -13,11 +13,7 @@
       </div>
     </div>
     <div class="video-box" v-if="infoObj.video_url">
-      <video
-        :src="infoObj.video_url"
-        id="myVideo"
-        controls="true"
-      ></video>
+      <video :src="infoObj.video_url" id="myVideo" controls="true"></video>
     </div>
     <!-- 企业研发投入补贴 -->
     <div class="card-input-content">
@@ -37,7 +33,15 @@
           </p>
           <p class="table-item">
             <span>申报状态:</span>
-            <span>剩5天</span>
+            <span>剩
+              {{
+                Math.floor(new Date(
+                  new Date(infoObj.project_end_date).getTime() -
+                    new Date().getTime()
+                ).getTime() /
+                  (1 * 24 * 60 * 60 * 1000)) + 1
+              }}
+              天</span>
           </p>
         </div>
       </div>
@@ -140,7 +144,7 @@
       <div class="item-list">
         <div class="term">
           <div class="term-value-group">
-            <p class="term-value-item">{{infoObj.contact}}</p>
+            <p class="term-value-item">{{ infoObj.contact }}</p>
           </div>
         </div>
       </div>
@@ -149,7 +153,7 @@
       <footer-share
         style="width: 100%"
         :isCollection="true"
-		:isCollectedIcon="infoObj.if_collect"
+        :isCollectedIcon="infoObj.if_collect"
         @collectionPages="collectionPage"
         @sharePages="sharePage"
       ></footer-share>
@@ -200,7 +204,14 @@ export default {
     let id = option.id;
     this.getDetailInfo(id);
   },
+  onShow() {
+  },
   methods: {
+	goAuthPage(){
+		uni.navigateTo({
+			url:'../auth/index'
+		})
+	},
     getDetailInfo(ids) {
       let md5Sign = md5(
         "method=" +
@@ -225,11 +236,14 @@ export default {
         },
         data: {
           id: ids,
-		  openId:getApp().globalData.open_id
+          openId: getApp().globalData.open_id,
         },
         success: (res) => {
           if (res.data.code === 200) {
-			if(res.data.data.video_url){ 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);
@@ -320,6 +334,10 @@ export default {
       });
     },
     collectionPage() {
+	if(!getApp().globalData.user_name){
+				this.goAuthPage();
+				return
+	   }
       let md5Sign = md5(
         "method=" +
           "user" +
@@ -342,21 +360,60 @@ export default {
           "content-type": "application/x-www-form-urlencoded",
         },
         data: {
-			 openId :getApp().globalData.open_id,
-			 source :'policy',
-			 source_name :'政策',
-			 source_id :this.infoObj.id,
-			 source_title :this.infoObj.title
+          openId: getApp().globalData.open_id,
+          source: "policy",
+          source_name: "政策",
+          source_id: this.infoObj.id,
+          source_title: this.infoObj.title,
         },
         success: (res) => {
           if (res.data.code === 200) {
-			  res.data.data ? this.infoObj.if_collect = true : this.infoObj.if_collect = false;
-			  this.$forceUpdate();
-			  uni.showToast({
-			  	duration:3000,
-				title:res.data.msg,
-				icon:'none'
-			  })
+            res.data.data
+              ? (this.infoObj.if_collect = true)
+              : (this.infoObj.if_collect = false);
+            this.$forceUpdate();
+            uni.showToast({
+              duration: 3000,
+              title: res.data.msg,
+              icon: "none",
+            });
+          }
+        },
+        fail: () => {
+          console.log("连接失败");
+        },
+      });
+    },
+    shareRequest() {
+      let md5Sign = md5(
+        "method=" +
+          "user" +
+          "&timestamp=" +
+          getApp().globalData.globalTimestamp +
+          "&secret=" +
+          getApp().globalData.secret
+      );
+      let url =
+        getApp().globalData.shareUrl +
+        "api/api.php" +
+        "?method=user&source=policy&action=repost&timestamp=" +
+        getApp().globalData.globalTimestamp +
+        "&sign=" +
+        md5Sign;
+      uni.request({
+        url: url,
+        method: "POST",
+        header: {
+          "content-type": "application/x-www-form-urlencoded",
+        },
+        data: {
+          openId: getApp().globalData.open_id,
+          source_id: this.infoObj.id,
+          source: "policy",
+        },
+        success: (res) => {
+          if (res.data.code === 200) {
+            console.log(res);
           }
         },
         fail: () => {
@@ -364,52 +421,26 @@ export default {
         },
       });
     },
-	shareRequest(){
-		let md5Sign = md5(
-		  "method=" +
-		    "user" +
-		    "&timestamp=" +
-		    getApp().globalData.globalTimestamp +
-		    "&secret=" +
-		    getApp().globalData.secret
-		);
-		let url =
-		  getApp().globalData.shareUrl +
-		  "api/api.php" +
-		  "?method=user&source=policy&action=repost&timestamp=" +
-		  getApp().globalData.globalTimestamp +
-		  "&sign=" +
-		  md5Sign;
-		uni.request({
-		  url: url,
-		  method: "POST",
-		  header: {
-		    "content-type": "application/x-www-form-urlencoded",
-		  },
-		  data: {
-				 openId :getApp().globalData.open_id,
-				 source_id :this.infoObj.id,
-				 source :'policy',
-		  },
-		  success: (res) => {
-		    if (res.data.code === 200) {
-				console.log(res)
-		    }
-		  },
-		  fail: () => {
-		    console.log("连接失败");
-		  },
-		});
-	},
     sharePage() {
-		let that = this;
-		  uni.showShareMenu({
-			title: that.infoObj.title,
-			path: "pages/policy/policy_detail?id="+that.infoObj.id,
-			success(res) {
-			  that.shareRequest();
-			},
-		});
+      let that = this;
+	  uni.showShareMenu({
+	    title: that.infoObj.title,
+	    path: "pages/policy/policy_detail?id=" + that.infoObj.id,
+	    success(res) {
+	      that.shareRequest();
+	    },
+	  });
+	  // if(!getApp().globalData.user_phone){
+	  // 			that.goAuthPage();
+	  // 		}else {
+			// 	// uni.showShareMenu({
+			// 	//   title: that.infoObj.title,
+			// 	//   path: "pages/policy/policy_detail?id=" + that.infoObj.id,
+			// 	//   success(res) {
+			// 	//     that.shareRequest();
+			// 	//   },
+			// 	// });
+			// }
     },
     changeScroll(height) {
       //点的时候触发这个函数 height 是之前的高度

+ 15 - 0
pages/selfCenter/collection.vue

@@ -89,7 +89,11 @@ export default {
     };
   },
   onLoad() {
+<<<<<<< HEAD
     this.getCollection();
+=======
+    // this.getCollection();
+>>>>>>> 6e0b786a98bea8e321f5aa2e2b0df0209b180b83
   },
   methods: {
     toDetail(index) {
@@ -102,7 +106,11 @@ export default {
         url: "/pages/policy/policy_deatil?id=" + id,
       });
     },
+<<<<<<< HEAD
     getCollection() {
+=======
+  /*   getCollection() {
+>>>>>>> 6e0b786a98bea8e321f5aa2e2b0df0209b180b83
       let md5Sign = md5(
         "method=" +
           "user" +
@@ -133,6 +141,7 @@ export default {
         success: (res) => {
           console.log(res);
           if (res.data.code === 200) {
+<<<<<<< HEAD
             let list = res.data.data.list;
             this.policyData = list.map((item) => {
               let ob = {
@@ -145,13 +154,19 @@ export default {
               ob.id = item.id;
               return ob;
             });
+=======
+>>>>>>> 6e0b786a98bea8e321f5aa2e2b0df0209b180b83
           }
         },
         fail: () => {
           console.log("连接失败");
         },
       });
+<<<<<<< HEAD
     },
+=======
+    }, */
+>>>>>>> 6e0b786a98bea8e321f5aa2e2b0df0209b180b83
   },
 };
 </script>

+ 6 - 3
pages/selfCenter/index.vue

@@ -1,5 +1,6 @@
 <template>
   <view class="content">
+	<top-title :titleValue="title" style="width: 100%;"></top-title>
     <div class="self-inf">
       <div class="img-name-box" v-if="isAuth">
         <image :src="userHeadImg" class="heade-img" mode="aspectFill"></image>
@@ -36,14 +37,16 @@
 
 <script>
 import md5 from "@/common/md5.js";
+import topTitle from '@/components/top-title/top-title.vue';
 import footTabs from '@/components/foot-tabs/footTabs.vue';
 export default {
 	components: {
-		'foot-tabs': footTabs
+		'foot-tabs': footTabs,
+		'top-title': topTitle
 	},
   data() {
     return {
-      message: "我的",
+      title: "个人中心",
       isAuth: true,
       userHeadImg: "",
       userNickName: "",
@@ -252,7 +255,7 @@ export default {
     border-radius: 0rpx 0rpx 100% 100%;
     .img-name-box {
       height: 150rpx;
-      margin-top: 70rpx;
+      margin-top: 110rpx;
       display: flex;
       align-items: center;
       .auth-btn {