暂存code

This commit is contained in:
hejiangming
2025-05-07 09:54:33 +08:00
parent 78270eeda0
commit 007b002b81
403 changed files with 14507 additions and 6320 deletions
+84 -155
View File
@@ -1,188 +1,117 @@
"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 _sfc_main = {
components: {},
components: { Header },
data() {
return {
infoList: [
{
id: 1,
name: "余额"
},
{
id: 2,
name: "奖金"
},
{
id: 3,
name: "兑换券"
},
{
id: 4,
name: "HM"
},
{
id: 5,
name: "HMC"
},
{
id: 6,
name: "抽奖"
}
],
selInfo: 6,
orderList: [
{
id: 1,
type: 0,
// 0:消,1:收
name: "购物",
time: "01-01 14:10:10",
amount: 1e3,
typeName: "购物消费"
},
{
id: 2,
type: 1,
// 0:消,1:收
name: "卖出HM-到账",
time: "01-01 14:10:10",
amount: 1e3,
typeName: "收入到账"
},
{
id: 3,
type: 1,
// 0:消,1:收
name: "卖出HM-到账",
time: "01-01 14:10:10",
amount: 1e3,
typeName: "收入到账"
},
{
id: 4,
type: 1,
// 0:消,1:收
name: "卖出HM-到账",
time: "01-01 14:10:10",
amount: 1e3,
typeName: "收入到账"
},
{
id: 5,
type: 1,
// 0:消,1:收
name: "卖出HM-到账",
time: "01-01 14:10:10",
amount: 1e3,
typeName: "收入到账"
}
],
// 其他列表
prizeDrawList: [
{
id: 1,
name: "20元优惠券",
time: "01-01 14:10:10",
isGet: false,
// 未领取
isShowGet: true
},
{
id: 2,
name: "20元优惠券",
time: "01-01 14:10:10",
isGet: true,
// 已领取
isShowGet: true
},
{
id: 3,
name: "20元优惠券",
time: "01-01 14:10:10",
isGet: false,
// 已领取
isShowGet: false
}
]
// 抽奖列表
balanceLoading: false,
balanceList: []
};
},
onLoad() {
this.getAcctBalance();
},
methods: {
selectInfo(item) {
this.selInfo = item.id;
},
// 跳转到奖金
jumpBonus() {
getValue: utils_enumUtils.getValue,
formatDate: utils_index.formatDate,
handleAmount: utils_index.handleAmount,
// 跳转到详情
jumpBonus(item) {
common_vendor.index.navigateTo({
url: "/pages/mine_purse_bonus/mine_purse_bonus"
url: "/pages/mine_purse_log/mine_purse_log?category=" + item.categoty + "&lockId=" + item.lockId + "&curId=" + item.curId
});
},
// 查询余额
async getAcctBalance() {
this.balanceLoading = true;
const resp = await api_finance.getAcctBalance();
let data = [];
if (resp && resp.bizcode === 100) {
data = resp.data || [];
}
this.balanceList = data;
this.balanceLoading = false;
},
// 提现
jumpInfo(row, type) {
common_vendor.index.__f__("log", "at pages/mine_purse/mine_purse.vue:74", "row", row);
if (type === "withdraw") {
common_vendor.index.navigateTo({
url: "/pages/mine_purse_bonus_withdraw/mine_purse_bonus_withdraw?amount=" + row.curAmount + "&category=" + row.categoty
});
} else if (type === "recharge") {
common_vendor.index.navigateTo({
url: "/pages/mine_purse_recharge/mine_purse_recharge?amount=" + row.curAmount + "&category=" + row.categoty
});
} else if (type === "exchange") {
common_vendor.index.navigateTo({
url: "/pages/mine_purse_exchange/mine_purse_exchange?amount=" + row.curAmount + "&category=" + row.categoty
});
} else if (type === "transfer") {
common_vendor.index.__f__("log", "at pages/mine_purse/mine_purse.vue:88", "transfer转出...");
}
}
}
};
if (!Array) {
const _component_Header = common_vendor.resolveComponent("Header");
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
_easycom_up_image2();
(_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.o((...args) => $options.jumpBonus && $options.jumpBonus(...args)),
b: common_vendor.f($data.infoList, (item, k0, i0) => {
return common_vendor.e({
a: common_vendor.t(item.name),
b: $data.selInfo === item.id
}, $data.selInfo === item.id ? {} : {}, {
c: common_vendor.n($data.selInfo === item.id ? "info_title_item_warp info_title_item_sel_warp" : "info_title_item_warp"),
d: item.id,
e: common_vendor.o(($event) => $options.selectInfo(item), item.id)
});
return {
a: common_vendor.p({
leftTitle: _ctx.$t("purse.title"),
["left-path-type"]: "switchTab",
["left-path"]: "/pages/mine/mine"
}),
c: $data.selInfo === 6
}, $data.selInfo === 6 ? {
d: common_vendor.f($data.prizeDrawList, (item, k0, i0) => {
b: common_vendor.f($data.balanceList, (item, k0, i0) => {
return common_vendor.e({
a: "00f7ce42-0-" + i0,
a: "00f7ce42-1-" + i0,
b: common_vendor.t(item.name),
c: common_vendor.t(item.time),
d: item.isShowGet
}, item.isShowGet ? {
e: item.isGet
c: "00f7ce42-2-" + i0,
d: common_vendor.o(($event) => $options.jumpBonus(item), item.id),
e: common_vendor.t(item.curAmount || 0),
f: common_vendor.t(item.lockAmount || 0),
g: item.isRecharge || item.isWithdrawal || item.isTransfer || item.isExchange
}, item.isRecharge || item.isWithdrawal || item.isTransfer || item.isExchange ? common_vendor.e({
h: item.isRecharge
}, item.isRecharge ? {
i: common_vendor.o(($event) => $options.jumpInfo(item, "recharge"), item.id)
} : {}, {
f: item.isShowGet
}, item.isShowGet ? {
g: !item.isGet
j: item.isWithdrawal
}, item.isWithdrawal ? {
k: common_vendor.o(($event) => $options.jumpInfo(item, "withdraw"), item.id)
} : {}, {
h: item.id
l: item.isExchange
}, item.isExchange ? {
m: common_vendor.o(($event) => $options.jumpInfo(item, "exchange"), item.id)
} : {}) : {}, {
n: item.id
});
}),
e: common_vendor.p({
src: "/static/mine/purse_sf.png",
width: "40",
height: "40",
c: common_vendor.p({
src: "/static/mine/purse_amount.png",
width: "16",
height: "16",
bgColor: "#f1f6ff00"
}),
d: common_vendor.p({
src: "/static/common/right_b.png",
width: "16",
height: "16",
bgColor: "#f1f6ff00"
})
} : {
f: common_vendor.f($data.orderList, (item, k0, i0) => {
return {
a: "00f7ce42-1-" + i0,
b: common_vendor.p({
src: item.type === 1 ? "/static/mine/purse_sf.png" : "/static/mine/purse_xf.png",
width: "40",
height: "40",
bgColor: "#f1f6ff00"
}),
c: common_vendor.t(item.name),
d: common_vendor.t(item.time),
e: common_vendor.t(item.type === 1 ? "+" : "-"),
f: common_vendor.t(item.amount),
g: common_vendor.t(item.typeName),
h: item.id
};
})
});
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-00f7ce42"]]);
wx.createPage(MiniProgramPage);