50 lines
2.1 KiB
JavaScript
50 lines
2.1 KiB
JavaScript
|
|
"use strict";
|
||
|
|
const common_vendor = require("../../common/vendor.js");
|
||
|
|
const gen_Apis = require("../../gen/Apis.js");
|
||
|
|
const ME_payment_pre_stored_model = require("./model.js");
|
||
|
|
require("../../common/libraries/request.js");
|
||
|
|
require("../../common/store/useWeAppAuthStore.js");
|
||
|
|
require("../../common/store/useWorkStore.js");
|
||
|
|
const common_libraries_apiLoading = require("../../common/libraries/apiLoading.js");
|
||
|
|
const getList = () => {
|
||
|
|
var _a, _b;
|
||
|
|
common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.HouseOrder.HousePrepayments.List, (_b = (_a = ME_payment_pre_stored_model.useModel) == null ? void 0 : _a.formData) == null ? void 0 : _b.value).then((res) => {
|
||
|
|
var _a2, _b2, _c, _d, _e, _f;
|
||
|
|
ME_payment_pre_stored_model.useModel.nonPrepayableHouses.value = ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.nonPrepayableHouses) || [];
|
||
|
|
ME_payment_pre_stored_model.useModel.prepayableHouses.value = ((_b2 = res == null ? void 0 : res.data) == null ? void 0 : _b2.prepayableHouses) || [];
|
||
|
|
ME_payment_pre_stored_model.useModel.metaData.value = {
|
||
|
|
current_page: 1,
|
||
|
|
last_page: 1,
|
||
|
|
per_page: 10,
|
||
|
|
total: ((_d = (_c = res == null ? void 0 : res.data) == null ? void 0 : _c.prepayableHouses) == null ? void 0 : _d.length) || ((_f = (_e = res == null ? void 0 : res.data) == null ? void 0 : _e.nonPrepayableHouses) == null ? void 0 : _f.length) || 0
|
||
|
|
};
|
||
|
|
console.log(res);
|
||
|
|
});
|
||
|
|
};
|
||
|
|
const method = {
|
||
|
|
getList,
|
||
|
|
loadMore(page) {
|
||
|
|
ME_payment_pre_stored_model.useModel.formData.value.page = page;
|
||
|
|
this.getList();
|
||
|
|
},
|
||
|
|
handleClickHelp() {
|
||
|
|
common_vendor.index.showModal({
|
||
|
|
title: "提示",
|
||
|
|
content: "开启后,您物业费预缴低于 100 元时,会收到小程序订阅号提醒,更省心。",
|
||
|
|
showCancel: false,
|
||
|
|
confirmColor: "#0082FA",
|
||
|
|
success: function(res) {
|
||
|
|
if (res.confirm) {
|
||
|
|
console.log("用户点击确定");
|
||
|
|
} else if (res.cancel) {
|
||
|
|
console.log("用户点击取消");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
},
|
||
|
|
goToPage(url) {
|
||
|
|
common_vendor.index.navigateTo({ url });
|
||
|
|
}
|
||
|
|
};
|
||
|
|
exports.method = method;
|