1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| import parseBaseApp from '../../../mp-weixin/runtime/wrapper/app-base-parser'
|
| import {
| initRefs
| } from '../../../mp-weixin/runtime/wrapper/util'
|
| import {
| mocks
| } from './util'
|
| export default function parseApp (vm) {
| // 百度 onShow 竟然会在 onLaunch 之前
| const appOptions = parseBaseApp(vm, {
| mocks,
| initRefs
| })
| appOptions.onShow = function onShow (args) {
| if (!this.$vm) {
| this.onLaunch(args)
| }
| this.$vm.__call_hook('onShow', args)
| }
| return appOptions
| }
|
|