doum
4 天以前 87779aa2eb38f07e266ecb536e8ecd30c3b994b5
small-program/unpackage/dist/dev/mp-weixin/shop/pages/wallet/wallet.js
@@ -247,6 +247,7 @@
      countData: {},
      countDataList: {},
      hasNext: true,
      loading: false,
      show: false,
      show1: false,
      year: null,
@@ -302,8 +303,8 @@
        model: {
          startTime: this.startDate || this.defaultStartDate,
          endTime: this.endDate || this.defaultEndDate,
          type: this.active === 1 ? 0 : this.active === 2 ? 1 : '',
          objType: this.type === 1 ? 16 : this.type === 2 ? 17 : this.type === 3 ? 25 : this.type === 4 ? 1 : ''
          optType: this.active === 1 ? 1 : this.active === 2 ? -1 : '',
          type: this.type === 1 ? 0 : this.type === 2 ? 1 : this.type === 4 ? 2 : ''
        },
        page: this.currentPage
      }).then(function (res) {
@@ -325,8 +326,8 @@
      this.$u.api.shopSummary({
        startTime: this.startDate || this.defaultStartDate,
        endTime: this.endDate || this.defaultEndDate,
        type: this.active === 1 ? 0 : this.active === 2 ? 1 : '',
        objType: this.type === 1 ? 16 : this.type === 2 ? 17 : this.type === 3 ? 25 : this.type === 4 ? 1 : ''
        optType: this.active === 1 ? 1 : this.active === 2 ? -1 : '',
        type: this.type === 1 ? 0 : this.type === 2 ? 1 : this.type === 4 ? 2 : ''
      }).then(function (res) {
        if (res.code == 200) {
          _this2.countDataList = res.data;
@@ -343,23 +344,36 @@
      });
    },
    comfirmDate: function comfirmDate(flag) {
      var _this4 = this;
      if (flag) {
        if (new Date(this.tempEndDate + " 00:00:00").getTime() < new Date(this.tempStartDate + " 00:00:00").getTime()) {
        if (!this.tempStartDate || !this.tempEndDate) {
          return uni.showToast({
            title: '日期范围不正确',
            icon: 'error'
            title: '请选择开始和结束时间',
            icon: 'none'
          });
        }
        if (new Date(this.tempEndDate + " 00:00:00").getTime() <= new Date(this.tempStartDate + " 00:00:00").getTime()) {
          return uni.showToast({
            title: '开始时间必须小于截止时间',
            icon: 'none'
          });
        }
        this.startDate = this.tempStartDate;
        this.endDate = this.tempEndDate;
        this.show1 = false;
        setTimeout(function () {
          _this4.getFirstPageData();
        }, 300);
      } else {
        this.startDate = null;
        this.endDate = null;
        this.tempStartDate = this.defaultStartDate;
        this.tempEndDate = this.defaultEndDate;
        this.tempStartDate = null;
        this.tempEndDate = null;
        this.show1 = false;
        setTimeout(function () {
          _this4.getFirstPageData();
        }, 300);
      }
      this.getFirstPageData();
      this.show1 = false;
    },
    openShow: function openShow() {
      this.tempActive = this.active;
@@ -367,10 +381,10 @@
      this.show = true;
    },
    comfirm: function comfirm(flag) {
      var _this5 = this;
      if (flag) {
        this.active = this.tempActive;
        this.type = this.tempType;
        this.show = false;
        this.wordsWidth = 250;
        if (this.active === 0 && this.type === 0) {
          this.words = '全部';
@@ -382,10 +396,20 @@
          }
          this.words = t1 + t2;
        }
        this.getFirstPageData();
        this.show = false;
        setTimeout(function () {
          _this5.getFirstPageData();
        }, 300);
      } else {
        this.tempActive = 0;
        this.tempType = 0;
        this.active = 0;
        this.type = 0;
        this.words = '全部';
        this.show = false;
        setTimeout(function () {
          _this5.getFirstPageData();
        }, 300);
      }
    },
    formattedDateTime: function formattedDateTime(currentDate) {
@@ -418,6 +442,7 @@
    getFirstPageData: function getFirstPageData() {
      this.currentPage = 0;
      this.hasNext = true;
      this.loading = false;
      this.total = 0;
      this.dataList = [];
      this.getShopPage();