|
import http from './http.js'
|
|
import util from './utils.js'
|
|
import time from './timeUtils.js'
|
|
import api from './api.js'
|
|
|
|
import 'dayjs/locale/zh-cn'
|
|
import dayjs from 'dayjs'
|
|
|
|
dayjs.locale('zh-cn')
|
|
|
|
import uploadFileToOSS from './upload.js'
|
|
import { handleTree } from './tree.js'
|
|
import { wxPay } from './pay.js'
|
|
|
|
const plugins = {
|
|
install(app) {
|
|
app.config.globalProperties.handleTree = handleTree
|
|
app.config.globalProperties.uploadFileToOSS = uploadFileToOSS
|
|
app.config.globalProperties.dayjs = dayjs
|
|
app.config.globalProperties.$api = api
|
|
app.config.globalProperties.$http = http.http
|
|
app.config.globalProperties.$httpGet = http.get
|
|
app.config.globalProperties.$httpPost = http.post
|
|
app.config.globalProperties.$httpDelete = http.delete
|
|
app.config.globalProperties.$httpSync = http.syncHttp
|
|
|
|
app.config.globalProperties.$timeUtils = time
|
|
app.config.globalProperties.$utils = util
|
|
app.config.globalProperties.$wxPay = wxPay
|
|
}
|
|
}
|
|
|
|
export default plugins;
|