添加新文件

This commit is contained in:
hejiangming
2025-05-07 10:09:55 +08:00
parent 007b002b81
commit 7e7a096151
776 changed files with 92603 additions and 0 deletions
@@ -0,0 +1,182 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_finance = require("../../api/finance.js");
const utils_enumUtils = require("../../utils/enumUtils.js");
const utils_index = require("../../utils/index.js");
const Header = () => "../../components/header.js";
const winningRecord = () => "../../components/winning_record.js";
const _sfc_main = {
computed: {
BALANCE_TYPE() {
return utils_enumUtils.BALANCE_TYPE;
}
},
components: { winningRecord, Header },
data() {
return {
infoList: [
{
name: "活期账户",
key: "cur"
},
{
name: "锁定账户",
key: "lock"
}
],
selInfo: "cur",
form: {
id: 0,
page: 1,
pageSize: 15,
category: null
},
orderList: [],
lockId: 0,
curId: 0
};
},
onLoad(option) {
const category = option.category;
if (category && category !== 0) {
this.form.category = category;
}
const lockId = option.lockId;
const curId = option.curId;
if (lockId && lockId !== "null") {
this.lockId = lockId;
this.selectInfo(this.infoList[1]);
}
if (curId && curId !== "null") {
this.curId = curId;
this.selectInfo(this.infoList[0]);
}
},
methods: {
getValue: utils_enumUtils.getValue,
formatDate: utils_index.formatDate,
handleAmount: utils_index.handleAmount,
selectInfo(item) {
this.orderList = [];
this.form.page = 1;
this.selInfo = item.key;
let id = 0;
if (item.key === "cur") {
id = this.curId;
}
if (item.key === "lock") {
id = this.lockId;
}
this.form.id = id;
this.loadData();
},
// 加载数据的方法
async loadData() {
if (this.loading)
return;
this.loading = true;
try {
const newData = await this.fetchData(this.form.page, this.form.pageSize);
this.orderList = [...this.orderList, ...newData];
this.form.page++;
} catch (error) {
common_vendor.index.__f__("error", "at pages/mine_purse_log/mine_purse_log.vue:135", "加载数据失败:", error);
} finally {
this.loading = false;
}
},
// 模拟获取数据的方法,实际应用中应该替换为你的数据获取逻辑,例如从服务器获取数据
async fetchData(page, pageSize) {
if (!this.form.id || this.form.id === 0) {
return [];
}
const params = {
id: this.form.id,
category: this.form.category,
page,
pageSize
};
common_vendor.index.__f__("log", "at pages/mine_purse_log/mine_purse_log.vue:151", "params", params);
const resp = await api_finance.getAcctFlow(params);
common_vendor.index.__f__("log", "at pages/mine_purse_log/mine_purse_log.vue:153", "resp", resp);
if (resp && resp.bizcode === 100) {
const data = resp.data && resp.data.entitys || [];
return data;
} else {
return [];
}
},
// 当滚动到底部时触发的方法
loadMore(selInfo) {
let id = 0;
if (selInfo === "cur") {
id = this.curId;
}
if (selInfo === "lock") {
id = this.lockId;
}
this.form.id = id;
this.loadData();
}
}
};
if (!Array) {
const _component_Header = common_vendor.resolveComponent("Header");
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
(_component_Header + _easycom_up_image2)();
}
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
if (!Math) {
_easycom_up_image();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.p({
leftTitle: _ctx.$t("mine.purse.mine_purse_log.title"),
["left-path-type"]: "navigateTo",
["left-path"]: "/pages/mine_purse/mine_purse"
}),
b: common_vendor.f($data.infoList, (item, k0, i0) => {
return common_vendor.e({
a: common_vendor.t(item.name),
b: $data.selInfo === item.key
}, $data.selInfo === item.key ? {} : {}, {
c: common_vendor.n($data.selInfo === item.key ? "info_title_item_warp info_title_item_sel_warp" : "info_title_item_warp"),
d: item.key,
e: common_vendor.o(($event) => $options.selectInfo(item), item.key)
});
}),
c: $data.orderList && $data.orderList.length !== 0
}, $data.orderList && $data.orderList.length !== 0 ? {
d: common_vendor.f($data.orderList, (item, k0, i0) => {
return {
a: "dd837133-1-" + i0,
b: common_vendor.t($options.getValue($options.BALANCE_TYPE, item.type)),
c: common_vendor.t($options.formatDate(item.ctdate)),
d: common_vendor.t($options.handleAmount(item.amount)),
e: common_vendor.t(item.remark),
f: item.id
};
}),
e: common_vendor.p({
src: "/static/mine/purse_sf.png",
width: "40",
height: "40",
bgColor: "#f1f6ff00"
})
} : {
f: common_vendor.p({
src: "/static/common/not_order.png",
width: "80",
height: "80",
bgColor: "#f1f6ff00"
})
}, {
g: _ctx.loading
}, _ctx.loading ? {} : {}, {
h: common_vendor.o(($event) => $options.loadMore($data.selInfo))
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-dd837133"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine_purse_log/mine_purse_log.js.map
@@ -0,0 +1,7 @@
{
"navigationStyle": "custom",
"usingComponents": {
"header": "../../components/header",
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image"
}
}
@@ -0,0 +1 @@
<view class="purse_log_warp data-v-dd837133"><header wx:if="{{a}}" class="data-v-dd837133" u-i="dd837133-0" bind:__l="__l" u-p="{{a}}"/><view class="info_warp data-v-dd837133"><view class="info_title_warp data-v-dd837133"><view wx:for="{{b}}" wx:for-item="item" wx:key="d" class="{{['data-v-dd837133', item.c]}}" bindtap="{{item.e}}"><text class="data-v-dd837133">{{item.a}}</text><view wx:if="{{item.b}}" class="info_title_item_sel_but_warp data-v-dd837133"></view></view></view><view class="info_list_warp data-v-dd837133"><scroll-view class="data-v-dd837133" scroll-y="true" bindscrolltolower="{{h}}" style="height:calc(100vh - 308rpx)"><block wx:if="{{c}}"><view wx:for="{{d}}" wx:for-item="item" wx:key="f" class="purse_info_item data-v-dd837133"><view class="purse_info_left data-v-dd837133"><up-image wx:if="{{e}}" class="data-v-dd837133" u-i="{{item.a}}" bind:__l="__l" u-p="{{e}}"></up-image><view class="purse_data_warp data-v-dd837133"><view class="purse_info_name data-v-dd837133">{{item.b}}</view><view class="purse_info_value data-v-dd837133">{{item.c}}</view></view></view><view class="ipurse_nfo_right data-v-dd837133"><view class="purse_info_title data-v-dd837133">{{item.d}}</view><view class="purse_info_value data-v-dd837133">{{item.e}}</view></view></view></block><view wx:else class="not_order_warp data-v-dd837133"><up-image wx:if="{{f}}" class="data-v-dd837133" u-i="dd837133-2" bind:__l="__l" u-p="{{f}}"></up-image><view class="not_order_msg_warp data-v-dd837133">暂无记录~</view></view><view wx:if="{{g}}" class="data-v-dd837133" style="text-align:center">加载中...</view></scroll-view></view></view></view>
@@ -0,0 +1,54 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/* uni.scss */
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
.purse_log_warp.data-v-dd837133 {
height: calc(100vh - 58rpx);
padding: 30rpx;
overflow-y: hidden;
}
.purse_log_warp .info_title_warp.data-v-dd837133 {
display: flex;
padding-left: 10rpx;
}
.purse_log_warp .info_title_item_warp.data-v-dd837133 {
margin-right: 40rpx;
font-weight: 500;
font-size: 28rpx;
color: #666666;
}
.purse_log_warp .info_title_item_sel_warp.data-v-dd837133 {
font-weight: bold;
font-size: 32rpx;
color: #000000;
}
.purse_log_warp .info_title_item_sel_but_warp.data-v-dd837133 {
background: #FF7C41;
border-radius: 4rpx;
width: 80rpx;
height: 8rpx;
margin-left: 18rpx;
}
.purse_log_warp .info_list_warp.data-v-dd837133 {
margin-top: 30rpx;
}