123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <template>
- <view>
- <view class="page">
- <view class="list u-flex" v-for="(item,index) in list" :key="item.id" @click="todetails(item.id)">
- <view class="u-flex">
- <image style="width: 84rpx;height: 84rpx;border-radius: 50%;margin-right: 20rpx;" :src="item.user.avatar" mode=""></image>
- <view class="">
- <view class="u-flex font u-row-between" style="width: 520rpx;">
- <view class="">
- <text class="left">{{item.user.name}}</text>
- <text class="center">{{item.user.job_text}}</text>
- </view>
- <text class="right">{{item.updatetime_text}}</text>
- </view>
- <text class="bottom">{{item.user.company_text}}</text>
- </view>
- </view>
- </view>
- <view style="height: 70vh;justify-content: center;" class="u-flex" v-if="list.length == 0">
- <u-empty text="暂无数据" mode="list"></u-empty>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- browse_get_list
- } from "@/units/inquire.js"
- export default {
- data() {
- return {
- page: 1,
- list: [],
- total:0
- }
- },
- onLoad() {
- this.slist()
- },
- onReachBottom() {
- if(this.list.length != this.total){
- this.page++
- this.slist()
- }
- },
- methods: {
- slist() {
- browse_get_list({
- page: this.page
- }).then(res => {
- this.total = res.data.total
- if(this.page == 1){
- this.list = res.data.data
- }else{
- this.list = this.list.concat(res.data.data)
- }
- })
- },
- todetails(id) {
- uni.navigateTo({
- url: "/pagesB/details?id=" + id
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .page {
- background-color: #f3f3f3;
- padding:0 24rpx;
- height: calc(100vh );
- border:2rpx solid transparent;
-
- .list {
- background: #FFFFFF;
- border-radius: 16rpx;
- padding:24rpx 32rpx;
- height: 148rpx;
- box-sizing: border-box;
- margin-top: 20rpx;
- }
- .font{
- height: 44rpx;
-
- .left{
- font-size: 32rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #222222;
- }
- .center{
- margin-left: 20rpx;
- font-size: 20rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #777777;
- }
- .right{
- font-size: 20rpx;
- font-family: SFPro-Regular, SFPro;
- font-weight: 400;
- color: #777777;
- }
- }
- .bottom{
- margin-top: 20rpx;
- font-size: 20rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #555555;
- }
- }
- </style>
|