app.js 869 Bytes
/*
 * @Date: 2025-06-28 10:33:00
 * @LastEditors: hookehuyr hookehuyr@gmail.com
 * @LastEditTime: 2025-09-12 12:10:06
 * @FilePath: /lls_program/src/app.js
 * @Description: 文件描述
 */
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import './app.less'
import { routerStore } from '@/stores/router'

const App = createApp({
    // 对应 onLaunch
  onLaunch(options) {
    // 未授权状态跳转授权页面,首页不需要权限
    const path = options.path;
    // 缓存没有权限的地址
    const router = routerStore();
    router.add(path);
    // if (!wx.getStorageSync("sessionid")) {
    //   wx.navigateTo({
    //     url: '/pages/auth/index'
    //   })
    // }
  },
  onShow() {
  },
  // 入口组件不需要实现 render 方法,即使实现了也会被 taro 所覆盖
});

App.use(createPinia())

export default App