完善余额功能

This commit is contained in:
2025-05-09 17:51:34 +08:00
parent 2a32bd6fe5
commit 9cd1e5eaca
23 changed files with 603 additions and 174 deletions

View File

@ -169,43 +169,14 @@ __webpack_require__.r(__webpack_exports__);
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var _mescrollMixins = _interopRequireDefault(__webpack_require__(/*! @/components/mescroll-uni/mescroll-mixins.js */ 181));
var _user = __webpack_require__(/*! @/api/user */ 34);
var _activity = __webpack_require__(/*! @/api/activity */ 748);
//
//
//
@ -272,19 +243,46 @@ exports.default = void 0;
//
//
var _default = {
mixins: [_mescrollMixins.default],
data: function data() {
return {
list: [{
tab: [{
name: '购买'
}, {
name: '兑换'
}],
current: 1
current: 1,
upOption: {
noMoreSize: 4,
empty: {
tip: '~ 空空如也 ~',
// 提示
btnText: ''
},
textNoMore: '没有更多了'
},
list: []
};
},
methods: {
change: function change(index) {
this.current = index;
},
// 初始化数据
upCallback: function upCallback(page) {
var _this = this;
(0, _activity.getCouponList)({
page: page.num,
current: this.current
}).then(function (res) {
var data = res.data;
_this.mescroll.endSuccess(data.length, data.totalPages);
//设置列表数据
if (page.num == 1) _this.list = []; //如果是第一页需手动制空列表
_this.list = _this.list.concat(data); //追加新数据
}).catch(function () {
_this.mescroll.endErr();
});
}
}
};