gree_leran/unpackage/dist/dev/mp-weixin/pages/index/index.js

105 lines
3.5 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
const _easycom_up_swiper2 = common_vendor.resolveComponent("up-swiper");
const _easycom_up_grid_item2 = common_vendor.resolveComponent("up-grid-item");
const _easycom_up_grid2 = common_vendor.resolveComponent("up-grid");
const _easycom_up_text2 = common_vendor.resolveComponent("up-text");
const _easycom_CaseList2 = common_vendor.resolveComponent("CaseList");
const _easycom_MenTab2 = common_vendor.resolveComponent("MenTab");
(_easycom_up_swiper2 + _easycom_up_grid_item2 + _easycom_up_grid2 + _easycom_up_text2 + _easycom_CaseList2 + _easycom_MenTab2)();
}
const _easycom_up_swiper = () => "../../node-modules/uview-plus/components/u-swiper/u-swiper.js";
const _easycom_up_grid_item = () => "../../node-modules/uview-plus/components/u-grid-item/u-grid-item.js";
const _easycom_up_grid = () => "../../node-modules/uview-plus/components/u-grid/u-grid.js";
const _easycom_up_text = () => "../../node-modules/uview-plus/components/u-text/u-text.js";
const _easycom_CaseList = () => "../../components/CaseList/CaseList.js";
const _easycom_MenTab = () => "../../components/MenTab/MenTab.js";
if (!Math) {
(_easycom_up_swiper + _easycom_up_grid_item + _easycom_up_grid + _easycom_up_text + _easycom_CaseList + _easycom_MenTab)();
}
const _sfc_main = {
__name: "index",
setup(__props) {
const app = getApp();
const caseList = common_vendor.ref(null);
common_vendor.ref(app.globalData.utils);
const swipe = common_vendor.reactive([
"/static/stu.png"
]);
const toTop = () => {
common_vendor.index.pageScrollTo({
scrollTop: 0,
duration: 300
});
};
const baseList = common_vendor.ref([
{
src: "/static/icon/video.png",
title: "视频",
url: "/pages/video/video"
},
{
src: "/static/icon/talk.png",
title: "讨论",
url: "/pages/discuss/discuss"
},
{
src: "/static/icon/score.png",
title: "积分",
url: "/pages/intergral/intergral"
},
{
src: "/static/icon/me.png",
title: "我的",
url: "/pages/user/user"
}
]);
function NavicatToBaseItems(item) {
common_vendor.index.navigateTo({
url: item.url,
fail: () => {
common_vendor.index.switchTab({
url: item.url,
fail: (err) => {
console.error("导航失败:", err);
}
});
}
});
}
return (_ctx, _cache) => {
return {
a: common_vendor.p({
height: "150",
list: swipe
}),
b: common_vendor.f(baseList.value, (baseListItem, baseListIndex, i0) => {
return {
a: baseListItem.src,
b: common_vendor.t(baseListItem.title),
c: baseListIndex,
d: common_vendor.o(($event) => NavicatToBaseItems(baseListItem), baseListIndex),
e: "adbc9592-2-" + i0 + ",adbc9592-1"
};
}),
c: common_vendor.p({
border: false,
col: "4"
}),
d: common_vendor.p({
margin: "1em",
type: "primary",
text: "新闻"
}),
e: common_vendor.o(toTop),
f: common_vendor.sr(caseList, "adbc9592-4", {
"k": "caseList"
})
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/uniapp1/gree_leran/pages/index/index.vue"]]);
wx.createPage(MiniProgramPage);