完善充值记录

This commit is contained in:
2025-05-08 17:00:42 +08:00
parent cbf23a8a06
commit c02e0c67ea
92 changed files with 585 additions and 125 deletions

View File

@ -106,6 +106,9 @@ try {
uLine: function () {
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-line/u-line */ "components/uview-ui/components/u-line/u-line").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-line/u-line.vue */ 401))
},
loadingFooter: function () {
return __webpack_require__.e(/*! import() | components/loading-footer/loading-footer */ "components/loading-footer/loading-footer").then(__webpack_require__.bind(null, /*! @/components/loading-footer/loading-footer.vue */ 606))
},
}
} catch (e) {
if (
@ -158,8 +161,20 @@ __webpack_require__.r(__webpack_exports__);
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/Hbuilder/Project/jianbing/pages/my/wallet.vue?vue&type=script&lang=js& ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/***/ (function(module, exports, __webpack_require__) {
"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 _type = __webpack_require__(/*! @/utils/type */ 42);
var _tools = __webpack_require__(/*! @/utils/tools */ 41);
//
//
//
@ -209,16 +224,60 @@ __webpack_require__.r(__webpack_exports__);
//
//
//
//
//
//
//
//
//
//
//
//
//
var _default = {
mixins: [_mescrollMixins.default],
data: function data() {
return {
wallet: {},
page: 1,
loadingStatus: _type.loadingType.LOADING,
lists: [],
isRefreshing: false // 控制刷新状态
};
},
onLoad: function onLoad() {
this.getWalletFun();
this.upCallback();
},
methods: {
refreshCallback: function refreshCallback() {
this.isRefreshing = true;
this.page = 1;
this.lists = [];
this.loadingStatus = _type.loadingType.LOADING;
this.upCallback();
},
// 初始化数据
upCallback: function upCallback() {
var _this = this;
var lists = this.lists,
loadingStatus = this.loadingStatus,
page = this.page;
(0, _tools.loadingFun)(_user.getAccountLog, page, lists, loadingStatus, {
source: 1,
type: 0
}).then(function (res) {
if (res) {
setTimeout(function () {
_this.isRefreshing = false;
}, 500);
_this.page = res.page;
_this.lists = res.dataList;
_this.loadingStatus = res.status;
}
});
},
// 获取钱包数据
getWalletFun: function getWalletFun() {
var _this2 = this;
(0, _user.getWallet)().then(function (res) {
_this2.wallet = res.data;
console.log("wallet>>>", _this2.wallet);
});
}
}
};
exports.default = _default;
/***/ }),

View File

@ -2,6 +2,7 @@
"navigationBarTitleText": "我的钱包",
"usingComponents": {
"u-image": "/components/uview-ui/components/u-image/u-image",
"u-line": "/components/uview-ui/components/u-line/u-line"
"u-line": "/components/uview-ui/components/u-line/u-line",
"loading-footer": "/components/loading-footer/loading-footer"
}
}

View File

@ -1 +1 @@
<view class="wallet"><view class="bg"></view><view class="block"><view class="bg-white balance u-m-l-16 u-m-r-16 br24 column-center"><view>账户余额(元)</view><view class="u-m-t-14 bold-600 xxl">¥ 0.00</view></view><view class="bg-white wallet-btn u-m-t-24 u-m-l-16 u-m-r-16 row-between br24"><view><navigator class="row" hover-class="none" url="/pages/recharge/balance"><u-image vue-id="9557a05a-1" src="{{cloudPath+'img/icon_my_wallet.png'}}" width="56" height="56" bind:__l="__l"></u-image><text class="u-m-l-18 nr">充值</text></navigator></view><view><u-line vue-id="9557a05a-2" color="#EEE" direction="col" length="60" bind:__l="__l"></u-line></view><view><navigator class="row" hover-class="none" url="/pages/recharge/balance"><u-image vue-id="9557a05a-3" src="{{cloudPath+'img/icon_my_wallet_record.png'}}" width="56" height="56" bind:__l="__l"></u-image><text class="u-m-l-18 nr">充值记录</text></navigator></view></view><view class="list bg-white br16 u-p-32"><view class="lg">钱包明细</view><view class="u-m-t-16"><view class="u-m-b-16"><view class="nr row-between"><view>消费</view><view class="deduct">-2000</view></view><view class="date xs u-m-t-16">2022-12-24 16:32:44</view></view><view class="u-m-b-16"><view class="nr row-between"><view>消费</view><view class="deduct">-2000</view></view><view class="date xs u-m-t-16">2022-12-24 16:32:44</view></view><view class="u-m-b-16"><view class="nr row-between"><view>消费</view><view class="deduct">-2000</view></view><view class="date xs u-m-t-16">2022-12-24 16:32:44</view></view></view></view></view></view>
<view class="wallet"><view class="bg"></view><view class="block"><view class="bg-white balance u-m-l-16 u-m-r-16 br24 column-center"><view>账户余额(元)</view><view class="u-m-t-14 bold-600 xxl">{{"¥ "+wallet.user_money}}</view></view><view class="bg-white wallet-btn u-m-t-24 u-m-l-16 u-m-r-16 row-between br24"><view><navigator class="row" hover-class="none" url="/pages/recharge/balance"><u-image vue-id="9557a05a-1" src="{{cloudPath+'img/icon_my_wallet.png'}}" width="56" height="56" bind:__l="__l"></u-image><text class="u-m-l-18 nr">充值</text></navigator></view><view><u-line vue-id="9557a05a-2" color="#EEE" direction="col" length="60" bind:__l="__l"></u-line></view><view><navigator class="row" hover-class="none" url="/pages/recharge/balance"><u-image vue-id="9557a05a-3" src="{{cloudPath+'img/icon_my_wallet_record.png'}}" width="56" height="56" bind:__l="__l"></u-image><text class="u-m-l-18 nr">充值记录</text></navigator></view></view><view class="list bg-white br16 u-p-32" style="height:962rpx;"><view class="lg">钱包明细</view><scroll-view style="height:880rpx;" scroll-y="true" refresher-enabled="{{true}}" refresher-triggered="{{isRefreshing}}" data-event-opts="{{[['refresherrefresh',[['refreshCallback',['$event']]]],['scrolltolower',[['upCallback',['$event']]]]]}}" bindrefresherrefresh="__e" bindscrolltolower="__e"><view class="u-m-t-16"><block wx:for="{{lists}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="u-m-b-16"><view class="nr row-between"><view>{{item.source_type}}</view><view class="deduct">{{item.change_amount}}</view></view><view class="date xs u-m-t-16">{{item.change_amount}}</view></view></block></view><loading-footer vue-id="9557a05a-4" status="{{loadingStatus}}" bind:__l="__l"></loading-footer></scroll-view></view></view></view>