You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.2 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
require("../../store/index.js");
const api_index = require("../../api/index.js");
require("../../api/request.js");
require("../../config/index.js");
const _sfc_main = {
__name: "detail",
setup(__props) {
common_vendor.onLoad((e) => {
console.log(e);
a_info.value = JSON.parse(decodeURIComponent(e.info));
if (!e.id) {
common_vendor.index.showToast({
icon: "error",
title: "错误",
duration: 2e3
});
a_info.value = null;
return;
}
getDetail(e.id);
});
const a_info = common_vendor.ref(null);
async function getDetail(id) {
await api_index.API.getArticleDetail({ id });
}
return (_ctx, _cache) => {
var _a, _b;
return {
a: common_vendor.t((_a = a_info.value) == null ? void 0 : _a.title),
b: (_b = a_info.value) == null ? void 0 : _b.content
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-6ba0469a"], ["__file", "F:/项目2023/视力表/vision-record/pages/wikipedia/detail.vue"]]);
wx.createPage(MiniProgramPage);