12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <template>
- <view class="center">
- <view class="massage" v-for="(item, index) in list" :key="index"
- @click="nav('/pages/navigation/product?id=' + item.id)">
- <image class="list-prc" :src="item.image_input[0]" mode=""></image>
- <view class="info">
- <view class="title">{{ item.title }}</view>
- <view class="time">{{ item.add_time }}</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- article
- } from '@/api/user.js';
- export default {
- data() {
- return {
- list: [],
- type: ''
- };
- },
- onLoad(opt) {
- let obj = this;
- article({
- page: 1,
- limit: 1000
- }, 5).then(({
- data
- }) => {
- this.list = data;
- });
- },
- methods: {
- nav(url) {
- uni.navigateTo({
- url
- });
- }
- }
- };
- </script>
- <style lang="less">
- .center {
- background: #f3f3f3;
- }
- .massage {
- background: #ffffff;
- padding: 30rpx;
- border-bottom: 1px solid #e9e9e9;
- display: flex;
- align-items: center;
- .list-prc {
- width: 120rpx;
- height: 120rpx;
- }
- .info {
- margin-left: 10rpx;
- }
- .title {
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- }
- .time {
- margin-top: 18rpx;
- font-size: 20rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- }
- }
- </style>
|