50 lines
2.7 KiB
JavaScript
50 lines
2.7 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../../common/vendor.js");
|
|
const pages_me_model = require("../model.js");
|
|
require("../../../common/libraries/getPageConfig.js");
|
|
const common_libraries_day = require("../../../common/libraries/day.js");
|
|
require("../../../common/store/useWeAppAuthStore.js");
|
|
require("../../../gen/Apis.js");
|
|
require("../../../common/libraries/request.js");
|
|
require("../../../common/store/useWorkStore.js");
|
|
require("../../../common/libraries/setTabBar.js");
|
|
require("../../../common/libraries/apiLoading.js");
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
__name: "ContactButler",
|
|
setup(__props) {
|
|
const callPhone = () => {
|
|
var _a, _b, _c;
|
|
if (((_a = common_libraries_day.checkWorkStatus()) == null ? void 0 : _a.value) !== "Online") {
|
|
return common_vendor.index.showToast({
|
|
title: "当前物业不在线",
|
|
icon: "none"
|
|
});
|
|
}
|
|
if ((_b = pages_me_model.useModel.houseKeeperData.value) == null ? void 0 : _b.phone) {
|
|
common_vendor.index.makePhoneCall({
|
|
phoneNumber: ((_c = pages_me_model.useModel.houseKeeperData.value) == null ? void 0 : _c.phone) || ""
|
|
});
|
|
} else {
|
|
common_vendor.index.showToast({
|
|
title: "暂无联系电话",
|
|
icon: "none"
|
|
});
|
|
}
|
|
};
|
|
return (_ctx, _cache) => {
|
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
return common_vendor.e({
|
|
a: (_a = common_vendor.unref(pages_me_model.useModel).houseKeeperData.value) == null ? void 0 : _a.name
|
|
}, ((_b = common_vendor.unref(pages_me_model.useModel).houseKeeperData.value) == null ? void 0 : _b.name) ? {
|
|
b: ((_c = common_vendor.unref(pages_me_model.useModel).houseKeeperData.value) == null ? void 0 : _c.avatar) && ((_e = (_d = common_vendor.unref(pages_me_model.useModel).houseKeeperData.value) == null ? void 0 : _d.avatar[0]) == null ? void 0 : _e.url) || "https://pay-prod-1369486729.cos.ap-guangzhou.myqcloud.com/uploads/cs-test/01K7GYWP13PR4WWVKEB47EG1KA.png",
|
|
c: common_vendor.t(((_f = common_vendor.unref(pages_me_model.useModel).houseKeeperData.value) == null ? void 0 : _f.name) || "暂无"),
|
|
d: common_vendor.t((_g = common_vendor.unref(common_libraries_day.checkWorkStatus)()) == null ? void 0 : _g.status),
|
|
e: common_vendor.n(`status status_${(_h = common_vendor.unref(common_libraries_day.checkWorkStatus)()) == null ? void 0 : _h.value}`),
|
|
f: common_vendor.o(callPhone)
|
|
} : {});
|
|
};
|
|
}
|
|
});
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1485927b"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/pages/me/components/ContactButler.vue"]]);
|
|
wx.createComponent(Component);
|