| 12345678910111213141516171819202122232425 |
- import { login } from "./lib/logic";
- import { appUpdate } from "./lib/wx/update";
- import { useRouteQuery } from "./utils/route-query";
- import i18n from "./i18n/install";
- // app.ts
- App<IAppOption>({
- globalData: {
- doctorId: "",
- patientId: "",
- dictionaries: [],
- },
- i18n: null,
- onLaunch(options: WechatMiniprogram.App.LaunchShowOption) {
- i18n().then((value) => this.i18n = value);
- appUpdate(true);
- const scene = options.query.scene;
- const query = useRouteQuery(scene);
- wx.setStorageSync("scene", scene);
- const doctorId = query.ys;
- this.globalData.doctorId = doctorId;
- wx.setStorageSync("doctorId", doctorId);
- login();
- },
- });
|