record.js 601 Bytes
export default {
  data() {
    return {
      list: [],
      dateIndex: 0,
      pageNum: 1,
      total: 0,
      flag: true,
      nothing: false,
      pageSize: 18,
      total: 0,
    };
  },
  mounted() {},
  methods: {
    async getList(api, params) {
      try {
        uni.showLoading();
        const { list, total } = await uni.$api.boutiqueApi[api](params);
        uni.hideLoading();
        this.list = [...(params.pageNum == 1 ? [] : this.list), ...list];
        this.flag = true;
        this.total = total;
      } catch (error) {
        this.flag = true;
      }
    },
  },
};