110 lines
3.7 KiB
JavaScript
110 lines
3.7 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const api_api = require("../../api/api.js");
|
|
if (!Array) {
|
|
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
|
const _easycom_u_tag2 = common_vendor.resolveComponent("u-tag");
|
|
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
|
(_easycom_up_icon2 + _easycom_u_tag2 + _easycom_z_paging2)();
|
|
}
|
|
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
|
const _easycom_u_tag = () => "../../uni_modules/uview-plus/components/u-tag/u-tag.js";
|
|
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
|
if (!Math) {
|
|
(_easycom_up_icon + _easycom_u_tag + _easycom_z_paging)();
|
|
}
|
|
const _sfc_main = {
|
|
__name: "bankCard",
|
|
setup(__props) {
|
|
const paging = common_vendor.ref(null);
|
|
let dataList = common_vendor.ref([]);
|
|
let numiNDE = common_vendor.ref(1);
|
|
let type = common_vendor.ref("");
|
|
common_vendor.onShow(() => {
|
|
if (numiNDE.value != 1) {
|
|
paging.value.reload();
|
|
}
|
|
numiNDE.value++;
|
|
});
|
|
common_vendor.onLoad((options) => {
|
|
type.value = options.type;
|
|
});
|
|
let addBank = () => {
|
|
common_vendor.index.showActionSheet({
|
|
itemList: ["个人", "企业"],
|
|
success: (res) => {
|
|
if (res.tapIndex + 1 == 0) {
|
|
console.log("选中了第" + (res.tapIndex + 1) + "个按钮");
|
|
} else {
|
|
common_vendor.index.navigateTo({
|
|
url: `/pages/wallet/addBankCard?type=${res.tapIndex + 1}`
|
|
});
|
|
}
|
|
},
|
|
fail: function(res) {
|
|
console.log(res.errMsg);
|
|
}
|
|
});
|
|
};
|
|
const queryList = (pageNo, pageSize) => {
|
|
const params = {
|
|
current: pageNo,
|
|
pageSize
|
|
};
|
|
api_api.getUsersAccountInfo(params).then((res) => {
|
|
paging.value.complete(res);
|
|
}).catch((res) => {
|
|
paging.value.complete(false);
|
|
});
|
|
};
|
|
let bankSele = (e) => {
|
|
if (type.value) {
|
|
common_vendor.index.$emit("bank", e);
|
|
common_vendor.index.navigateBack();
|
|
}
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_vendor.p({
|
|
name: "plus",
|
|
color: "#333",
|
|
size: "28"
|
|
}),
|
|
b: common_vendor.o((...args) => common_vendor.unref(addBank) && common_vendor.unref(addBank)(...args)),
|
|
c: common_vendor.f(common_vendor.unref(dataList), (item, index, i0) => {
|
|
return common_vendor.e({
|
|
a: "49219fe6-2-" + i0 + ",49219fe6-0",
|
|
b: common_vendor.p({
|
|
text: item.type == 1 ? "个人" : "企业",
|
|
size: "mini",
|
|
type: item.type == 1 ? "success" : "error",
|
|
plain: true,
|
|
plainFill: true
|
|
}),
|
|
c: common_vendor.t(item.name),
|
|
d: common_vendor.t(item.phone || ""),
|
|
e: item.type == 2
|
|
}, item.type == 2 ? {
|
|
f: common_vendor.t(item.subbranchName)
|
|
} : {}, {
|
|
g: common_vendor.t(item.bankCard),
|
|
h: index,
|
|
i: common_vendor.o(($event) => common_vendor.unref(bankSele)(item))
|
|
});
|
|
}),
|
|
d: () => ({
|
|
r: paging,
|
|
k: "paging"
|
|
}),
|
|
e: common_vendor.o(queryList),
|
|
f: common_vendor.o(($event) => common_vendor.isRef(dataList) ? dataList.value = $event : dataList = $event),
|
|
g: common_vendor.p({
|
|
modelValue: common_vendor.unref(dataList)
|
|
})
|
|
};
|
|
};
|
|
}
|
|
};
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-49219fe6"]]);
|
|
my.createPage(MiniProgramPage);
|