|
|
@@ -1,6 +1,10 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
- <top-title :titleValue="title" :pageScroll="scrollVal" 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"
|
|
|
@@ -224,7 +228,9 @@
|
|
|
<view class="notice-title-box">
|
|
|
<view class="notice-font">区内活动</view>
|
|
|
<view class="notice-more-font">
|
|
|
- <view style="margin-right: 8rpx; font-size: 22rpx">更多</view>
|
|
|
+ <view style="margin-right: 8rpx; font-size: 22rpx" @click="goActive"
|
|
|
+ >更多</view
|
|
|
+ >
|
|
|
<image
|
|
|
src="/static/right-arrow-blue.png"
|
|
|
mode="aspectFill"
|
|
|
@@ -238,11 +244,16 @@
|
|
|
v-for="(item, index) in activityList"
|
|
|
:key="index"
|
|
|
style="justify-content: start; padding: 30rpx 0 30rpx 30rpx"
|
|
|
+ @click="goActiveDeatil(item.id)"
|
|
|
>
|
|
|
<image
|
|
|
:src="item.url"
|
|
|
- mode="aspectFit"
|
|
|
- style="width: 128rpx; height: 128rpx; margin-right: 20rpx"
|
|
|
+ style="
|
|
|
+ width: 112rpx;
|
|
|
+ height: 112rpx;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ border-radius: 10%;
|
|
|
+ "
|
|
|
></image>
|
|
|
<view class="notice-content" style="width: 70%">
|
|
|
<view class="notice-content-font" style="white-space: break-spaces">{{
|
|
|
@@ -279,17 +290,17 @@
|
|
|
|
|
|
<script>
|
|
|
import md5 from "@/common/md5.js";
|
|
|
-import topTitle from '@/components/top-title/top-title.vue';
|
|
|
-import footTabs from '@/components/foot-tabs/footTabs.vue';
|
|
|
+import topTitle from "@/components/top-title/top-title.vue";
|
|
|
+import footTabs from "@/components/foot-tabs/footTabs.vue";
|
|
|
export default {
|
|
|
- components: {
|
|
|
- 'foot-tabs': footTabs,
|
|
|
- 'top-title': topTitle
|
|
|
- },
|
|
|
+ components: {
|
|
|
+ "foot-tabs": footTabs,
|
|
|
+ "top-title": topTitle,
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
- title:"Air企通",
|
|
|
- scrollVal:Number,
|
|
|
+ title: "Air企通",
|
|
|
+ scrollVal: Number,
|
|
|
swiperList: [
|
|
|
{
|
|
|
img: "/static/swiper/swiper1.jpg",
|
|
|
@@ -394,24 +405,24 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
activityList: [
|
|
|
- {
|
|
|
- url: "/static/activity/2.png",
|
|
|
- title: "400场讲座,200门课程,免费送上门!就等你申请",
|
|
|
- isOnline: 1,
|
|
|
- department: "区人力资源局",
|
|
|
- time: "2021-09-05",
|
|
|
- browe: "322",
|
|
|
- share: "2",
|
|
|
- },
|
|
|
- {
|
|
|
- url: "/static/activity/1.png",
|
|
|
- title: "智能制造商标品牌培育系列培训活动",
|
|
|
- isOnline: 0,
|
|
|
- department: "市场监督管理局",
|
|
|
- time: "2021-09-05",
|
|
|
- browe: "322",
|
|
|
- share: "2",
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // url: "/static/activity/2.png",
|
|
|
+ // title: "400场讲座,200门课程,免费送上门!就等你申请",
|
|
|
+ // isOnline: 1,
|
|
|
+ // department: "区人力资源局",
|
|
|
+ // time: "2021-09-05",
|
|
|
+ // browe: "322",
|
|
|
+ // share: "2",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // url: "/static/activity/1.png",
|
|
|
+ // title: "智能制造商标品牌培育系列培训活动",
|
|
|
+ // isOnline: 0,
|
|
|
+ // department: "市场监督管理局",
|
|
|
+ // time: "2021-09-05",
|
|
|
+ // browe: "322",
|
|
|
+ // share: "2",
|
|
|
+ // },
|
|
|
],
|
|
|
};
|
|
|
},
|
|
|
@@ -422,7 +433,7 @@ export default {
|
|
|
this.getSwiperList();
|
|
|
this.getPark();
|
|
|
this.getNotice();
|
|
|
- console.log(getApp().global)
|
|
|
+ this.getActive();
|
|
|
//this.getAttract(); //招商接口
|
|
|
},
|
|
|
onShareAppMessage() {
|
|
|
@@ -630,6 +641,77 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
+ getActive() {
|
|
|
+ let md5Sign = md5(
|
|
|
+ "method=" +
|
|
|
+ "common" +
|
|
|
+ "×tamp=" +
|
|
|
+ getApp().globalData.globalTimestamp +
|
|
|
+ "&secret=" +
|
|
|
+ getApp().globalData.secret
|
|
|
+ );
|
|
|
+ let url =
|
|
|
+ getApp().globalData.shareUrl +
|
|
|
+ "api/api.php" +
|
|
|
+ "?method=common&source=activity&action=list×tamp=" +
|
|
|
+ getApp().globalData.globalTimestamp +
|
|
|
+ "&sign=" +
|
|
|
+ md5Sign;
|
|
|
+ let postData = {
|
|
|
+ page: 1,
|
|
|
+ page_size: 15,
|
|
|
+ };
|
|
|
+ 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.activityList = list.map((item) => {
|
|
|
+ /*
|
|
|
+ url: "/static/activity/2.png",
|
|
|
+ title: "智能制造商标品牌培育系列培训活动",
|
|
|
+ way: "市场监督管理局",
|
|
|
+ date: "2021-08-07",
|
|
|
+ read: 322,
|
|
|
+ share: 1,
|
|
|
+ type: 0, //0线下
|
|
|
+ */
|
|
|
+ let ob = {
|
|
|
+ url: "",
|
|
|
+ title: "",
|
|
|
+ department: "",
|
|
|
+ time: "",
|
|
|
+ browe: 0,
|
|
|
+ share: 0,
|
|
|
+ type: "",
|
|
|
+ id: "",
|
|
|
+ };
|
|
|
+ ob.url = getApp().globalData.shareUrl + item.pic_url;
|
|
|
+ ob.title = item.name;
|
|
|
+ ob.department = item.sponsor;
|
|
|
+ ob.time = this.$options.filters["globalTime"](item.start_time);
|
|
|
+ ob.browe =
|
|
|
+ parseInt(item.base_read_count) + parseInt(item.real_read_count);
|
|
|
+ ob.share =
|
|
|
+ parseInt(item.real_repost_count) +
|
|
|
+ parseInt(item.base_repost_count);
|
|
|
+ ob.isOnline = item.type == 1 ? 1 : 0;
|
|
|
+ ob.id = item.id;
|
|
|
+ return ob;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ console.log("连接失败");
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
goParkDetailFn(id) {
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/park/park_deatil?id=" + id,
|
|
|
@@ -645,6 +727,11 @@ export default {
|
|
|
url: "/pages/attract/attract_deatil?id=" + id,
|
|
|
});
|
|
|
},
|
|
|
+ goActiveDeatil(id) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages/activity/activity_deatil?id=" + id,
|
|
|
+ });
|
|
|
+ },
|
|
|
goAttract() {
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/attract/index",
|
|
|
@@ -655,9 +742,14 @@ export default {
|
|
|
url: "/pages/notice/index",
|
|
|
});
|
|
|
},
|
|
|
+ goActive() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages/activity/index",
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
onPageScroll(e) {
|
|
|
- this.scrollVal = e.scrollTop;
|
|
|
+ this.scrollVal = e.scrollTop;
|
|
|
},
|
|
|
};
|
|
|
</script>
|