更新
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
__name: "contact",
|
||||
setup(__props) {
|
||||
const { proxy } = common_vendor.getCurrentInstance();
|
||||
const data = common_vendor.ref({});
|
||||
const loading = common_vendor.ref(false);
|
||||
const type = common_vendor.ref("");
|
||||
common_vendor.onMounted(() => {
|
||||
loadCardList();
|
||||
});
|
||||
const loadCardList = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = pages[pages.length - 1];
|
||||
type.value = currentPage.options.type;
|
||||
const res = await proxy.apiUrl({
|
||||
url: "/api/index/policy",
|
||||
method: "GET",
|
||||
data: {
|
||||
type: type.value
|
||||
}
|
||||
});
|
||||
data.value = res.data;
|
||||
common_vendor.index.setNavigationBarTitle({
|
||||
title: res.data.title
|
||||
});
|
||||
} catch (err) {
|
||||
common_vendor.index.__f__("error", "at pages/Card/contact.vue:54", "加载就诊卡列表失败:", err);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.t(data.value.title),
|
||||
b: data.value.content
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9c9e5aa4"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Card/contact.js.map
|
||||
Reference in New Issue
Block a user