hailu
2023-05-25 3644568ac3b6db7e387d5ab72da717e51626f869
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import store from '@/nxTemp/store';
import wechat from '@/nxTemp/wechat/wechat';
import tools from '@/nxTemp/utils/tools'
import cloudFun from '@/nxTemp/cloudFun'// 云函数方法
import nxShare from '@/nxTemp/utils/share.js'
import * as filter from '@/nxTemp/filter';
const install = Vue => {
    // global filter
    Object.keys(filter).forEach(item => {
        Vue.filter(item, filter[item]);
    });
    // 挂载函数
    Vue.prototype.$store = store;
    Vue.prototype.$tools = tools;
    Vue.prototype.$cloudFun = cloudFun;
    // event Bus 用于无关系组件间的通信。
    Vue.prototype.$bus = new Vue()
    Vue.mixin(nxShare);
}
 
export async function init(options) {
    // #ifdef MP-WEIXIN
    // 检测小程序更新(如果从朋友圈场景进入则无此API)
    options.scene !== 1154 && wechat.checkMiniProgramUpdate();
    // #endif
}
 
export default {
    install
}