1234567891011121314151617181920212223242526272829303132333435363738 |
- <template>
- <view class="container">
- <navbar></navbar>
- <uni-list>
- <uni-list-item v-for="(item, index) in contentList" :key="index" :title="item.title" :note="item.describe" showArrow
- :thumb="`${baseurl}${item.thumbnail}`"
- thumb-size="lg" rightText="详情" />
- </uni-list>
- </view>
- </template>
- <script>
- import { mapActions, mapState } from 'vuex'
- export default {
- onLoad: function (option) { //option为object类型,会序列化上个页面传递的参数
- this.column = option.column;
- },
- computed: {
- ...mapState(['contentList'])
- },
- data() {
- return {
- column: '',
- baseurl: 'http://192.168.3.45:9002',
- }
- },
- async mounted() {
- await this.contentQuery({ column: this.column });
- },
- methods: {
- ...mapActions(['contentQuery'])
- }
- }
- </script>
- <style>
-
- </style>
|