| 123456789101112131415161718192021 |
- import { login } from "./lib/logic"
- // import { Get } from "./lib/request/method";
- // app.ts
- App<IAppOption>({
- globalData: {
- doctorId: '',
- patientId: '',
- dictionaries: [],
- },
- onLaunch(options: WechatMiniprogram.App.LaunchShowOption) {
- console.log('log:AppLaunch-->', options);
-
- const scene = decodeURIComponent(options.query.scene)
- const params = scene?.split('&').map(item=> item?.split('=')) ?? [];
- const doctorId = params.find(([key])=> ['ys', 'doctorId'].includes(key))?.[1] ?? ''
- this.globalData.doctorId = doctorId;
- wx.setStorageSync('doctorId',doctorId);
- login();
- },
- })
|