|
|
@@ -51,7 +51,7 @@
|
|
|
<view class="notice-box">
|
|
|
<view class="notice-title-box">
|
|
|
<view class="notice-font">通知公告</view>
|
|
|
- <view class="notice-more-font">
|
|
|
+ <view class="notice-more-font" >
|
|
|
<view style="margin-right: 8rpx; font-size: 22rpx" @click="goNotice"
|
|
|
>更多</view
|
|
|
>
|
|
|
@@ -64,18 +64,23 @@
|
|
|
</view>
|
|
|
<view
|
|
|
class="notice-content-box"
|
|
|
+ style="justify-content: flex-start;"
|
|
|
v-for="(item, index) in noticeList"
|
|
|
:key="index"
|
|
|
@click="goNoticeDeatil(item.id)"
|
|
|
>
|
|
|
<image
|
|
|
- :src="item.url"
|
|
|
+ :src="imgUrl[item.type - 1]"
|
|
|
mode="aspectFit"
|
|
|
style="width: 34px; height: 34px"
|
|
|
></image>
|
|
|
<view class="notice-content display-around-column">
|
|
|
- <view class="notice-content-font">{{ item.title }}</view>
|
|
|
- <view class="notice-content-time">{{ item.time }}</view>
|
|
|
+ <view class="notice-content-font" style="margin-left:40rpx;">{{
|
|
|
+ titleList[item.type - 1] + item.title
|
|
|
+ }}</view>
|
|
|
+ <view class="notice-content-time" style="margin-left:40rpx;">{{
|
|
|
+ item.publish_time | globalTime
|
|
|
+ }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -98,7 +103,7 @@
|
|
|
</view>
|
|
|
<view
|
|
|
class="display-flex-start"
|
|
|
- style="overflow-x: scroll;overflow-y: hidden; position: relative"
|
|
|
+ style="overflow-x: scroll; overflow-y: hidden; position: relative"
|
|
|
>
|
|
|
<view
|
|
|
class="park-box"
|
|
|
@@ -323,22 +328,29 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
noticeList: [
|
|
|
- {
|
|
|
- url: "/static/navList/policy-icon.png",
|
|
|
- title: "政策速览 | 小微企业、个体工商户税费...",
|
|
|
- time: "2021-08-05",
|
|
|
- },
|
|
|
- {
|
|
|
- url: "/static/navList/activity-icon.png",
|
|
|
- title: "活动预告 | 想了解跨境电商?8月5日带...",
|
|
|
- time: "2021-08-04",
|
|
|
- },
|
|
|
- {
|
|
|
- url: "/static/navList/notice-icon.png",
|
|
|
- title: "通知公告 | 2022年首批次重点新材料扶...",
|
|
|
- time: "2021-08-03",
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // url: "/static/navList/policy-icon.png",
|
|
|
+ // title: "政策速览 | 小微企业、个体工商户税费...",
|
|
|
+ // time: "2021-08-05",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // url: "/static/navList/activity-icon.png",
|
|
|
+ // title: "活动预告 | 想了解跨境电商?8月5日带...",
|
|
|
+ // time: "2021-08-04",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // url: "/static/navList/notice-icon.png",
|
|
|
+ // title: "通知公告 | 2022年首批次重点新材料扶...",
|
|
|
+ // time: "2021-08-03",
|
|
|
+ // },
|
|
|
],
|
|
|
+ imgUrl: [
|
|
|
+ "/static/navList/activity-icon.png", //活动 1
|
|
|
+ "/static/navList/policy-icon.png", //政策 type2
|
|
|
+
|
|
|
+ "/static/navList/notice-icon.png", //通知 3
|
|
|
+ ],
|
|
|
+ titleList: ["活动预告 | ", "政策速览 | ", "通知公告 | "],
|
|
|
parkList: [
|
|
|
// {
|
|
|
// url:'/static/park/1.png',
|
|
|
@@ -404,6 +416,7 @@ export default {
|
|
|
onLoad() {
|
|
|
this.getSwiperList();
|
|
|
this.getPark();
|
|
|
+ this.getNotice()
|
|
|
// this.loginLoad();
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -477,13 +490,58 @@ export default {
|
|
|
data: {
|
|
|
order_by: "weight desc",
|
|
|
s_show: 1,
|
|
|
- page:1,
|
|
|
- page_size:5
|
|
|
+ page: 1,
|
|
|
+ page_size: 5,
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ res.data.data.list.forEach((item) => {
|
|
|
+ if (item.park_pics.length) {
|
|
|
+ item.park_pics[0].pic_path =
|
|
|
+ getApp().globalData.shareUrl + item.park_pics[0].pic_path;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.parkList = res.data.data.list;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ console.log("连接失败");
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getNotice() {
|
|
|
+ let md5Sign = md5(
|
|
|
+ "method=" +
|
|
|
+ "common" +
|
|
|
+ "×tamp=" +
|
|
|
+ getApp().globalData.globalTimestamp +
|
|
|
+ "&secret=" +
|
|
|
+ getApp().globalData.secret
|
|
|
+ );
|
|
|
+ let url =
|
|
|
+ getApp().globalData.shareUrl +
|
|
|
+ "api/api.php" +
|
|
|
+ "?method=common&source=notice&action=list×tamp=" +
|
|
|
+ getApp().globalData.globalTimestamp +
|
|
|
+ "&sign=" +
|
|
|
+ md5Sign;
|
|
|
+
|
|
|
+ uni.request({
|
|
|
+ url: url,
|
|
|
+ method: "POST",
|
|
|
+ header: {
|
|
|
+ "content-type": "application/x-www-form-urlencoded",
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ // order_by: "weight desc",
|
|
|
+ // s_show: 1,
|
|
|
+ // page: 1,
|
|
|
+ // page_size: 5,
|
|
|
},
|
|
|
success: (res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
- res.data.data.list.forEach((item)=>{if(item.park_pics.length){item.park_pics[0].pic_path = getApp().globalData.shareUrl + item.park_pics[0].pic_path}});
|
|
|
- this.parkList = res.data.data.list;
|
|
|
+ // console.log(res.data.data.list);
|
|
|
+ this.noticeList = res.data.data.list.slice(0, 3);
|
|
|
}
|
|
|
},
|
|
|
fail: () => {
|