1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <template>
- <!-- pages/fuwu/fuwu.wxml -->
- <view class="contain">
- <!-- 问答类别 -->
- <ul class="wendaFL" v-for="(e,idx) in typeList" :key="idx" style="width: 48%;">
- <li class="sanNong" style="width: 100%;">
- <image :src="loadImgSrcLocalhost(e.path)" class="lbBj" @tap="goSanNong"></image>
- <h2>{{obj.type}}</h2>
- <span>1566</span>
- </li>
- </ul>
- </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/demo/sannong/sannong'
- });
- },
- goDetails() {
- uni.navigateTo({
- url: '/pages/demo/wenbaxiangqing/wenbaxiangqing'
- });
- },
- updateImg(imgList){
- this.imageList = imgList;
- }
- }
- };
- </script>
- <style scoped>
- @import './asking.css';
- .contain {
- height: 100%;
- display: flex;
- justify-content: space-between;
- padding: 0rpx 20rpx;
- box-sizing: border-box;
- flex-wrap: wrap;
- }
- </style>
|