|
|
@@ -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,21 +64,21 @@
|
|
|
</view>
|
|
|
<view
|
|
|
class="notice-content-box"
|
|
|
- style="justify-content: flex-start;"
|
|
|
+ style="justify-content: flex-start"
|
|
|
v-for="(item, index) in noticeList"
|
|
|
:key="index"
|
|
|
@click="goNoticeDeatil(item.id)"
|
|
|
>
|
|
|
<image
|
|
|
- :src="imgUrl[item.type - 1]"
|
|
|
+ :src="item.icon"
|
|
|
mode="aspectFit"
|
|
|
style="width: 34px; height: 34px"
|
|
|
></image>
|
|
|
<view class="notice-content display-around-column">
|
|
|
- <view class="notice-content-font" style="margin-left:40rpx;">{{
|
|
|
- titleList[item.type - 1] + item.title
|
|
|
+ <view class="notice-content-font" style="margin-left: 40rpx">{{
|
|
|
+ item.title
|
|
|
}}</view>
|
|
|
- <view class="notice-content-time" style="margin-left:40rpx;">{{
|
|
|
+ <view class="notice-content-time" style="margin-left: 40rpx">{{
|
|
|
item.publish_time | globalTime
|
|
|
}}</view>
|
|
|
</view>
|
|
|
@@ -344,13 +344,6 @@ export default {
|
|
|
// 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',
|
|
|
@@ -416,7 +409,7 @@ export default {
|
|
|
onLoad() {
|
|
|
this.getSwiperList();
|
|
|
this.getPark();
|
|
|
- this.getNotice()
|
|
|
+ this.getNotice();
|
|
|
// this.loginLoad();
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -525,7 +518,7 @@ export default {
|
|
|
getApp().globalData.globalTimestamp +
|
|
|
"&sign=" +
|
|
|
md5Sign;
|
|
|
-
|
|
|
+
|
|
|
uni.request({
|
|
|
url: url,
|
|
|
method: "POST",
|
|
|
@@ -541,7 +534,23 @@ export default {
|
|
|
success: (res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
// console.log(res.data.data.list);
|
|
|
- this.noticeList = res.data.data.list.slice(0, 3);
|
|
|
+ this.noticeList = res.data.data.list.map((item) => {
|
|
|
+ switch (item.type) {
|
|
|
+ case "1":
|
|
|
+ item.icon = "/static/navList/activity-icon.png";
|
|
|
+ item.title = "活动预告 | " + item.title;
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ item.icon = "/static/navList/policy-icon.png";
|
|
|
+ item.title = "政策速览 | " + item.title;
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ item.icon = "/static/navList/notice-icon.png";
|
|
|
+ item.title = "通知公告 | " + item.title;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return item;
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
fail: () => {
|