12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <template>
- <view class="meeting-info-container">
- <view class="search-content">
- <u-search placeholder="请输入关键字" v-model="keyword" @custom="onSearch" @search="onSearch"></u-search>
- </view>
- <view class="u-page">
- <item-list :ds="indexList" :onItemClick="onContentClick" />
- </view>
- </view>
- </template>
- <script>
- import { fetchContentInfo } from '@/common/api';
- import ItemList from '@/components/ItemList/index.vue';
- import { getImageUrl } from '@/util';
- export default {
- components: {
- ItemList,
- },
- data() {
- return {
- keyword: '',
- indexList: [],
- };
- },
- onLoad() {
- this.loadmore();
- },
- methods: {
- onContentClick(item) {
- uni.navigateTo({
- url: `/pasb/pages/detail/index?id=${item.id}`,
- });
- },
- async loadmore(keyword = '') {
- const res = await fetchContentInfo({
- pageNum: 1,
- pageSize: 99,
- contentType: 3,
- title: keyword,
- });
- this.indexList = res.rows.map(item => {
- return {
- id: item.id,
- imgUrl: getImageUrl(item.thumbnail),
- title: item.title,
- date: item.createTime,
- };
- });
- },
- onSearch(val) {
- this.loadmore(val);
- },
- },
- onShareAppMessage() {
- return {
- title: 'First UI组件库',
- };
- },
- };
- </script>
- <style lang="scss" src="./index.scss">
- </style>
|