|
|
|
"use strict";
|
|
|
|
const common_vendor = require("../../common/vendor.js");
|
|
|
|
require("../../utils/functions.js");
|
|
|
|
require("../../utils/log.js");
|
|
|
|
require("../../utils/qqmap-wx-jssdk.min.js");
|
|
|
|
require("../../config/host.js");
|
|
|
|
const FooterNav = () => "../../components/FooterNav/Index.js";
|
|
|
|
const RightNav = () => "../../components/RightNav/Index.js";
|
|
|
|
const HeaderNav = () => "../../components/HeaderNav/Index.js";
|
|
|
|
const HomePage = () => "./components/HomePage/Index.js";
|
|
|
|
const OrderPage = () => "./components/OrderPage/Index.js";
|
|
|
|
const ChatPage = () => "./components/ChatPage/Index.js";
|
|
|
|
const UserPage = () => "./components/UserPage/Index.js";
|
|
|
|
const _sfc_main = {
|
|
|
|
components: {
|
|
|
|
FooterNav,
|
|
|
|
RightNav,
|
|
|
|
HeaderNav,
|
|
|
|
HomePage,
|
|
|
|
OrderPage,
|
|
|
|
ChatPage,
|
|
|
|
UserPage
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
footCheck: "home",
|
|
|
|
show: false,
|
|
|
|
title: "标题",
|
|
|
|
content: "uview-plus的目标是成为uni-app生态最优秀的UI框架"
|
|
|
|
};
|
|
|
|
},
|
|
|
|
onLoad() {
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
userLogin() {
|
|
|
|
common_vendor.index.navigateTo({
|
|
|
|
url: "/pages/Login/index"
|
|
|
|
});
|
|
|
|
this.show = false;
|
|
|
|
}
|
|
|
|
// store.
|
|
|
|
},
|
|
|
|
onPageScroll(res) {
|
|
|
|
if (res.scrollTop <= 20) {
|
|
|
|
common_vendor.index.$emit("isTop", true);
|
|
|
|
} else {
|
|
|
|
common_vendor.index.$emit("isTop", false);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.title = this.$store.state.title;
|
|
|
|
let token = common_vendor.index.getStorageSync("token");
|
|
|
|
if (!token) {
|
|
|
|
this.show = true;
|
|
|
|
} else {
|
|
|
|
let user = common_vendor.index.getStorageSync("user");
|
|
|
|
this.$store.commit("userInfo", user);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
"$store.state.footCheck": {
|
|
|
|
handler(newVal, oldVal) {
|
|
|
|
this.footCheck = newVal;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"$store.state.title": {
|
|
|
|
handler(newVal, oldVal) {
|
|
|
|
this.title = newVal;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
if (!Array) {
|
|
|
|
const _component_HeaderNav = common_vendor.resolveComponent("HeaderNav");
|
|
|
|
const _component_HomePage = common_vendor.resolveComponent("HomePage");
|
|
|
|
const _component_OrderPage = common_vendor.resolveComponent("OrderPage");
|
|
|
|
const _component_ChatPage = common_vendor.resolveComponent("ChatPage");
|
|
|
|
const _component_UserPage = common_vendor.resolveComponent("UserPage");
|
|
|
|
const _component_RightNav = common_vendor.resolveComponent("RightNav");
|
|
|
|
const _component_FooterNav = common_vendor.resolveComponent("FooterNav");
|
|
|
|
const _easycom_u_modal2 = common_vendor.resolveComponent("u-modal");
|
|
|
|
(_component_HeaderNav + _component_HomePage + _component_OrderPage + _component_ChatPage + _component_UserPage + _component_RightNav + _component_FooterNav + _easycom_u_modal2)();
|
|
|
|
}
|
|
|
|
const _easycom_u_modal = () => "../../uni_modules/uview-plus/components/u-modal/u-modal.js";
|
|
|
|
if (!Math) {
|
|
|
|
_easycom_u_modal();
|
|
|
|
}
|
|
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
return {
|
|
|
|
a: common_vendor.p({
|
|
|
|
title: $data.title
|
|
|
|
}),
|
|
|
|
b: $data.footCheck === "home",
|
|
|
|
c: $data.footCheck === "home" ? 1 : "",
|
|
|
|
d: $data.footCheck === "order",
|
|
|
|
e: $data.footCheck === "order" ? 1 : "",
|
|
|
|
f: $data.footCheck === "chat",
|
|
|
|
g: $data.footCheck === "chat" ? 1 : "",
|
|
|
|
h: $data.footCheck === "user",
|
|
|
|
i: $data.footCheck === "user" ? 1 : "",
|
|
|
|
j: common_vendor.o($options.userLogin),
|
|
|
|
k: common_vendor.o(($event) => {
|
|
|
|
this.show = false;
|
|
|
|
}),
|
|
|
|
l: common_vendor.p({
|
|
|
|
show: $data.show,
|
|
|
|
title: "登录",
|
|
|
|
content: "当前未登录是否前往登录",
|
|
|
|
closeOnClickOverlay: true,
|
|
|
|
showCancelButton: true
|
|
|
|
})
|
|
|
|
};
|
|
|
|
}
|
|
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/phpstudy_pro/WEB/pet_uni/pages/Index/index.vue"]]);
|
|
|
|
_sfc_main.__runtimeHooks = 1;
|
|
|
|
wx.createPage(MiniProgramPage);
|