完善余额功能
This commit is contained in:
12
unpackage/dist/dev/mp-alipay/pages/my/my.js
vendored
12
unpackage/dist/dev/mp-alipay/pages/my/my.js
vendored
@ -80,22 +80,22 @@ var components
|
||||
try {
|
||||
components = {
|
||||
uAvatar: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-avatar/u-avatar */ "components/uview-ui/components/u-avatar/u-avatar").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-avatar/u-avatar.vue */ 386))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-avatar/u-avatar */ "components/uview-ui/components/u-avatar/u-avatar").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-avatar/u-avatar.vue */ 403))
|
||||
},
|
||||
uIcon: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-icon/u-icon */ "components/uview-ui/components/u-icon/u-icon").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-icon/u-icon.vue */ 327))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-icon/u-icon */ "components/uview-ui/components/u-icon/u-icon").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-icon/u-icon.vue */ 344))
|
||||
},
|
||||
uImage: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-image/u-image */ "components/uview-ui/components/u-image/u-image").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-image/u-image.vue */ 348))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-image/u-image */ "components/uview-ui/components/u-image/u-image").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-image/u-image.vue */ 365))
|
||||
},
|
||||
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 */ 393))
|
||||
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 */ 410))
|
||||
},
|
||||
uGrid: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-grid/u-grid */ "components/uview-ui/components/u-grid/u-grid").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-grid/u-grid.vue */ 400))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-grid/u-grid */ "components/uview-ui/components/u-grid/u-grid").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-grid/u-grid.vue */ 417))
|
||||
},
|
||||
uGridItem: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-grid-item/u-grid-item */ "components/uview-ui/components/u-grid-item/u-grid-item").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-grid-item/u-grid-item.vue */ 407))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-grid-item/u-grid-item */ "components/uview-ui/components/u-grid-item/u-grid-item").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-grid-item/u-grid-item.vue */ 424))
|
||||
},
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
16
unpackage/dist/dev/mp-alipay/pages/my/profile.js
vendored
16
unpackage/dist/dev/mp-alipay/pages/my/profile.js
vendored
@ -101,28 +101,28 @@ var components
|
||||
try {
|
||||
components = {
|
||||
uAvatar: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-avatar/u-avatar */ "components/uview-ui/components/u-avatar/u-avatar").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-avatar/u-avatar.vue */ 386))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-avatar/u-avatar */ "components/uview-ui/components/u-avatar/u-avatar").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-avatar/u-avatar.vue */ 403))
|
||||
},
|
||||
uImage: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-image/u-image */ "components/uview-ui/components/u-image/u-image").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-image/u-image.vue */ 348))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-image/u-image */ "components/uview-ui/components/u-image/u-image").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-image/u-image.vue */ 365))
|
||||
},
|
||||
uButton: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-button/u-button */ "components/uview-ui/components/u-button/u-button").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-button/u-button.vue */ 334))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-button/u-button */ "components/uview-ui/components/u-button/u-button").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-button/u-button.vue */ 351))
|
||||
},
|
||||
uPopup: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-popup/u-popup */ "components/uview-ui/components/u-popup/u-popup").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-popup/u-popup.vue */ 505))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-popup/u-popup */ "components/uview-ui/components/u-popup/u-popup").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-popup/u-popup.vue */ 522))
|
||||
},
|
||||
uForm: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-form/u-form */ "components/uview-ui/components/u-form/u-form").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-form/u-form.vue */ 428))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-form/u-form */ "components/uview-ui/components/u-form/u-form").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-form/u-form.vue */ 445))
|
||||
},
|
||||
uFormItem: function () {
|
||||
return Promise.all(/*! import() | components/uview-ui/components/u-form-item/u-form-item */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/uview-ui/components/u-form-item/u-form-item")]).then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-form-item/u-form-item.vue */ 435))
|
||||
return Promise.all(/*! import() | components/uview-ui/components/u-form-item/u-form-item */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/uview-ui/components/u-form-item/u-form-item")]).then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-form-item/u-form-item.vue */ 452))
|
||||
},
|
||||
uInput: function () {
|
||||
return Promise.all(/*! import() | components/uview-ui/components/u-input/u-input */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/uview-ui/components/u-input/u-input")]).then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-input/u-input.vue */ 446))
|
||||
return Promise.all(/*! import() | components/uview-ui/components/u-input/u-input */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/uview-ui/components/u-input/u-input")]).then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-input/u-input.vue */ 463))
|
||||
},
|
||||
mobileLogin: function () {
|
||||
return __webpack_require__.e(/*! import() | components/mobile-login/mobile-login */ "components/mobile-login/mobile-login").then(__webpack_require__.bind(null, /*! @/components/mobile-login/mobile-login.vue */ 421))
|
||||
return __webpack_require__.e(/*! import() | components/mobile-login/mobile-login */ "components/mobile-login/mobile-login").then(__webpack_require__.bind(null, /*! @/components/mobile-login/mobile-login.vue */ 438))
|
||||
},
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
@ -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="956ba0ae-1" src="{{cloudPath+'img/icon_my_wallet.png'}}" width="56" height="56" onVueInit="__l"></u-image><text class="u-m-l-18 nr">充值</text></navigator></view><view><u-line vue-id="956ba0ae-2" color="#EEE" direction="col" length="60" onVueInit="__l"></u-line></view><view><navigator class="row" hover-class="none" url="/pages/recharge/balance"><u-image vue-id="956ba0ae-3" src="{{cloudPath+'img/icon_my_wallet_record.png'}}" width="56" height="56" onVueInit="__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"><block a:if="{{wallet.open_racharge==1}}"><view><navigator class="row" hover-class="none" url="/pages/recharge/balance"><u-image vue-id="956ba0ae-1" src="{{cloudPath+'img/icon_my_wallet.png'}}" width="56" height="56" onVueInit="__l"></u-image><text class="u-m-l-18 nr">充值</text></navigator></view></block><block a:if="{{wallet.open_racharge==1}}"><view><u-line vue-id="956ba0ae-2" color="#EEE" direction="col" length="60" onVueInit="__l"></u-line></view></block><view><navigator class="row" hover-class="none" url="/pages/recharge/record"><u-image vue-id="956ba0ae-3" src="{{cloudPath+'img/icon_my_wallet_record.png'}}" width="56" height="56" onVueInit="__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']]]]]}}" onRefresherrefresh="__e" onScrollToLower="__e"><view class="u-m-t-16"><view class="u-m-b-16" a:for="{{lists}}" a:for-item="item" a:for-index="index" a:key="index"><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></view><loading-footer vue-id="956ba0ae-4" status="{{loadingStatus}}" onVueInit="__l"></loading-footer></scroll-view></view></view></view>
|
||||
85
unpackage/dist/dev/mp-alipay/pages/my/wallet.js
vendored
85
unpackage/dist/dev/mp-alipay/pages/my/wallet.js
vendored
@ -101,10 +101,13 @@ var components
|
||||
try {
|
||||
components = {
|
||||
uImage: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-image/u-image */ "components/uview-ui/components/u-image/u-image").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-image/u-image.vue */ 348))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-image/u-image */ "components/uview-ui/components/u-image/u-image").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-image/u-image.vue */ 365))
|
||||
},
|
||||
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 */ 393))
|
||||
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 */ 410))
|
||||
},
|
||||
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 */ 550))
|
||||
},
|
||||
}
|
||||
} catch (e) {
|
||||
@ -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 */ 3);
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _mescrollMixins = _interopRequireDefault(__webpack_require__(/*! @/components/mescroll-uni/mescroll-mixins.js */ 177));
|
||||
var _user = __webpack_require__(/*! @/api/user */ 30);
|
||||
var _type = __webpack_require__(/*! @/utils/type */ 38);
|
||||
var _tools = __webpack_require__(/*! @/utils/tools */ 37);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -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;
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
"defaultTitle": "我的钱包",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user