|
@@ -5,7 +5,7 @@
|
|
|
</view>
|
|
|
|
|
|
<u-swiper :list="list" imgMode="aspectFill" :radius='0' :height="240" />
|
|
|
- <u-notice-bar :text="msg" :more-icon="false" color="#5af" bg-color="#d6e8f7"></u-notice-bar>
|
|
|
+ <u-notice-bar :text="msg" direction="column" :more-icon="false" color="#5af" bg-color="#d6e8f7"></u-notice-bar>
|
|
|
<view style="width: 100%; margin-top: 20rpx">
|
|
|
<u-grid
|
|
|
:border="false"
|
|
@@ -16,7 +16,7 @@
|
|
|
v-for="(baseListItem,baseListIndex) in baseList"
|
|
|
:key="baseListIndex"
|
|
|
>
|
|
|
- <view class="grid-item-icon" :style="{backgroundColor: baseListItem.bgColor}">
|
|
|
+ <view class="grid-item-icon" :style="[baseListItem.style]">
|
|
|
<image :src="baseListItem.icon"></image>
|
|
|
</view>
|
|
|
<text class="grid-text">{{ baseListItem.title }}</text>
|
|
@@ -43,6 +43,8 @@
|
|
|
import { fetchContentInfo } from '@/common/api';
|
|
|
import ItemList from '@/components/ItemList/index.vue';
|
|
|
import { getImageUrl } from '@/util';
|
|
|
+import { fetchMsgList, fetchViewCfgList } from '@/common/api';
|
|
|
+import { COMP_CODE } from '@/common/EnumConst';
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -52,52 +54,20 @@ export default {
|
|
|
return {
|
|
|
keyword: '',
|
|
|
list: [
|
|
|
- '/static/images/swiper/title.png',
|
|
|
],
|
|
|
- msg: '加快建设交通强国大会将于2024年8月在南京召开',
|
|
|
+ msg: [],
|
|
|
baseList: [
|
|
|
- {
|
|
|
- name: 'photo',
|
|
|
- icon: '/static/images/icons/meeting_info.svg',
|
|
|
- bgColor: '#6abff9',
|
|
|
- title: '大会介绍',
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'lock',
|
|
|
- icon: '/static/images/icons/meeting_apply.svg',
|
|
|
- bgColor: '#f1b06c',
|
|
|
- title: '会议报名',
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'star',
|
|
|
- icon: '/static/images/icons/meeting_point.svg',
|
|
|
- title: '会议指南',
|
|
|
- bgColor: '#ee794d',
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'star',
|
|
|
- icon: '/static/images/icons/meeting_doc.svg',
|
|
|
- title: '交流材料汇编',
|
|
|
- bgColor: '#e66b66',
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'star',
|
|
|
- icon: '/static/images/icons/meeting_traffic.svg',
|
|
|
- title: '交通指引',
|
|
|
- bgColor: '#82cf92',
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'star',
|
|
|
- icon: '/static/images/icons/meeting_contact.svg',
|
|
|
- title: '联系我们',
|
|
|
- bgColor: '#4a75f6',
|
|
|
- },
|
|
|
],
|
|
|
indexList: [],
|
|
|
+ styleObj: {
|
|
|
+ "backgroundColor": "#000"
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
|
+ this.loadMsg();
|
|
|
this.loadmore();
|
|
|
+ this.viewCfg();
|
|
|
},
|
|
|
methods: {
|
|
|
click() {
|
|
@@ -105,7 +75,7 @@ export default {
|
|
|
},
|
|
|
onContentClick(item) {
|
|
|
uni.navigateTo({
|
|
|
- url: `/pages/detail/index?id=${item.id}`,
|
|
|
+ url: `/pasb/pages/detail/index?id=${item.id}`,
|
|
|
});
|
|
|
},
|
|
|
async loadmore() {
|
|
@@ -122,9 +92,39 @@ export default {
|
|
|
};
|
|
|
});
|
|
|
},
|
|
|
+ async loadMsg() {
|
|
|
+ let result = [];
|
|
|
+ const res = await fetchMsgList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 99,
|
|
|
+ });
|
|
|
+ if (res.rows.length > 0) {
|
|
|
+ result = res.rows.map(item => item.msg);
|
|
|
+ }
|
|
|
+ this.msg = result;
|
|
|
+ },
|
|
|
+ async viewCfg() {
|
|
|
+ let result = [];
|
|
|
+ const res = await fetchViewCfgList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 99,
|
|
|
+ });
|
|
|
+ if (res.rows.length > 0) {
|
|
|
+ result = res.rows.map(item => item.msg);
|
|
|
+ const index_ctl = res.rows.filter((item) => item.compCode === COMP_CODE.index_ctl);
|
|
|
+ const index_swip = res.rows.filter((item) => item.compCode === COMP_CODE.index_swip);
|
|
|
+ this.list = index_swip.map(item => getImageUrl(item.iconUri));
|
|
|
+ this.baseList = index_ctl.map(item => {
|
|
|
+ return {
|
|
|
+ icon: getImageUrl(item.iconUri),
|
|
|
+ style: JSON.parse(item.style),
|
|
|
+ title: item.labelTxt,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
onSearch(val) {
|
|
|
- debugger
|
|
|
- uni.navigateTo({
|
|
|
+ uni.reLaunch({
|
|
|
url: `/pages/tabbar/news/index?keyword=${val}`,
|
|
|
});
|
|
|
},
|