湘妃到家前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
983 B

1 month ago
  1. import http from './http.js'
  2. import util from './utils.js'
  3. import time from './timeUtils.js'
  4. import api from './api.js'
  5. import 'dayjs/locale/zh-cn'
  6. import dayjs from 'dayjs'
  7. dayjs.locale('zh-cn')
  8. import uploadFileToOSS from './upload.js'
  9. import { handleTree } from './tree.js'
  10. import { wxPay } from './pay.js'
  11. const plugins = {
  12. install(app) {
  13. app.config.globalProperties.handleTree = handleTree
  14. app.config.globalProperties.uploadFileToOSS = uploadFileToOSS
  15. app.config.globalProperties.dayjs = dayjs
  16. app.config.globalProperties.$api = api
  17. app.config.globalProperties.$http = http.http
  18. app.config.globalProperties.$httpGet = http.get
  19. app.config.globalProperties.$httpPost = http.post
  20. app.config.globalProperties.$httpDelete = http.delete
  21. app.config.globalProperties.$httpSync = http.syncHttp
  22. app.config.globalProperties.$timeUtils = time
  23. app.config.globalProperties.$utils = util
  24. app.config.globalProperties.$wxPay = wxPay
  25. }
  26. }
  27. export default plugins;