| | |
| | | "use strict"; |
| | | Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); |
| | | const common_vendor = require("./common/vendor.js"); |
| | | const api_index = require("./api/index.js"); |
| | | if (!Math) { |
| | | "./pages/index/index.js"; |
| | | "./pages/login/index.js"; |
| | | "./pages/addCard/index.js"; |
| | | "./pages/balanceRecord/index.js"; |
| | | "./pages/scanWater/index.js"; |
| | | "./pages/recharge/index.js"; |
| | | "./pages/sendWater/index.js"; |
| | | "./pages/preSendWater/index.js"; |
| | | "./pages/address/index.js"; |
| | | "./pages/addressAdd/index.js"; |
| | | "./pages/addressLocate/index.js"; |
| | | "./pages/success/index.js"; |
| | | } |
| | | const _sfc_main = { |
| | | __name: "App", |
| | | setup(__props) { |
| | | common_vendor.onLaunch(() => { |
| | | console.log("App Launch"); |
| | | if (!common_vendor.index.getStorageSync("openId")) { |
| | | common_vendor.wx$1.login({ |
| | | success: async (res1) => { |
| | | common_vendor.index.setStorageSync("code", res1.code); |
| | | await api_index.wxLoginApi({ code: res1.code }).then((res2) => { |
| | | common_vendor.index.setStorageSync("openId", res2.data.userId); |
| | | common_vendor.index.setStorageSync("token", res2.data.token); |
| | | }); |
| | | }, |
| | | fail: (e) => { |
| | | console.log(e); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | common_vendor.onShow(() => { |
| | | console.log("App Show"); |
| | |
| | | } |
| | | }; |
| | | const navbar = () => "./components/navbar/navbar.js"; |
| | | const DaTree = () => "./components/da-tree/index.js"; |
| | | function createApp() { |
| | | const app = common_vendor.createSSRApp(_sfc_main); |
| | | app.component("navbar", navbar); |
| | | app.component("navbar", navbar).component("DaTree", DaTree); |
| | | return { |
| | | app |
| | | }; |