import{a as t}from"./shop.tuYmzXry.js";import{B as s}from"./index-CZsuXyof.js";const o={data(){const{userinfo:t}=s().state;return{userId:t?{userId:t.userId}:{},listProperty:{params:{pageSize:10,pageNum:1,navigation:1},list:[],total:void 0,status:"more"}}},methods:{async getData(s,o,i=!1){if(uni.showLoading({title:"加载中"}),this.listProperty.total===this.listProperty.list.length)return uni.hideLoading(),uni.stopPullDownRefresh(),uni.showToast({title:"没有更多数据",icon:"none"});console.log("=== params额外参数========================="),console.log({...this.listProperty.params,...o,...this.userId}),console.log("=name===================="),console.log(s);try{const e=await t[s.api][s.fn]({...this.listProperty.params,...o,...this.userId});if(console.log("=== async getData============="),console.log(e),console.log("===================================="),e.data){const{rows:t,total:s}=e;this.listProperty.list=i?t:this.listProperty.list.concat(t),this.listProperty.total=s,this.listProperty.status=this.listProperty.total===this.listProperty.list.length?"noMore":"more"}if(e.rows){const{data:t,total:s}=e;this.listProperty.list=t,this.listProperty.total=s}}catch(e){console.log(e)}finally{uni.hideLoading(),uni.stopPullDownRefresh()}}}};export{o as a};