链接

image.png

跨域

image.png

VUEX

image.png

链接
image.png

1、export default 与export

export 类似于iOS中的open 将js中的对象、方法暴露出来然后使用import 进行导入

1、js 中可以存在很多个export 导入对象或方法。

1、export default 只会存在一个。

  1. export const APPEAL_RANK = `${API_BASE_URL}/api/statistics/function` // 职能单位受指派任务量排行
  2. export const COMPANY_EVALUATE = `${API_BASE_URL}/api/statistics/evaluate` // 各单位评价情况
  3. export const REGION_INFO = `${API_BASE_URL}/api/code/list` //获取区域信息
  4. /**
  5. * 服务需求状态统计
  6. * @param {} form
  7. * @returns
  8. */
  9. export async function appealStatusStatic({ regionId }) {
  10. return request({
  11. method: 'GET',
  12. url: STATUS_STATIC,
  13. query: { regionId },
  14. })
  15. }
  16. /**
  17. * 近12月处理情况月统计
  18. * @param {}
  19. * @returns
  20. */
  21. export async function commonStatic({ regionId }) {
  22. return request({
  23. method: 'GET',
  24. url: COMMON_STATIC,
  25. query: { regionId },
  26. })
  27. }
  1. export default {
  2. install: Vue => {
  3. Vue.prototype.$storage = storage
  4. },
  5. }

3、导入方式

image.png