| | |
| | | "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/login/index.js"; |
| | | "./pages/index/index.js"; |
| | | "./pages/addCard/index.js"; |
| | | "./pages/userInfo/index.js"; |
| | |
| | | "./pages/pointsMall/pointsExchangeRecord/index.js"; |
| | | "./pages/pointsMall/pointsGoodsDetail/index.js"; |
| | | "./pages/pointsMall/pointsrule/index.js"; |
| | | "./pages/adminPlatform/home.js"; |
| | | } |
| | | const _sfc_main = { |
| | | __name: "App", |
| | | setup(__props) { |
| | | function wxLogin() { |
| | | 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) => { |
| | | if (res2.code == 200) { |
| | | common_vendor.index.setStorageSync("openId", res2.data.userId); |
| | | common_vendor.index.setStorageSync("token", res2.data.token); |
| | | } else { |
| | | console.log("登录接口调用失败"); |
| | | } |
| | | }); |
| | | }, |
| | | fail: (e) => { |
| | | common_vendor.index.showToast({ |
| | | title: "微信登录失败,请退出重试!", |
| | | duration: 2e3, |
| | | icon: "fail" |
| | | }); |
| | | console.log(e); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | common_vendor.onLaunch(async () => { |
| | | await wxLogin(); |
| | | console.log("进入项目启动页APP.vue了"); |
| | | }); |
| | | common_vendor.onShow(() => { |
| | | console.log("App Show"); |
| | | }); |
| | | common_vendor.onHide(() => { |
| | | console.log("App Hide"); |
| | | console.log("进入APP.vue"); |
| | | }); |
| | | return () => { |
| | | }; |