暂存code
This commit is contained in:
+84
-155
@@ -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);
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的钱包",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"navigationBarTextStyle": "black",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "default",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="purse_warp data-v-00f7ce42"><view class="purse_collect data-v-00f7ce42"><view class="collect_item collect_item_but data-v-00f7ce42"><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">余额(元)</view><view class="collect_value data-v-00f7ce42">100.00</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42" bindtap="{{a}}"><view class="collect_title data-v-00f7ce42">奖金(元)</view><view class="collect_value data-v-00f7ce42">200.21</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">兑换券</view><view class="collect_value data-v-00f7ce42">10</view></view></view><view class="collect_item data-v-00f7ce42"><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">HM(锁仓)</view><view class="collect_value data-v-00f7ce42">100.00</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42"> HM(可交易)</view><view class="collect_value data-v-00f7ce42">200.21</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">HMC</view><view class="collect_value data-v-00f7ce42">10</view></view></view></view><view class="info_warp data-v-00f7ce42"><view class="info_title_warp data-v-00f7ce42"><view wx:for="{{b}}" wx:for-item="item" wx:key="d" class="{{['data-v-00f7ce42', item.c]}}" bindtap="{{item.e}}"><text class="data-v-00f7ce42">{{item.a}}</text><view wx:if="{{item.b}}" class="info_title_item_sel_but_warp data-v-00f7ce42"></view></view></view><view wx:if="{{c}}" class="prize_draw_warp data-v-00f7ce42"><view wx:for="{{d}}" wx:for-item="item" wx:key="h" class="prize_draw_item data-v-00f7ce42"><view class="prize_draw_left_warp data-v-00f7ce42"><up-image wx:if="{{e}}" class="data-v-00f7ce42" u-i="{{item.a}}" bind:__l="__l" u-p="{{e}}"></up-image><view class="data-v-00f7ce42" style="margin-left:20rpx"><view class="title_ data-v-00f7ce42">{{item.b}}</view><view class="time_ data-v-00f7ce42">{{item.c}}</view></view></view><view wx:if="{{item.d}}" class="prize_draw_right_warp data-v-00f7ce42" hidden="{{!item.e}}">去领取</view><view wx:if="{{item.f}}" class="prize_draw_right_warp yes_ data-v-00f7ce42" hidden="{{!item.g}}">已领取</view></view></view><view wx:else class="info_list_warp data-v-00f7ce42"><view wx:for="{{f}}" wx:for-item="item" wx:key="h" class="purse_info_item data-v-00f7ce42"><view class="purse_info_left data-v-00f7ce42"><up-image wx:if="{{item.b}}" class="data-v-00f7ce42" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view class="purse_data_warp data-v-00f7ce42"><view class="purse_info_name data-v-00f7ce42">{{item.c}}</view><view class="purse_info_value data-v-00f7ce42">{{item.d}}</view></view></view><view class="ipurse_nfo_right data-v-00f7ce42"><view class="purse_info_title data-v-00f7ce42">{{item.e}} {{item.f}}</view><view class="purse_info_value data-v-00f7ce42">{{item.g}}</view></view></view></view></view></view>
|
||||
<view class="purse_warp data-v-00f7ce42"><header wx:if="{{a}}" class="data-v-00f7ce42" u-i="00f7ce42-0" bind:__l="__l" u-p="{{a}}"/><view class="purse_content_warp data-v-00f7ce42"><view wx:for="{{b}}" wx:for-item="item" wx:key="n" class="purse_warp_item data-v-00f7ce42"><view class="purse_item_top data-v-00f7ce42"><view class="amount_warp data-v-00f7ce42"><view class="name_ data-v-00f7ce42" bindtap="{{item.d}}"><view class="data-v-00f7ce42" style="margin-top:10rpx"><up-image wx:if="{{c}}" class="data-v-00f7ce42" u-i="{{item.a}}" bind:__l="__l" u-p="{{c}}"></up-image></view><view class="msg_ data-v-00f7ce42">{{item.b}}</view><view class="data-v-00f7ce42" style="margin-top:10rpx"><up-image wx:if="{{d}}" class="data-v-00f7ce42" u-i="{{item.c}}" bind:__l="__l" u-p="{{d}}"></up-image></view></view><view class="data-v-00f7ce42"><view class="cur_amount data-v-00f7ce42">{{item.e}}</view><view class="lock_amount data-v-00f7ce42">不可用余额:{{item.f}}</view></view></view><view wx:if="{{item.g}}" class="operate_warp data-v-00f7ce42"><view wx:if="{{item.h}}" bindtap="{{item.i}}" class="operate_item operate_item1 data-v-00f7ce42">充值</view><view wx:if="{{item.j}}" bindtap="{{item.k}}" class="operate_item operate_item2 data-v-00f7ce42">提现</view><view wx:if="{{item.l}}" bindtap="{{item.m}}" class="operate_item operate_item2 data-v-00f7ce42">兑换</view></view></view></view></view></view>
|
||||
+63
-94
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user