123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template>
- <!-- pages/fuwu/fuwu.wxml -->
- <view class="container">
- <!-- 问答类别 -->
- <view class="wendaFL" @tap="" v-for="(obj, index) in typeList" :key="index">
- <ul class="wendaFL">
- <li class="sanNong">
- <image :src="'http://127.0.0.1:8080'+obj.path" class="lbBj"></image>
- <h2>{{obj.type}}</h2>
- <span>1566</span>
- </li>
- </ul>
- </view>
- </view>
- </template>
- <script>
- import upload from '../../components/upload/index.vue'
- import {getTypeList} from '@/api/asking/asking.js'
- export default {
- components: {
- upload
- },
- data() {
- return {
- imageList:[
- '/profile/upload/2024/03/02/D5hjxYkldNxIef093ae65b2128b1293b86a7b537ed98_20240302170757A001.png',
- '/profile/upload/2024/03/02/D5hjxYkldNxIef093ae65b2128b1293b86a7b537ed98_20240302170757A001.png'
- ],
- typeList: [
- {
- type: null,
- path: null
- }
- ],
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 6,
- },
- };
- }
- /**
- * 生命周期函数--监听页面加载
- */,
- onLoad(options) {
- this.getTypeList();
- },
- methods: {
- //获取类型列表
- getTypeList(){
- getTypeList(this.queryParams).then(res =>{
- this.typeList = res.rows
- })
- },
- goSanNong() {
- uni.navigateTo({
- url: '/pages/sannong/sannong'
- });
- },
- goDetails() {
- uni.navigateTo({
- url: '/pages/wenbaxiangqing/wenbaxiangqing'
- });
- },
- updateImg(imgList){
- this.imageList = imgList;
- }
- }
- };
- </script>
- <style>
- @import './asking.css';
- </style>
|