| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- "use strict";
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
- const common_vendor = require("./common/vendor.js");
- const api_services_auth = require("./api/services/auth.js");
- const utils_filters = require("./utils/filters.js");
- const store_index = require("./store/index.js");
- const config_config = require("./config/config.js");
- if (!Math) {
- "./pages/dashboard/index.js";
- "./pages/login/index.js";
- "./pages/userInfo/index.js";
- "./pages/activity/index.js";
- "./pages/device/index.js";
- "./pages/knowledge/index.js";
- "./pages/user/index.js";
- "./pages/machine/index.js";
- "./pages/ai-chat/index.js";
- "./pages/field/index.js";
- "./pages/more/index.js";
- "./pages/settings/index.js";
- "./pages/about/index.js";
- "./pages/privacy/index.js";
- }
- const _sfc_main = {
- onLaunch: function() {
- console.log("App Launch");
- this.checkLoginStatus();
- },
- onShow: function() {
- console.log("App Show");
- },
- onHide: function() {
- console.log("App Hide");
- },
- methods: {
- checkLoginStatus() {
- const pages = ["pages/dashboard/index", "pages/user/index", "pages/activity/index", "pages/device/index"];
- common_vendor.index.addInterceptor("navigateTo", {
- invoke(e) {
- const url = e.url;
- const needLogin = pages.some((page) => url.indexOf(page) > -1);
- if (needLogin && !api_services_auth.isLoggedIn()) {
- common_vendor.index.navigateTo({
- url: "/pages/login/index"
- });
- return false;
- }
- return true;
- }
- });
- common_vendor.index.addInterceptor("switchTab", {
- invoke(e) {
- const url = e.url;
- const needLogin = pages.some((page) => url.indexOf(page) > -1);
- if (needLogin && !api_services_auth.isLoggedIn()) {
- common_vendor.index.navigateTo({
- url: "/pages/login/index"
- });
- return false;
- }
- return true;
- }
- });
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return {};
- }
- const App = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
- function createApp() {
- const app = common_vendor.createSSRApp(App);
- app.config.globalProperties.$filters = {};
- Object.keys(utils_filters.filters).forEach((key) => {
- app.config.globalProperties.$filters[key] = utils_filters.filters[key];
- });
- app.config.globalProperties.$mainColor = config_config.config.mainColor;
- app.config.globalProperties.$lightColor = config_config.config.lightColor;
- app.config.globalProperties.$aiderLightColor = config_config.config.aiderLightColor;
- app.use(store_index.store);
- return {
- app
- };
- }
- createApp().app.mount("#app");
- exports.createApp = createApp;
|