import { login } from "./lib/logic"
import { appUpdate } from "./lib/wx/update";
import { useRouteQuery } from "./utils/route-query";
// import { Get } from "./lib/request/method";

// app.ts
App<IAppOption>({
  globalData: {
    doctorId: '',
    patientId: '',
    dictionaries: [],
  },
  onLaunch(options: WechatMiniprogram.App.LaunchShowOption) {
    console.log('log:AppLaunch-->', options);
    appUpdate(true);
    const query = useRouteQuery(options.query.scene);
    const doctorId = query.ys;
    this.globalData.doctorId = doctorId;
    wx.setStorageSync('doctorId', doctorId);
    login();
  },
})