32 lines
1.6 KiB
JavaScript
32 lines
1.6 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const CUSTOMER_house_list_model = require("./model.js");
|
|
const gen_Apis = require("../../gen/Apis.js");
|
|
const common_libraries_apiLoading = require("../../common/libraries/apiLoading.js");
|
|
const common_libraries_userUserLogin = require("../../common/libraries/userUserLogin.js");
|
|
const method = {
|
|
getList() {
|
|
var _a, _b;
|
|
common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Customer.CustomerHouses.List, (_b = (_a = CUSTOMER_house_list_model.useModel) == null ? void 0 : _a.formData) == null ? void 0 : _b.value).then((res) => {
|
|
CUSTOMER_house_list_model.useModel.showData.value = res == null ? void 0 : res.data;
|
|
if (!(res == null ? void 0 : res.data)) {
|
|
common_vendor.index.reLaunch({
|
|
url: "/CUSTOMER/bind_house/index"
|
|
});
|
|
} else {
|
|
CUSTOMER_house_list_model.useModel.loading.value = true;
|
|
}
|
|
console.log(res);
|
|
});
|
|
},
|
|
handleBindHouse() {
|
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
if ((_a = common_libraries_userUserLogin.getUser) == null ? void 0 : _a.toPageLogin())
|
|
return;
|
|
common_vendor.index.navigateTo({
|
|
url: `/CUSTOMER/bind_house/index?phone=${(_e = (_d = (_c = (_b = CUSTOMER_house_list_model.useModel) == null ? void 0 : _b.showData) == null ? void 0 : _c.value) == null ? void 0 : _d.customer) == null ? void 0 : _e.customer_phone}&name=${(_i = (_h = (_g = (_f = CUSTOMER_house_list_model.useModel) == null ? void 0 : _f.showData) == null ? void 0 : _g.value) == null ? void 0 : _h.customer) == null ? void 0 : _i.customer_name}`
|
|
});
|
|
}
|
|
};
|
|
exports.method = method;
|