123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <template>
- <view>
- <view class="align-items" style="margin-top: 80rpx;">
- <back></back>
- </view>
- <view v-for="(item,index) in list" :key="index">
- <view @click="gotopage(item)">
- <view class="type">
- <view class="justify-content">
- <view class="font-forty blue" >
- 类别:{{name}}
- </view>
- <view class="font-twenty-eight gray">
- {{item.time}}
- </view>
- </view>
- <view class="font-thirty-six black" style="margin: 30rpx 0;">
- {{item.house}}
- </view>
- <view class="font-thirty-six black" style="margin: 30rpx 0;">
- 备注:
- <text v-if="item.remark != null">
- {{item.remark}}
- </text>
- <text v-else>
- 无
- </text>
- </view>
- </view>
- </view>
- <view class="main-list-icon"></view>
- </view>
- </view>
- </template>
- <script>
- import service from '@/api/index.js'
- export default {
- data(){
- return {
- list:[],
- name:'',
- params: {
- pageNum: 1,
- pageSize: 10,
- },
- }
- },
- onLoad(e) {
- console.log('e',e)
- this.id = e.id;
- this.name = e.name;
- this.address = e.address;
- this.getListAll();
- },
- onReachBottom() {
- this.getNextListFn()
- },
- onPullDownRefresh() {
- this.getListAll();
- setTimeout(function () {
- uni.stopPullDownRefresh();
- }, 1000);
- },
- methods:{
- getListAll() {
- let that = this;
- let params ={
- serviceType: this.id,
- pageSize: 10,
- pageNum: 1,
- }
- service.getListAll(params).then(res => {
- this.list = res.records;
- that.total = res.total || 0;
- that.params.pageNum = res.current + 1;
- })
- },
- getNextListFn() {
- let that = this;
- let params ={
- serviceType: this.id,
- pageSize: this.params.pageSize,
- pageNum: this.params.pageNum,
- }
- if (this.list.length < this.total) {
- service.getListAll(params).then(response => {
- that.params.pageNum = response.current + 1
- response.records.forEach(item =>{
- that.list.push(item)
- })
- })
- }
- },
- gotopage(item){
- uni.navigateTo({
- url:`/pages/noLogin/Myphoto?id=${item.id}`,
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .type {
- margin: 20rpx;
- padding: 20rpx;
- background: #FFFFFF;
- box-shadow: 0rpx 8rpx 17rpx 0rpx rgba(0, 0, 0, 0.04);
- border-radius: 10rpx;
- }
- </style>
|