Files
gxtyzx-uniapp/dist/dev/mp-weixin/package/article/index.js
T

90 lines
2.8 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const api_cms_article_index = require("../../api/cms/article/index.js");
const _sfc_main = {
data() {
return {
id: 0,
list: []
};
},
onLoad(e) {
const {
id
} = e;
api_cms_article_index.pageArticle({
categoryId: id
}).then((res) => {
if (res.count > 0) {
this.list = res.list;
const item = res.list[0];
common_vendor.index.setNavigationBarTitle({
title: item.categoryName
});
}
});
},
methods: {
openUrl(url) {
common_vendor.index.navigateTo({
url
});
}
}
};
if (!Array) {
const _easycom_uv_image2 = common_vendor.resolveComponent("uv-image");
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
const _easycom_uv_cell_group2 = common_vendor.resolveComponent("uv-cell-group");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
(_easycom_uv_image2 + _easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2)();
}
const _easycom_uv_image = () => "../../uni_modules/uv-image/components/uv-image/uv-image.js";
const _easycom_uv_cell = () => "../../uni_modules/uv-cell/components/uv-cell/uv-cell.js";
const _easycom_uv_cell_group = () => "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group.js";
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
if (!Math) {
(_easycom_uv_image + _easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.f($data.list, (item, index, i0) => {
return {
a: "3d2471db-3-" + i0 + "," + ("3d2471db-2-" + i0),
b: common_vendor.p({
src: item.image,
width: "80px",
height: "80px"
}),
c: common_vendor.o(($event) => $options.openUrl("/package/article/detail?id=" + item.articleId), index),
d: "3d2471db-2-" + i0 + "," + ("3d2471db-1-" + i0),
e: common_vendor.p({
title: `${item.title}`,
label: item.createTime,
cellStyle: {
padding: "8px"
},
border: false
}),
f: "3d2471db-1-" + i0 + "," + ("3d2471db-0-" + i0),
g: "3d2471db-0-" + i0,
h: index
};
}),
b: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff",
padding: "8px 0"
},
border: false
}),
c: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: 0
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/article/index.vue"]]);
wx.createPage(MiniProgramPage);